summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-08-02 14:52:09 -0700
committerRichard Nelson <none@none>2010-08-02 14:52:09 -0700
commitbd20eddd4ecf185d0fe2ff2dc498809ad104cfcc (patch)
tree813ae0c48288f3f860529d82e6264537058ec6a2 /indra/newview/llmediactrl.cpp
parent3c27e119b4c2e10faa331e0724bde56c87234024 (diff)
EXT-8540 - Implement mime type override for web_browser ctrl
reviewed by Monroe
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 7a4ed74c4c..d6d128eb29 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -67,7 +67,8 @@ LLMediaCtrl::Params::Params()
decouple_texture_size("decouple_texture_size", false),
texture_width("texture_width", 1024),
texture_height("texture_height", 1024),
- caret_color("caret_color")
+ caret_color("caret_color"),
+ initial_mime_type("initial_mime_type")
{
tab_stop(false);
}
@@ -92,7 +93,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
mDecoupleTextureSize ( false ),
mTextureWidth ( 1024 ),
mTextureHeight ( 1024 ),
- mClearCache(false)
+ mClearCache(false),
+ mHomePageMimeType(p.initial_mime_type)
{
{
LLColor4 color = p.caret_color().get();
@@ -101,7 +103,7 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
setIgnoreUIScale(p.ignore_ui_scale);
- setHomePageUrl(p.start_url);
+ setHomePageUrl(p.start_url, p.initial_mime_type);
setBorderVisible(p.border_visible);
@@ -567,12 +569,12 @@ void LLMediaCtrl::navigateHome()
////////////////////////////////////////////////////////////////////////////////
//
-void LLMediaCtrl::setHomePageUrl( const std::string urlIn )
+void LLMediaCtrl::setHomePageUrl( const std::string& urlIn, const std::string& mime_type )
{
mHomePageUrl = urlIn;
if (mMediaSource)
{
- mMediaSource->setHomeURL(mHomePageUrl);
+ mMediaSource->setHomeURL(mHomePageUrl, mime_type);
}
}
@@ -616,7 +618,7 @@ bool LLMediaCtrl::ensureMediaSourceExists()
if ( mMediaSource )
{
mMediaSource->setUsedInUI(true);
- mMediaSource->setHomeURL(mHomePageUrl);
+ mMediaSource->setHomeURL(mHomePageUrl, mHomePageMimeType);
mMediaSource->setVisible( getVisible() );
mMediaSource->addObserver( this );
mMediaSource->setBackgroundColor( getBackgroundColor() );