diff options
author | Monroe Linden <monroe@lindenlab.com> | 2009-12-17 11:10:03 -0800 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2009-12-17 11:10:03 -0800 |
commit | 1f377c6b53346b419df8874cfdf8bb4c33f7b6d5 (patch) | |
tree | a0ad729d329063101f0674ad5242de396ea9b83e /indra/newview/llviewermedia.cpp | |
parent | 0084d969ae717bddb03bc4943e971d672b893733 (diff) |
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.
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 103a70e032..7bcc601705 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -929,6 +929,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mMimeTypeProbe(NULL), mMediaAutoPlay(false), mInNearbyMediaList(false), + mClearCache(false), mIsUpdated(false) { @@ -1139,6 +1140,12 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->setBrowserUserAgent(LLViewerMedia::getCurrentUserAgent()); media_source->focus(mHasFocus); + if(mClearCache) + { + mClearCache = false; + media_source->clear_cache(); + } + mMediaSource = media_source; updateVolume(); @@ -1352,6 +1359,19 @@ std::string LLViewerMediaImpl::getCurrentMediaURL() } ////////////////////////////////////////////////////////////////////////////////////////// +void LLViewerMediaImpl::clearCache() +{ + if(mMediaSource) + { + mMediaSource->clear_cache(); + } + else + { + mClearCache = true; + } +} + +////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::mouseDown(S32 x, S32 y, MASK mask, S32 button) { scaleMouse(&x, &y); |