summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2021-05-18 08:45:57 -0700
committerCallum Prentice <callum@lindenlab.com>2021-05-18 08:45:57 -0700
commitc308c1cf5987fcca5614d472d3098d5075cbd678 (patch)
treee229ffba27e4abaff07bae4ec58e5b0bbfdcfc2d /indra/media_plugins
parentc705126d0be0b6a60d0e8e23bf8919e08e0db967 (diff)
Pull in updated Dullahan and use it for for: Fix SL-14888 Media on a Prim should not show JS (about to unload) popups
Diffstat (limited to 'indra/media_plugins')
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 181355d395..8c1855d5cb 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -73,6 +73,7 @@ private:
void onCursorChangedCallback(dullahan::ECursorType type);
const std::vector<std::string> 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);
+ bool onJSBeforeUnloadCallback();
void postDebugMessage(const std::string& msg);
void authResponse(LLPluginMessage &message);
@@ -377,6 +378,14 @@ bool MediaPluginCEF::onJSDialogCallback(const std::string origin_url, const std:
////////////////////////////////////////////////////////////////////////////////
//
+bool MediaPluginCEF::onJSBeforeUnloadCallback()
+{
+ // return true indicates we suppress the JavaScript UI entirely
+ return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
void MediaPluginCEF::onCursorChangedCallback(dullahan::ECursorType type)
{
std::string name = "";
@@ -523,6 +532,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
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));
+ mCEFLib->setOnJSBeforeUnloadCallback(std::bind(&MediaPluginCEF::onJSBeforeUnloadCallback, this));
dullahan::dullahan_settings settings;
#if LL_WINDOWS