From 23591b8ab7917a239daa055dc862728fa8a911de Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 1 Jul 2019 17:28:58 +0300 Subject: SL-3704 Plugin exit issues --- indra/media_plugins/cef/media_plugin_cef.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp') diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 264289abac..c497a96cdc 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -246,6 +246,7 @@ void MediaPluginCEF::onRequestExitCallback() LLPluginMessage message("base", "goodbye"); sendMessage(message); + // Will trigger delete on next staticReceiveMessage() mDeleteMe = true; } @@ -442,9 +443,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string) } else if (message_name == "cleanup") { - mVolumeCatcher.setVolume(0); + mVolumeCatcher.setVolume(0); // Hack: masks CEF exit issues mCEFLib->requestExit(); } + else if (message_name == "force_exit") + { + mDeleteMe = true; + } else if (message_name == "shm_added") { SharedSegmentInfo info; -- cgit v1.2.3 From e047bb09ba7958d82c302cc0e6dcf915e1f51fc9 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 25 Jul 2019 17:50:40 +0300 Subject: SL-10962 Support for suppressing JavaScript dialogs in the media plugin code --- indra/media_plugins/cef/media_plugin_cef.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp') diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index c497a96cdc..1942b3d80c 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -72,6 +72,7 @@ private: bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password); void onCursorChangedCallback(dullahan::ECursorType type); const std::vector onFileDialog(dullahan::EFileDialogType dialog_type, const std::string dialog_title, const std::string default_file, const std::string dialog_accept_filter, bool& use_default); + bool onJSDialogCallback(const std::string origin_url, const std::string message_text, const std::string default_prompt_text); void postDebugMessage(const std::string& msg); void authResponse(LLPluginMessage &message); @@ -360,6 +361,14 @@ const std::vector MediaPluginCEF::onFileDialog(dullahan::EFileDialo return std::vector(); } +//////////////////////////////////////////////////////////////////////////////// +// +bool MediaPluginCEF::onJSDialogCallback(const std::string origin_url, const std::string message_text, const std::string default_prompt_text) +{ + // return true indicates we suppress the JavaScript alert UI entirely + return true; +} + //////////////////////////////////////////////////////////////////////////////// // void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type) @@ -506,6 +515,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnFileDialogCallback(std::bind(&MediaPluginCEF::onFileDialog, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5)); mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1)); mCEFLib->setOnRequestExitCallback(std::bind(&MediaPluginCEF::onRequestExitCallback, this)); + mCEFLib->setOnJSDialogCallback(std::bind(&MediaPluginCEF::onJSDialogCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); dullahan::dullahan_settings settings; settings.accept_language_list = mHostLanguage; -- cgit v1.2.3 From d7f73cfc5be0cf89bc7e704d3200507e55cb6e55 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 15 Oct 2019 21:15:32 +0300 Subject: Backed out changeset: eb99f42d0fdc --- indra/media_plugins/cef/media_plugin_cef.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp') diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 8ecfc2a3d9..d5a685e47f 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -71,7 +71,6 @@ private: bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password); void onCursorChangedCallback(dullahan::ECursorType type); const std::vector onFileDialog(dullahan::EFileDialogType dialog_type, const std::string dialog_title, const std::string default_file, const std::string dialog_accept_filter, bool& use_default); - bool onJSDialogCallback(const std::string origin_url, const std::string message_text, const std::string default_prompt_text); void postDebugMessage(const std::string& msg); void authResponse(LLPluginMessage &message); @@ -356,14 +355,6 @@ const std::vector MediaPluginCEF::onFileDialog(dullahan::EFileDialo return std::vector(); } -//////////////////////////////////////////////////////////////////////////////// -// -bool MediaPluginCEF::onJSDialogCallback(const std::string origin_url, const std::string message_text, const std::string default_prompt_text) -{ - // return true indicates we suppress the JavaScript alert UI entirely - return true; -} - //////////////////////////////////////////////////////////////////////////////// // void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type) @@ -509,7 +500,6 @@ void MediaPluginCEF::receiveMessage(const char* message_string) mCEFLib->setOnFileDialogCallback(std::bind(&MediaPluginCEF::onFileDialog, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5)); mCEFLib->setOnCursorChangedCallback(std::bind(&MediaPluginCEF::onCursorChangedCallback, this, std::placeholders::_1)); mCEFLib->setOnRequestExitCallback(std::bind(&MediaPluginCEF::onRequestExitCallback, this)); - mCEFLib->setOnJSDialogCallback(std::bind(&MediaPluginCEF::onJSDialogCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3)); dullahan::dullahan_settings settings; settings.accept_language_list = mHostLanguage; -- cgit v1.2.3