From 531b77a9485db77df31a25a766e66ec1443a49f6 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 15 Sep 2010 14:39:42 -0700 Subject: 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. --- indra/newview/llmediactrl.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llmediactrl.cpp') 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. -- cgit v1.2.3