diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-11-11 22:45:54 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-11-11 22:45:54 +0200 |
commit | b9bcfad195f357d6bf1309155de99b6b6a41e4a3 (patch) | |
tree | 0afad84d0c401e0232066dbb7ce8698b437f3eac /indra/media_plugins | |
parent | 5355d9a2fe148561613b801c957aaa155f742110 (diff) | |
parent | 04c473ab46041133ea6a87dbe0d43e662472adf5 (diff) |
Merge branch 'master' into DRTVWR-520-apple-notarization
Diffstat (limited to 'indra/media_plugins')
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index bc967c9bca..0bb62d79ff 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -98,7 +98,9 @@ private: bool mCanCut; bool mCanCopy; bool mCanPaste; + std::string mRootCachePath; std::string mCachePath; + std::string mContextCachePath; std::string mCefLogFile; bool mCefLogVerbose; std::vector<std::string> mPickedFiles; @@ -458,7 +460,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "cleanup") { - mVolumeCatcher.setVolume(0); // Hack: masks CEF exit issues mCEFLib->requestExit(); } else if (message_name == "force_exit") @@ -527,7 +528,9 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.accept_language_list = mHostLanguage; settings.background_color = 0xffffffff; settings.cache_enabled = true; + settings.root_cache_path = mRootCachePath; settings.cache_path = mCachePath; + settings.context_cache_path = mContextCachePath; settings.cookies_enabled = mCookiesEnabled; settings.disable_gpu = mDisableGPU; #if LL_DARWIN @@ -583,9 +586,25 @@ void MediaPluginCEF::receiveMessage(const char* message_string) else if (message_name == "set_user_data_path") { std::string user_data_path_cache = message_in.getValue("cache_path"); - std::string user_data_path_cookies = message_in.getValue("cookies_path"); + std::string subfolder = message_in.getValue("username"); - mCachePath = user_data_path_cache + "cef_cache"; + mRootCachePath = user_data_path_cache + "cef_cache"; + if (!subfolder.empty()) + { + std::string delim; +#if LL_WINDOWS + // media plugin doesn't have access to gDirUtilp + delim = "\\"; +#else + delim = "/"; +#endif + mCachePath = mRootCachePath + delim + subfolder; + } + else + { + mCachePath = mRootCachePath; + } + mContextCachePath = ""; // disabled by "" mCefLogFile = message_in.getValue("cef_log_file"); mCefLogVerbose = message_in.getValueBoolean("cef_verbose_log"); } |