diff options
author | Andrew Meadows <andrew@lindenlab.com> | 2011-01-07 15:22:22 -0800 |
---|---|---|
committer | Andrew Meadows <andrew@lindenlab.com> | 2011-01-07 15:22:22 -0800 |
commit | d23f7df822b6c0557f9426b5e1aa660b77aba01e (patch) | |
tree | 2e86e4ec60018beabd35a54cc18fdf322a504269 /indra/newview/llweb.cpp | |
parent | cf64ecb41dbbdcdc3c512510c4a7ebd28c832314 (diff) | |
parent | c132d20a7433e2d09e3521a15497f661fcbd18b8 (diff) |
merge
Diffstat (limited to 'indra/newview/llweb.cpp')
-rw-r--r-- | indra/newview/llweb.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 73a37a6993..b73017a51a 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -35,6 +35,7 @@ #include "llagent.h" #include "llappviewer.h" #include "llfloatermediabrowser.h" +#include "llfloaterwebcontent.h" #include "llfloaterreg.h" #include "lllogininstance.h" #include "llparcel.h" @@ -95,6 +96,23 @@ void LLWeb::loadURL(const std::string& url, const std::string& target, const std } } +// static +void LLWeb::loadWebURL(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. + loadWebURLInternal(url, "", uuid); + } + else if (gSavedSettings.getBOOL("UseExternalBrowser") || (target == "_external")) + { + loadURLExternal(url); + } + else + { + loadWebURLInternal(url, target, uuid); + } +} // static void LLWeb::loadURLInternal(const std::string &url, const std::string& target, const std::string& uuid) @@ -102,6 +120,13 @@ void LLWeb::loadURLInternal(const std::string &url, const std::string& target, c LLFloaterMediaBrowser::create(url, target, uuid); } +// static +// Explicitly open a Web URL using the Web content floater +void LLWeb::loadWebURLInternal(const std::string &url, const std::string& target, const std::string& uuid) +{ + LLFloaterWebContent::create(url, target, uuid); +} + // static void LLWeb::loadURLExternal(const std::string& url, const std::string& uuid) @@ -116,6 +141,13 @@ void LLWeb::loadURLExternal(const std::string& url, bool async, const std::strin // Act like the proxy window was closed, since we won't be able to track targeted windows in the external browser. LLViewerMedia::proxyWindowClosed(uuid); + if(gSavedSettings.getBOOL("DisableExternalBrowser")) + { + // Don't open an external browser under any circumstances. + llwarns << "Blocked attempt to open external browser." << llendl; + return; + } + LLSD payload; payload["url"] = url; LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, boost::bind(on_load_url_external_response, _1, _2, async)); |