aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorAleric Inglewood2010-10-19 21:14:03 +0200
committerAleric Inglewood2010-10-19 21:16:10 +0200
commit6f52903897ccb2ddd88049cd3137cf554ef45621 (patch)
treecb3caa0fc2f8ceebd8b0808335d9f4ba12ae1ba6 /linden/indra/newview/llviewermedia.cpp
parentForgot QtWebKit and Qt plugins in last commit. (diff)
downloadmeta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.zip
meta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.tar.gz
meta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.tar.bz2
meta-impy-6f52903897ccb2ddd88049cd3137cf554ef45621.tar.xz
Sync LLViewerMediaImpl::newSourceFromMediaType with SG2
Also renamed CookiesEnabled to BrowswerCookiesEnabled. Added BrowserJavascriptEnabled, BrowserPluginsEnabled and PluginAttachDebuggerToPlugins.
Diffstat (limited to 'linden/indra/newview/llviewermedia.cpp')
-rw-r--r--linden/indra/newview/llviewermedia.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp
index 8c5cf6a..57c2111 100644
--- a/linden/indra/newview/llviewermedia.cpp
+++ b/linden/indra/newview/llviewermedia.cpp
@@ -466,6 +466,19 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
466 std::string user_data_path = gDirUtilp->getOSUserAppDir(); 466 std::string user_data_path = gDirUtilp->getOSUserAppDir();
467 user_data_path += gDirUtilp->getDirDelimiter(); 467 user_data_path += gDirUtilp->getDirDelimiter();
468 468
469 // Fix for EXT-5960 - make browser profile specific to user (cache, cookies etc.)
470 // If the linden username returned is blank, that can only mean we are
471 // at the login page displaying login Web page or Web browser test via Develop menu.
472 // In this case we just use whatever gDirUtilp->getOSUserAppDir() gives us (this
473 // is what we always used before this change)
474 std::string linden_user_dir = gDirUtilp->getLindenUserDir();
475 if ( ! linden_user_dir.empty() )
476 {
477 // gDirUtilp->getLindenUserDir() is whole path, not just Linden name
478 user_data_path = linden_user_dir;
479 user_data_path += gDirUtilp->getDirDelimiter();
480 }
481
469 // See if the plugin executable exists 482 // See if the plugin executable exists
470 llstat s; 483 llstat s;
471 if(LLFile::stat(launcher_name, &s)) 484 if(LLFile::stat(launcher_name, &s))
@@ -480,7 +493,22 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
480 { 493 {
481 LLPluginClassMedia* media_source = new LLPluginClassMedia(owner); 494 LLPluginClassMedia* media_source = new LLPluginClassMedia(owner);
482 media_source->setSize(default_width, default_height); 495 media_source->setSize(default_width, default_height);
483 if (media_source->init(launcher_name, plugin_name, false)) 496 media_source->setUserDataPath(user_data_path);
497 media_source->setLanguageCode(LLUI::getLanguage());
498
499 // collect 'cookies enabled' setting from prefs and send to embedded browser
500 bool cookies_enabled = gSavedSettings.getBOOL( "BrowserCookiesEnabled" );
501 media_source->enable_cookies( cookies_enabled );
502
503 // collect 'plugins enabled' setting from prefs and send to embedded browser
504 bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" );
505 media_source->setPluginsEnabled( plugins_enabled );
506
507 // collect 'javascript enabled' setting from prefs and send to embedded browser
508 bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" );
509 media_source->setJavascriptEnabled( javascript_enabled );
510
511 if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")))
484 { 512 {
485 return media_source; 513 return media_source;
486 } 514 }
@@ -491,7 +519,12 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
491 } 519 }
492 } 520 }
493 } 521 }
494 522
523 LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL;
524 LLSD args;
525 args["MIME_TYPE"] = media_type;
526 LLNotifications::instance().add("NoPlugin", args);
527
495 return NULL; 528 return NULL;
496} 529}
497 530