summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-18 15:19:24 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-18 15:19:24 -0500
commitc1b58587dfe4711383b1878d341527221d2c298f (patch)
tree4bdf329a3fa23039e5c9cbb3cca3ba005f652b57 /indra/newview/llmediactrl.cpp
parente0f5ce4ecff112857a03b5f9b61d29ef86209d24 (diff)
parentfd71944170e69b0fc47b45c385c33ef7acf4cafb (diff)
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index f32866b1fe..199bd966ef 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -95,7 +95,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mHidingInitialLoad (false),
mDecoupleTextureSize ( false ),
mTextureWidth ( 1024 ),
- mTextureHeight ( 1024 )
+ mTextureHeight ( 1024 ),
+ mClearCache(false)
{
{
LLColor4 color = p.caret_color().get();
@@ -491,6 +492,21 @@ void LLMediaCtrl::clr404RedirectUrl()
////////////////////////////////////////////////////////////////////////////////
//
+void LLMediaCtrl::clearCache()
+{
+ if(mMediaSource)
+ {
+ mMediaSource->clearCache();
+ }
+ else
+ {
+ mClearCache = true;
+ }
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type)
{
// don't browse to anything that starts with secondlife:// or sl://
@@ -617,7 +633,12 @@ bool LLMediaCtrl::ensureMediaSourceExists()
mMediaSource->setHomeURL(mHomePageUrl);
mMediaSource->setVisible( getVisible() );
mMediaSource->addObserver( this );
-
+ if(mClearCache)
+ {
+ mMediaSource->clearCache();
+ mClearCache = false;
+ }
+
if(mHideLoading)
{
mHidingInitialLoad = true;