summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2023-12-14 12:07:45 -0800
committerBrad Linden <brad@lindenlab.com>2023-12-14 12:07:45 -0800
commit32de0cb67d824498d0fc9d489ce19731ebfddfdf (patch)
tree9fd52f420543a5c4dc45215d7ed49faf94f386fe /indra/newview/llfloaterworldmap.cpp
parent7bfe590a3669a005d4269cdcf378891080264dce (diff)
parent4c791e098d3abafa406e0e269038c40aae67f66c (diff)
Merge branch 'DRTVWR-596' into DRTVWR-601
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp53
1 files changed, 45 insertions, 8 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 8f3ec8af05..c8559fc9d3 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -121,10 +121,27 @@ static const F32 ZOOM_MAX = 128.f;
class LLWorldMapHandler : public LLCommandHandler
{
public:
- // requires trusted browser to trigger
- LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_CLICK_ONLY ) { }
-
- bool handle(const LLSD& params,
+ LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE)
+ {
+ }
+
+ virtual bool canHandleUntrusted(
+ const LLSD& params,
+ const LLSD& query_map,
+ LLMediaCtrl* web,
+ const std::string& nav_type)
+ {
+ if (nav_type == NAV_TYPE_CLICKED
+ || nav_type == NAV_TYPE_EXTERNAL)
+ {
+ // NAV_TYPE_EXTERNAL will be throttled
+ return true;
+ }
+
+ return false;
+ }
+
+ bool handle(const LLSD& params,
const LLSD& query_map,
const std::string& grid,
LLMediaCtrl* web)
@@ -160,12 +177,32 @@ LLWorldMapHandler gWorldMapHandler;
class LLMapTrackAvatarHandler : public LLCommandHandler
{
public:
- // requires trusted browser to trigger
- LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_CLICK_ONLY)
+ LLMapTrackAvatarHandler() : LLCommandHandler("maptrackavatar", UNTRUSTED_THROTTLE)
{
}
-
- bool handle(const LLSD& params,
+
+ virtual bool canHandleUntrusted(
+ const LLSD& params,
+ const LLSD& query_map,
+ LLMediaCtrl* web,
+ const std::string& nav_type)
+ {
+ if (params.size() < 1)
+ {
+ return true; // don't block, will fail later
+ }
+
+ if (nav_type == NAV_TYPE_CLICKED
+ || nav_type == NAV_TYPE_EXTERNAL)
+ {
+ // NAV_TYPE_EXTERNAL will be throttled
+ return true;
+ }
+
+ return false;
+ }
+
+ bool handle(const LLSD& params,
const LLSD& query_map,
const std::string& grid,
LLMediaCtrl* web)