Add initial_mime_type param to LLFloaterWebContent, defaulted to "text/html"

This commit is contained in:
Inusaito Sayori
2013-11-26 05:13:02 -05:00
parent 4c1880acac
commit 342c812121
2 changed files with 4 additions and 2 deletions

View File

@@ -43,6 +43,7 @@
LLFloaterWebContent::_Params::_Params()
: url("url"),
target("target"),
initial_mime_type("initial_mime_type", "text/html"),
id("id"),
window_class("window_class", "web_content"),
show_chrome("show_chrome", true),
@@ -283,9 +284,9 @@ void LLFloaterWebContent::open_media(const Params& p)
{
// Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin.
LLViewerMedia::proxyWindowOpened(p.target(), p.id());
mWebBrowser->setHomePageUrl(p.url, "text/html");
mWebBrowser->setHomePageUrl(p.url, p.initial_mime_type);
mWebBrowser->setTarget(p.target);
mWebBrowser->navigateTo(p.url, "text/html");
mWebBrowser->navigateTo(p.url, p.initial_mime_type);
set_current_url(p.url);

View File

@@ -50,6 +50,7 @@ public:
{
Optional<std::string> url,
target,
initial_mime_type,
window_class,
id;
Optional<bool> show_chrome,