From 531b77a9485db77df31a25a766e66ec1443a49f6 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 15 Sep 2010 14:39:42 -0700 Subject: Enable web popups to specify size and position of the Media Browser window from javascript. This includes a Mac build of llqtwebkit from the following sources: revision aacdf69cbf5aa12d77c179296e31ef643ed1ef4a of http://qt.gitorious.org/+lindenqt/qt/lindenqt (currently head of the 'lindenqt' branch) revision 81ab5ae326f0 of http://hg.secondlife.com/llqtwebkit (currently head of the default branch) Reviewed by Callum. --- indra/newview/llweb.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'indra/newview/llweb.cpp') diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 298e5590d0..912413d06a 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -78,12 +78,12 @@ void LLWeb::initClass() // static -void LLWeb::loadURL(const std::string& url, const std::string& target) +void LLWeb::loadURL(const std::string& url, const std::string& target, const std::string& uuid) { if(target == "_internal") { // Force load in the internal browser, as if with a blank target. - loadURLInternal(url); + loadURLInternal(url, "", uuid); } else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external")) { @@ -91,28 +91,31 @@ void LLWeb::loadURL(const std::string& url, const std::string& target) } else { - loadURLInternal(url, target); + loadURLInternal(url, target, uuid); } } // static -void LLWeb::loadURLInternal(const std::string &url, const std::string& target) +void LLWeb::loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid) { - LLFloaterMediaBrowser::create(url, target); + LLFloaterMediaBrowser::create(url, target, uuid); } // static -void LLWeb::loadURLExternal(const std::string& url) +void LLWeb::loadURLExternal(const std::string& url, const std::string& uuid) { loadURLExternal(url, true); } // static -void LLWeb::loadURLExternal(const std::string& url, bool async) +void LLWeb::loadURLExternal(const std::string& url, bool async, const std::string& uuid) { + // Act like the proxy window was closed, since we won't be able to track targeted windows in the external browser. + LLViewerMedia::proxyWindowClosed(uuid); + LLSD payload; payload["url"] = url; LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, boost::bind(on_load_url_external_response, _1, _2, async)); -- cgit v1.2.3