summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-08-17 17:56:54 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-08-17 17:56:54 -0700
commita2657be5782f20c3cbab542b5a3775d78e21cdfa (patch)
tree7527b34a8c88ef844c6e0a95b20af5666a7f0e86 /indra/newview
parent5ed8b55283e93a0487f3056789102a8dcdd7db3a (diff)
Viewer side changes to support javascript window.close handling.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermediabrowser.cpp5
-rw-r--r--indra/newview/llmediactrl.cpp6
-rw-r--r--indra/newview/llviewerparcelmedia.cpp6
3 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llfloatermediabrowser.cpp b/indra/newview/llfloatermediabrowser.cpp
index ad996b5dc8..bf797fdc95 100644
--- a/indra/newview/llfloatermediabrowser.cpp
+++ b/indra/newview/llfloatermediabrowser.cpp
@@ -223,6 +223,11 @@ void LLFloaterMediaBrowser::handleMediaEvent(LLPluginClassMedia* self, EMediaEve
getChildView("back")->setEnabled(self->getHistoryBackAvailable());
getChildView("forward")->setEnabled(self->getHistoryForwardAvailable());
}
+ else if(event == MEDIA_EVENT_CLOSE_REQUEST)
+ {
+ // The browser instance wants its window closed.
+ closeFloater();
+ }
}
void LLFloaterMediaBrowser::setCurrentURL(const std::string& url)
{
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index d6d128eb29..0739125081 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -956,6 +956,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAME_CHANGED" << LL_ENDL;
};
break;
+
+ case MEDIA_EVENT_CLOSE_REQUEST:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLOSE_REQUEST" << LL_ENDL;
+ }
+ break;
};
// chain all events to any potential observers of this object.
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 202f8822e3..e1d88c799b 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -574,6 +574,12 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAME_CHANGED" << LL_ENDL;
};
break;
+
+ case MEDIA_EVENT_CLOSE_REQUEST:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLOSE_REQUEST" << LL_ENDL;
+ }
+ break;
};
}