From 741b751e7b2cd9081920c2e3b2deda9c1388b8b9 Mon Sep 17 00:00:00 2001 From: cinder <cinder@alchemyviewer.org> Date: Tue, 24 Dec 2024 13:59:22 -0600 Subject: [PATCH] Move web profile crap over to elelwebprofile.flv --- indra/newview/llpanelprofile.cpp | 25 ------------------------- indra/newview/llwebprofile.cpp | 32 +++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 4fdfc6cd39b..7df9860a11f 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -252,31 +252,6 @@ void post_profile_image_coro(std::string cap_url, EProfileImageType type, std::s delete handle; } -////////////////////////////////////////////////////////////////////////// -// LLWebProfileHandler - -class LLWebProfileHandler : public LLCommandHandler -{ -public: - // requires trusted browser to trigger - LLWebProfileHandler() : LLCommandHandler("profile", UNTRUSTED_THROTTLE) { } - - bool handle(const LLSD& params, - const LLSD& query_map, - const std::string& grid, - LLMediaCtrl* web) - { - if (params.size() < 1) return false; - std::string agent_name = params[0]; - LL_INFOS() << "Profile, agent_name " << agent_name << LL_ENDL; - std::string url = getProfileURL(agent_name); - LLWeb::loadURLInternal(url); - - return true; - } -}; -LLWebProfileHandler gWebProfileHandler; - ///---------------------------------------------------------------------------- /// LLFloaterProfilePermissions diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index 8048745b1ce..23a0215d1e9 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -31,17 +31,16 @@ // libs #include "llbufferstream.h" #include "llimagepng.h" - #include "llsdserialize.h" #include "llstring.h" // newview #include "llavataractions.h" // for getProfileURL() -#include "llviewermedia.h" // FIXME: don't use LLViewerMedia internals - +#include "llcommandhandler.h" #include "llcorehttputil.h" - -#include "bufferstream.h" +#include "llmediactrl.h" +#include "llviewermedia.h" // FIXME: don't use LLViewerMedia internals +#include "llweb.h" /* * Workflow: @@ -273,3 +272,26 @@ std::string LLWebProfile::getAuthCookie() // This is needed to test image uploads on Linux viewer built with OpenSSL 1.0.0 (0.9.8 works fine). return LLStringUtil::getenv("LL_SNAPSHOT_COOKIE", sAuthCookie); } + +////////////////////////////////////////////////////////////////////////// +// LLWebProfileHandler + +class LLWebProfileHandler : public LLCommandHandler +{ + public: + // requires trusted browser to trigger + LLWebProfileHandler() : LLCommandHandler("profile", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) + { + if (params.size() < 1) + return false; + std::string agent_name = params[0]; + LL_INFOS() << "Profile, agent_name " << agent_name << LL_ENDL; + std::string url = getProfileURL(agent_name); + LLWeb::loadURLInternal(url); + + return true; + } +}; +LLWebProfileHandler gWebProfileHandler; -- GitLab