diff options
| author | Monroe Linden <monroe@lindenlab.com> | 2010-11-16 17:01:44 -0800 | 
|---|---|---|
| committer | Monroe Linden <monroe@lindenlab.com> | 2010-11-16 17:01:44 -0800 | 
| commit | df8b87435f7443caed5779ef36875004bcfab425 (patch) | |
| tree | 69bd65b8ddf8abe39daa1da8379d3cd2ff76aff4 /indra/llplugin | |
| parent | 5397edebbccd2df41db51804c4e2fa529ac96132 (diff) | |
SOCIAL-266 WIP HTTP AUTH dialogs no longer work in LLQtWebKit 4.7.1
Added support to the webkit media plugin and llpluginclassmedia for passing through the auth request/response.  We still need an updated build of llqtwebkit for all platforms, as well as some UI work in the viewer to actually display the auth dialog.
Diffstat (limited to 'indra/llplugin')
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 20 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmedia.h | 8 | ||||
| -rw-r--r-- | indra/llplugin/llpluginclassmediaowner.h | 4 | 
3 files changed, 31 insertions, 1 deletions
| diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 446df646fc..cd0689caa6 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -682,6 +682,20 @@ void LLPluginClassMedia::sendPickFileResponse(const std::string &file)  	sendMessage(message);  } +void LLPluginClassMedia::sendAuthResponse(bool ok, const std::string &username, const std::string &password) +{ +	LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "auth_response"); +	message.setValueBoolean("ok", ok); +	message.setValue("username", username); +	message.setValue("password", password); +	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"); @@ -947,6 +961,12 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)  		{  			mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_PICK_FILE_REQUEST);  		} +		else if(message_name == "auth_request") +		{ +			mAuthURL = message.getValue("url"); +			mAuthRealm = message.getValue("realm"); +			mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST); +		}  		else  		{  			LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL; diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h index 938e5c1bf6..2b8a7238b5 100644 --- a/indra/llplugin/llpluginclassmedia.h +++ b/indra/llplugin/llpluginclassmedia.h @@ -159,6 +159,8 @@ public:  	void sendPickFileResponse(const std::string &file); +	void sendAuthResponse(bool ok, const std::string &username, const std::string &password); +  	// Valid after a MEDIA_EVENT_CURSOR_CHANGED event  	std::string getCursorName() const { return mCursorName; }; @@ -232,6 +234,10 @@ public:  	S32 getGeometryY() const { return mGeometryY; };  	S32 getGeometryWidth() const { return mGeometryWidth; };  	S32 getGeometryHeight() const { return mGeometryHeight; }; +	 +	// These are valid during MEDIA_EVENT_AUTH_REQUEST +	std::string	getAuthURL() const { return mAuthURL; }; +	std::string	getAuthRealm() const { return mAuthRealm; };  	std::string getMediaName() const { return mMediaName; };  	std::string getMediaDescription() const { return mMediaDescription; }; @@ -370,6 +376,8 @@ protected:  	S32				mGeometryY;  	S32				mGeometryWidth;  	S32				mGeometryHeight; +	std::string		mAuthURL; +	std::string		mAuthRealm;  	/////////////////////////////////////////  	// media_time class diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h index c9efff216c..42a89baebc 100644 --- a/indra/llplugin/llpluginclassmediaowner.h +++ b/indra/llplugin/llpluginclassmediaowner.h @@ -59,7 +59,9 @@ public:  		MEDIA_EVENT_GEOMETRY_CHANGE,		// The plugin requested its window geometry be changed (per the javascript window interface)  		MEDIA_EVENT_PLUGIN_FAILED_LAUNCH,	// The plugin failed to launch  -		MEDIA_EVENT_PLUGIN_FAILED			// The plugin died unexpectedly +		MEDIA_EVENT_PLUGIN_FAILED,			// The plugin died unexpectedly + +		MEDIA_EVENT_AUTH_REQUEST			// The plugin wants to display an auth dialog  	} EMediaEvent; | 
