diff options
author | Richard Linden <none@none> | 2011-03-23 19:34:15 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-03-23 19:34:15 -0700 |
commit | fdf63ba0753fcfc17aa6939836c7835787293b3c (patch) | |
tree | cd2bbbad8c1bd8b901a755b81f9cbb78f0bdee43 /indra/newview/llmediactrl.cpp | |
parent | 501e282ee03e6d53c16c421d8b49f8bed3e74ef3 (diff) | |
parent | 9c82ea334ab0c1283f28997fe060b24200e3e2be (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-social
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r-- | indra/newview/llmediactrl.cpp | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 9493fddf50..b8c61068c4 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -73,6 +73,7 @@ LLMediaCtrl::Params::Params() texture_height("texture_height", 1024), caret_color("caret_color"), initial_mime_type("initial_mime_type"), + error_page_url("error_page_url"), media_id("media_id"), trusted_content("trusted_content", false), focus_on_click("focus_on_click", true) @@ -102,6 +103,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) : mTextureHeight ( 1024 ), mClearCache(false), mHomePageMimeType(p.initial_mime_type), + mErrorPageURL(p.error_page_url), mTrusted(p.trusted_content), mWindowShade(NULL), mHoverTextChanged(false) @@ -503,22 +505,6 @@ bool LLMediaCtrl::canNavigateForward() //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::set404RedirectUrl( std::string redirect_url ) -{ - if(mMediaSource && mMediaSource->hasMedia()) - mMediaSource->getMediaPlugin()->set_status_redirect( 404, redirect_url ); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLMediaCtrl::clr404RedirectUrl() -{ - if(mMediaSource && mMediaSource->hasMedia()) - mMediaSource->getMediaPlugin()->set_status_redirect(404, ""); -} - -//////////////////////////////////////////////////////////////////////////////// -// void LLMediaCtrl::clearCache() { if(mMediaSource) @@ -626,6 +612,16 @@ void LLMediaCtrl::setTarget(const std::string& target) } } +void LLMediaCtrl::setErrorPageURL(const std::string& url) +{ + mErrorPageURL = url; +} + +const std::string& LLMediaCtrl::getErrorPageURL() +{ + return mErrorPageURL; +} + //////////////////////////////////////////////////////////////////////////////// // bool LLMediaCtrl::setCaretColor(unsigned int red, unsigned int green, unsigned int blue) @@ -976,6 +972,16 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) }; break; + case MEDIA_EVENT_NAVIGATE_ERROR_PAGE: + { + LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_ERROR_PAGE" << LL_ENDL; + if ( mErrorPageURL.length() > 0 ) + { + navigateTo(mErrorPageURL, "text/html"); + }; + }; + break; + case MEDIA_EVENT_CLICK_LINK_HREF: { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << self->getClickTarget() << "\", uri is " << self->getClickURL() << LL_ENDL; |