From 1f377c6b53346b419df8874cfdf8bb4c33f7b6d5 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Thu, 17 Dec 2009 11:10:03 -0800 Subject: Made LLPanelLogin tell the browser plugin to clear its cache before opening the login screen. Added clearCache() functions to LLViewerMediaImpl and LLMediaCtrl to facilitate this. --- indra/newview/llmediactrl.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'indra/newview/llmediactrl.cpp') 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(); @@ -489,6 +490,21 @@ void LLMediaCtrl::clr404RedirectUrl() mMediaSource->getMediaPlugin()->set_status_redirect(404, ""); } +//////////////////////////////////////////////////////////////////////////////// +// +void LLMediaCtrl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clearCache(); + } + else + { + mClearCache = true; + } + +} + //////////////////////////////////////////////////////////////////////////////// // void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) @@ -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; -- cgit v1.2.3