diff options
Diffstat (limited to 'indra/media_plugins')
| -rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 17 | ||||
| -rw-r--r-- | indra/media_plugins/example/media_plugin_example.cpp | 4 | ||||
| -rw-r--r-- | indra/media_plugins/libvlc/media_plugin_libvlc.cpp | 4 | 
3 files changed, 24 insertions, 1 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index eead92fd8e..8ecfc2a3d9 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -71,6 +71,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<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);  	void postDebugMessage(const std::string& msg);  	void authResponse(LLPluginMessage &message); @@ -241,6 +242,7 @@ void MediaPluginCEF::onRequestExitCallback()  	LLPluginMessage message("base", "goodbye");  	sendMessage(message); +	// Will trigger delete on next staticReceiveMessage()  	mDeleteMe = true;  } @@ -356,6 +358,14 @@ const std::vector<std::string> MediaPluginCEF::onFileDialog(dullahan::EFileDialo  ////////////////////////////////////////////////////////////////////////////////  // +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)  {  	std::string name = ""; @@ -437,9 +447,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; @@ -495,6 +509,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; diff --git a/indra/media_plugins/example/media_plugin_example.cpp b/indra/media_plugins/example/media_plugin_example.cpp index c296a0413d..650685fb94 100644 --- a/indra/media_plugins/example/media_plugin_example.cpp +++ b/indra/media_plugins/example/media_plugin_example.cpp @@ -128,6 +128,10 @@ void mediaPluginExample::receiveMessage(const char* message_string)  				mDeleteMe = true;  			} +			else if (message_name == "force_exit") +			{ +				mDeleteMe = true; +			}  			else if (message_name == "shm_added")  			{  				SharedSegmentInfo info; diff --git a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp index 80702a1079..f7d35b33c2 100644 --- a/indra/media_plugins/libvlc/media_plugin_libvlc.cpp +++ b/indra/media_plugins/libvlc/media_plugin_libvlc.cpp @@ -495,6 +495,10 @@ void MediaPluginLibVLC::receiveMessage(const char* message_string)  			{  				resetVLC();  			} +			else if (message_name == "force_exit") +			{ +				mDeleteMe = true; +			}  			else if (message_name == "shm_added")  			{  				SharedSegmentInfo info;  | 
