From 7505501aea76e014b205d64accf89a9d30abac3a Mon Sep 17 00:00:00 2001 From: callum_linden Date: Tue, 1 Sep 2015 17:43:30 -0700 Subject: get update llceflib with cookie/cache code and implement cache/cookie folders in viewer --- indra/media_plugins/cef/media_plugin_cef.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/media_plugins/cef') diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index fcedc3355d..a0a80e3a3a 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -83,6 +83,8 @@ private: std::string mAuthUsername; std::string mAuthPassword; bool mAuthOK; + std::string mCachePath; + std::string mCookiePath; LLCEFLib* mLLCEFLib; }; @@ -104,6 +106,8 @@ MediaPluginBase(host_send_func, host_user_data) mAuthUsername = ""; mAuthPassword = ""; mAuthOK = false; + mCachePath = ""; + mCookiePath = ""; mLLCEFLib = new LLCEFLib(); } @@ -338,6 +342,8 @@ void MediaPluginCEF::receiveMessage(const char* message_string) settings.plugins_enabled = mPluginsEnabled; settings.javascript_enabled = mJavascriptEnabled; settings.cookies_enabled = mCookiesEnabled; + settings.cache_path = mCachePath; + settings.cookie_store_path = mCookiePath; settings.accept_language_list = mHostLanguage; settings.user_agent_substring = mUserAgentSubtring; @@ -363,6 +369,16 @@ void MediaPluginCEF::receiveMessage(const char* message_string) message.setValueBoolean("coords_opengl", false); sendMessage(message); } + else if (message_name == "set_user_data_path") + { + std::string user_data_path = message_in.getValue("path"); // n.b. always has trailing platform-specific dir-delimiter + mCachePath = user_data_path + "cef_cache"; + mCookiePath = user_data_path + "cef_cookies"; + + std::stringstream str; + str << "@@@@@@@@@@ setting data paths to " << mCachePath << " and " << mCookiePath; + postDebugMessage(str.str()); + } else if (message_name == "size_change") { std::string name = message_in.getValue("name"); -- cgit v1.2.3