summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-01-15 16:55:04 -0500
committerOz Linden <oz@lindenlab.com>2016-01-15 16:55:04 -0500
commitbc22e587439a2822e5228508e7a4a1e2ec0121c5 (patch)
tree442540d0c2760617a2c0cf0cb9ba1973ab6fb298 /indra/newview/llmediactrl.cpp
parent317644f5d575ecd4e734c9a5327f2a062ebf914a (diff)
parent5a5c023e291990a463b1a91846ce82c70da8daab (diff)
merge changes for 4.0.1-release
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp65
1 files changed, 52 insertions, 13 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 73faed7ef5..9cf3249983 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -57,6 +57,7 @@
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "lllineeditor.h"
#include "llfloaterwebcontent.h"
#include "llwindowshade.h"
@@ -428,6 +429,23 @@ BOOL LLMediaCtrl::handleKeyHere( KEY key, MASK mask )
////////////////////////////////////////////////////////////////////////////////
//
+BOOL LLMediaCtrl::handleKeyUpHere(KEY key, MASK mask)
+{
+ BOOL result = FALSE;
+
+ if (mMediaSource)
+ {
+ result = mMediaSource->handleKeyUpHere(key, mask);
+ }
+
+ if (!result)
+ result = LLPanel::handleKeyUpHere(key, mask);
+
+ return result;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
void LLMediaCtrl::onVisibilityChange ( BOOL new_visibility )
{
LL_INFOS() << "visibility changed to " << (new_visibility?"true":"false") << LL_ENDL;
@@ -989,19 +1007,23 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
std::string uuid = self->getClickUUID();
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << target << "\", uri is " << url << LL_ENDL;
- LLNotification::Params notify_params;
- notify_params.name = "PopupAttempt";
- notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", mMediaTextureID);
- notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2);
-
- if (mTrusted)
- {
- LLNotifications::instance().forceResponse(notify_params, 0);
- }
- else
- {
- LLNotifications::instance().add(notify_params);
- }
+ LLWeb::loadURL(url, target, std::string());
+
+ // CP: removing this code because we no longer support popups so this breaks the flow.
+ // replaced with a bare call to LLWeb::LoadURL(...)
+ //LLNotification::Params notify_params;
+ //notify_params.name = "PopupAttempt";
+ //notify_params.payload = LLSD().with("target", target).with("url", url).with("uuid", uuid).with("media_id", mMediaTextureID);
+ //notify_params.functor.function = boost::bind(&LLMediaCtrl::onPopup, this, _1, _2);
+
+ //if (mTrusted)
+ //{
+ // LLNotifications::instance().forceResponse(notify_params, 0);
+ //}
+ //else
+ //{
+ // LLNotifications::instance().add(notify_params);
+ //}
break;
};
@@ -1072,6 +1094,13 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
};
break;
+ case MEDIA_EVENT_FILE_DOWNLOAD:
+ {
+ //llinfos << "Media event - file download requested - filename is " << self->getFileDownloadFilename() << llendl;
+ //LLNotificationsUtil::add("MediaFileDownloadUnsupported");
+ };
+ break;
+
case MEDIA_EVENT_DEBUG_MESSAGE:
{
LL_INFOS("media") << self->getDebugMessageText() << LL_ENDL;
@@ -1150,3 +1179,13 @@ void LLMediaCtrl::updateContextMenuParent(LLView* pNewParent)
{
mContextMenu->updateParent(pNewParent);
}
+
+bool LLMediaCtrl::wantsKeyUpKeyDown() const
+{
+ return true;
+}
+
+bool LLMediaCtrl::wantsReturnKey() const
+{
+ return true;
+}