diff options
author | callum_linden <none@none> | 2018-01-26 17:06:19 -0800 |
---|---|---|
committer | callum_linden <none@none> | 2018-01-26 17:06:19 -0800 |
commit | 8b09a997c5de48d30dc732a10ba3aeda6bc82d44 (patch) | |
tree | ecb22a24a693b888aecf1ea752f4efe7ca162c97 /indra | |
parent | 94f88e0121678cde7c4888d6adac9a1db1434292 (diff) |
Fixes for: MAINT-8244 Text in CEF cannot be selected with the mouse. MAINT-8245 Expose CEF log file and logging severity to viewer and MAINT-8246 Expose the CEF remote debugging system to the viewer
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 11 | ||||
-rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 2 | ||||
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 9 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llviewermedia.cpp | 5 |
5 files changed, 34 insertions, 4 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index a857ff0153..78eb6e75bb 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -31,6 +31,9 @@ #include "llpluginclassmedia.h" #include "llpluginmessageclasses.h" +#include "llcontrol.h" + +extern LLControlGroup gSavedSettings; static int LOW_PRIORITY_TEXTURE_SIZE_DEFAULT = 256; @@ -843,11 +846,17 @@ void LLPluginClassMedia::paste() sendMessage(message); } -void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache, const std::string &user_data_path_cookies) +void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache, + const std::string &user_data_path_cookies, + const std::string &user_data_path_cef_log) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "set_user_data_path"); message.setValue("cache_path", user_data_path_cache); message.setValue("cookies_path", user_data_path_cookies); + message.setValue("cef_log_file", user_data_path_cef_log); + + bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog"); + message.setValueBoolean("cef_verbose_log", cef_verbose_log); sendMessage(message); } diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index dcd8af4e06..3b3075c6bd 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -195,7 +195,7 @@ public: bool canPaste() const { return mCanPaste; }; // These can be called before init(), and they will be queued and sent before the media init message. - void setUserDataPath(const std::string &user_data_path_cache, const std::string &user_data_path_cookies); + void setUserDataPath(const std::string &user_data_path_cache, const std::string &user_data_path_cookies, const std::string &user_data_path_cef_log); void setLanguageCode(const std::string &language_code); void setPluginsEnabled(const bool enabled); void setJavascriptEnabled(const bool enabled); diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 88317655ab..bdd394da4b 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -96,6 +96,8 @@ private: bool mCanPaste; std::string mCachePath; std::string mCookiePath; + std::string mCefLogFile; + bool mCefLogVerbose; std::vector<std::string> mPickedFiles; VolumeCatcher mVolumeCatcher; F32 mCurVolume; @@ -126,6 +128,8 @@ MediaPluginBase(host_send_func, host_user_data) mCanPaste = false; mCachePath = ""; mCookiePath = ""; + mCefLogFile = ""; + mCefLogVerbose = false; mPickedFiles.clear(); mCurVolume = 0.0; @@ -511,6 +515,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.plugins_enabled = mPluginsEnabled; settings.user_agent_substring = mCEFLib->makeCompatibleUserAgentString(mUserAgentSubtring); settings.webgl_enabled = true; + settings.log_file = mCefLogFile; + settings.log_verbose = mCefLogVerbose; std::vector<std::string> custom_schemes(1, "secondlife"); mCEFLib->setCustomSchemes(custom_schemes); @@ -540,8 +546,11 @@ void MediaPluginCEF::receiveMessage(const char* message_string) { std::string user_data_path_cache = message_in.getValue("cache_path"); std::string user_data_path_cookies = message_in.getValue("cookies_path"); + mCachePath = user_data_path_cache + "cef_cache"; mCookiePath = user_data_path_cookies + "cef_cookies"; + mCefLogFile = message_in.getValue("cef_log_file"); + mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log"); } else if (message_name == "size_change") { diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4a4f4bfc61..11c34dacb5 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16155,6 +16155,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>CefVerboseLog</key> + <map> + <key>Comment</key> + <string>Enable/disable CEF verbose loggingk</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> </map> </llsd> diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 1d4079289a..c92de6ada5 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1686,6 +1686,8 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ std::string user_data_path_cookies = gDirUtilp->getOSUserAppDir(); user_data_path_cookies += gDirUtilp->getDirDelimiter(); + std::string user_data_path_cef_log = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef_log.txt"); + // Fix for EXT-5960 - make browser profile specific to user (cache, cookies etc.) // If the linden username returned is blank, that can only mean we are // at the login page displaying login Web page or Web browser test via Develop menu. @@ -1694,7 +1696,6 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ std::string linden_user_dir = gDirUtilp->getLindenUserDir(); if ( ! linden_user_dir.empty() ) { - // gDirUtilp->getLindenUserDir() is whole path, not just Linden name user_data_path_cookies = linden_user_dir; user_data_path_cookies += gDirUtilp->getDirDelimiter(); }; @@ -1715,7 +1716,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ { media_source = new LLPluginClassMedia(owner); media_source->setSize(default_width, default_height); - media_source->setUserDataPath(user_data_path_cache, user_data_path_cookies); + media_source->setUserDataPath(user_data_path_cache, user_data_path_cookies, user_data_path_cef_log); media_source->setLanguageCode(LLUI::getLanguage()); media_source->setZoomFactor(zoom_factor); |