summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-09-15 14:39:42 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-09-15 14:39:42 -0700
commit531b77a9485db77df31a25a766e66ec1443a49f6 (patch)
treeca204491eff61be4da4c744696fdb0cf195aa75c /indra/newview/llmediactrl.cpp
parent238cbcd7900615a22db629ed0032acab06220b68 (diff)
Enable web popups to specify size and position of the Media Browser window from javascript.
This includes a Mac build of llqtwebkit from the following sources: revision aacdf69cbf5aa12d77c179296e31ef643ed1ef4a of http://qt.gitorious.org/+lindenqt/qt/lindenqt (currently head of the 'lindenqt' branch) revision 81ab5ae326f0 of http://hg.secondlife.com/llqtwebkit (currently head of the default branch) Reviewed by Callum.
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 1de249a3c1..635ceb8380 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -572,6 +572,15 @@ void LLMediaCtrl::setHomePageUrl( const std::string& urlIn, const std::string& m
}
}
+void LLMediaCtrl::setTarget(const std::string& target)
+{
+ mTarget = target;
+ if (mMediaSource)
+ {
+ mMediaSource->setTarget(mTarget);
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
//
bool LLMediaCtrl::setCaretColor(unsigned int red, unsigned int green, unsigned int blue)
@@ -613,6 +622,7 @@ bool LLMediaCtrl::ensureMediaSourceExists()
{
mMediaSource->setUsedInUI(true);
mMediaSource->setHomeURL(mHomePageUrl, mHomePageMimeType);
+ mMediaSource->setTarget(mTarget);
mMediaSource->setVisible( getVisible() );
mMediaSource->addObserver( this );
mMediaSource->setBackgroundColor( getBackgroundColor() );
@@ -962,6 +972,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_PICK_FILE_REQUEST" << LL_ENDL;
}
break;
+
+ case MEDIA_EVENT_GEOMETRY_CHANGE:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_GEOMETRY_CHANGE, uuid is " << self->getClickUUID() << LL_ENDL;
+ }
+ break;
};
// chain all events to any potential observers of this object.