summaryrefslogtreecommitdiff
path: root/indra/media_plugins/webkit
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2009-12-09 12:57:10 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2009-12-09 12:57:10 -0800
commit197de032e1f66894f595a3a1ba46b36f45f8e8f5 (patch)
treef3fa65205bc0e7e6652d3472adc8d1c532ee19a3 /indra/media_plugins/webkit
parent15fbfa5ae1164a5c2ddce5f2890b02645f7a04d6 (diff)
DEV-43948 viewer2 is writing session data into the 'read-only' installation tree (mostly media stuff)
propagate the parent app's OSUserAppDir (i.e. ~/.secondlife/) all the way down to plugins, if they need persistant user data/settings (like the webkit plugin needs a place to put its cache).
Diffstat (limited to 'indra/media_plugins/webkit')
-rw-r--r--indra/media_plugins/webkit/media_plugin_webkit.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp
index 25f4c8720a..1ead310754 100644
--- a/indra/media_plugins/webkit/media_plugin_webkit.cpp
+++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp
@@ -76,6 +76,8 @@ public:
private:
+ std::string mProfileDir;
+
enum
{
INIT_STATE_UNINITIALIZED, // Browser instance hasn't been set up yet
@@ -187,7 +189,6 @@ private:
#else
std::string component_dir = application_dir;
#endif
- std::string profileDir = application_dir + "/" + "browser_profile"; // cross platform?
// window handle - needed on Windows and must be app window.
#if LL_WINDOWS
@@ -199,7 +200,7 @@ private:
#endif
// main browser initialization
- bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, profileDir, native_window_handle );
+ bool result = LLQtWebKit::getInstance()->init( application_dir, component_dir, mProfileDir, native_window_handle );
if ( result )
{
// create single browser window
@@ -576,7 +577,7 @@ MediaPluginWebKit::~MediaPluginWebKit()
void MediaPluginWebKit::receiveMessage(const char *message_string)
{
-// std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
+ std::cerr << "MediaPluginWebKit::receiveMessage: received message: \"" << message_string << "\"" << std::endl;
LLPluginMessage message_in;
if(message_in.parse(message_string) >= 0)
@@ -587,6 +588,9 @@ void MediaPluginWebKit::receiveMessage(const char *message_string)
{
if(message_name == "init")
{
+ std::string user_data_path = message_in.getValue("user_data_path"); // n.b. always has trailing platform-specific dir-delimiter
+ mProfileDir = user_data_path + "browser_profile";
+
LLPluginMessage message("base", "init_response");
LLSD versions = LLSD::emptyMap();
versions[LLPLUGIN_MESSAGE_CLASS_BASE] = LLPLUGIN_MESSAGE_CLASS_BASE_VERSION;