diff options
Diffstat (limited to 'indra/llplugin')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 21 | ||||
-rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 10 | ||||
-rw-r--r-- | indra/llplugin/llpluginclassmediaowner.h | 2 |
3 files changed, 33 insertions, 0 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index d081109acc..c53857fcee 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -842,6 +842,14 @@ void LLPluginClassMedia::setJavascriptEnabled(const bool enabled) sendMessage(message); } + +void LLPluginClassMedia::enableMediaPluginDebugging( bool enable ) +{ + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "enable_media_plugin_debugging"); + message.setValueBoolean( "enable", enable ); + sendMessage( message ); +} + void LLPluginClassMedia::setTarget(const std::string &target) { mTarget = target; @@ -1066,6 +1074,12 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message) mAuthURL = message.getValue("url"); mAuthRealm = message.getValue("realm"); mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST); + } + else if(message_name == "debug_message") + { + mDebugMessageText = message.getValue("message_text"); + mDebugMessageLevel = message.getValue("message_level"); + mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_DEBUG_MESSAGE); } else { @@ -1298,6 +1312,13 @@ void LLPluginClassMedia::setBrowserUserAgent(const std::string& user_agent) sendMessage(message); } +void LLPluginClassMedia::showWebInspector( bool show ) +{ + LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "show_web_inspector"); + message.setValueBoolean("show", true); // only open for now - closed manually by user + sendMessage(message); +} + void LLPluginClassMedia::proxyWindowOpened(const std::string &target, const std::string &uuid) { LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER, "proxy_window_opened"); diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index d32cb0afe9..1f548f8cc0 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -118,6 +118,9 @@ public: void scrollEvent(int x, int y, MASK modifiers); + // enable/disable media plugin debugging messages and info spam + void enableMediaPluginDebugging( bool enable ); + // Javascript <-> viewer events void jsEnableObject( bool enable ); void jsAgentLocationEvent( double x, double y, double z ); @@ -209,6 +212,7 @@ public: void browse_forward(); void browse_back(); void setBrowserUserAgent(const std::string& user_agent); + void showWebInspector( bool show ); void proxyWindowOpened(const std::string &target, const std::string &uuid); void proxyWindowClosed(const std::string &uuid); void ignore_ssl_cert_errors(bool ignore); @@ -244,6 +248,10 @@ public: // This is valid during MEDIA_EVENT_CLICK_LINK_HREF and MEDIA_EVENT_GEOMETRY_CHANGE std::string getClickUUID() const { return mClickUUID; }; + // These are valid during MEDIA_EVENT_DEBUG_MESSAGE + std::string getDebugMessageText() const { return mDebugMessageText; }; + std::string getDebugMessageLevel() const { return mDebugMessageLevel; }; + // This is valid after MEDIA_EVENT_NAVIGATE_ERROR_PAGE S32 getStatusCode() const { return mStatusCode; }; @@ -395,6 +403,8 @@ protected: std::string mClickNavType; std::string mClickTarget; std::string mClickUUID; + std::string mDebugMessageText; + std::string mDebugMessageLevel; S32 mGeometryX; S32 mGeometryY; S32 mGeometryWidth; diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h index 5a4fb1ce90..2f3edba7f3 100644 --- a/indra/llplugin/llpluginclassmediaowner.h +++ b/indra/llplugin/llpluginclassmediaowner.h @@ -64,6 +64,8 @@ public: MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog + MEDIA_EVENT_DEBUG_MESSAGE, // plugin sending back debug information for host to process + MEDIA_EVENT_LINK_HOVERED // Got a "link hovered" event from the plugin } EMediaEvent; |