diff options
Diffstat (limited to 'indra/llplugin')
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 12 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 4 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmediaowner.h | 1 | 
3 files changed, 16 insertions, 1 deletions
| diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 4f45f95e85..06ed632da8 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -669,6 +669,18 @@ F64 LLPluginClassMedia::getCPUUsage()  	return result;  } +void LLPluginClassMedia::sendPickFileResponse(const std::string &file) +{ +	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "pick_file_response"); +	message.setValue("file", file); +	if(mPlugin->isBlocked()) +	{ +		// If the plugin sent a blocking pick-file request, the response should unblock it. +		message.setValueBoolean("blocking_response", true); +	} +	sendMessage(message); +} +  void LLPluginClassMedia::cut()  {  	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "edit_cut"); diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index ee53f3a4da..eaafbfe389 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -156,6 +156,8 @@ public:  	void setLowPrioritySizeLimit(int size);  	F64 getCPUUsage(); +	 +	void sendPickFileResponse(const std::string &file);  	// Valid after a MEDIA_EVENT_CURSOR_CHANGED event  	std::string getCursorName() const { return mCursorName; }; @@ -176,7 +178,7 @@ public:  	void	setLanguageCode(const std::string &language_code);  	void	setPluginsEnabled(const bool enabled);  	void	setJavascriptEnabled(const bool enabled); -		 +	  	///////////////////////////////////  	// media browser class functions  	bool pluginSupportsMediaBrowser(void); diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h index 8a19e7530e..e60c85737f 100644 --- a/indra/llplugin/llpluginclassmediaowner.h +++ b/indra/llplugin/llpluginclassmediaowner.h @@ -55,6 +55,7 @@ public:  		MEDIA_EVENT_CLICK_LINK_HREF,		// I'm not entirely sure what the semantics of these two are  		MEDIA_EVENT_CLICK_LINK_NOFOLLOW,  		MEDIA_EVENT_CLOSE_REQUEST,			// The plugin requested its window be closed (currently hooked up to javascript window.close in webkit) +		MEDIA_EVENT_PICK_FILE_REQUEST,		// The plugin wants the user to pick a file  		MEDIA_EVENT_PLUGIN_FAILED_LAUNCH,	// The plugin failed to launch   		MEDIA_EVENT_PLUGIN_FAILED			// The plugin died unexpectedly | 
