From 045caad8f51a26c636b6273ff2049df46d206a0d Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 8 Jul 2012 03:33:05 +0200 Subject: [PATCH] Revert "REVERT! Fix for media update commit." This reverts commit 36a95ec36e1a77397f25efe81468af38f47bd885. --- indra/newview/app_settings/settings.xml | 22 ---------------------- indra/newview/llmediactrl.cpp | 4 ++++ indra/newview/llviewermedia.cpp | 11 +++++++++++ 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 68f0cf073..2eca82c95 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2200,28 +2200,6 @@ Value 0 - BrowserUseDefaultCAFile - - Comment - Tell the built-in web browser to use the CA.pem file shipped with the client. - Persist - 1 - Type - Boolean - Value - 1 - - BrowserCAFilePath - - Comment - Tell the built-in web browser the path to an alternative CA.pem file (only used if BrowserUseDefaultCAFile is false) - Persist - 1 - Type - String - Value - - PluginAttachDebuggerToPlugins Comment diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 818fa504d..315afe84a 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -345,6 +345,10 @@ BOOL LLMediaCtrl::postBuild () return true; } +void LLMediaCtrl::onOpenWebInspector() + if (mMediaSource && mMediaSource->hasMedia()) + mMediaSource->getMediaPlugin()->showWebInspector( true ); +} //////////////////////////////////////////////////////////////////////////////// // BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask ) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index a7678f14d..7bd2ff41e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -488,6 +488,17 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) // set the path to the CA.pem file media_source->addCertificateFilePath( ca_path ); + // TODO: Only send cookies to plugins that need them + // Ideally, the plugin should tell us whether it handles cookies or not -- either via the init response or through a separate message. + // Due to the ordering of messages, it's possible we wouldn't get that information back in time to send cookies before sending a navigate message, + // which could cause odd race conditions. + std::string all_cookies = LLViewerMedia::getCookieStore()->getAllCookies(); + lldebugs << "setting cookies: " << all_cookies << llendl; + if(!all_cookies.empty()) + { + media_source->set_cookies(all_cookies); + } + mPluginBase = media_source; return true;