Add initial_mime_type param to LLFloaterWebContent, defaulted to "text/html"
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
LLFloaterWebContent::_Params::_Params()
|
LLFloaterWebContent::_Params::_Params()
|
||||||
: url("url"),
|
: url("url"),
|
||||||
target("target"),
|
target("target"),
|
||||||
|
initial_mime_type("initial_mime_type", "text/html"),
|
||||||
id("id"),
|
id("id"),
|
||||||
window_class("window_class", "web_content"),
|
window_class("window_class", "web_content"),
|
||||||
show_chrome("show_chrome", true),
|
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.
|
// 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());
|
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->setTarget(p.target);
|
||||||
mWebBrowser->navigateTo(p.url, "text/html");
|
mWebBrowser->navigateTo(p.url, p.initial_mime_type);
|
||||||
|
|
||||||
set_current_url(p.url);
|
set_current_url(p.url);
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ public:
|
|||||||
{
|
{
|
||||||
Optional<std::string> url,
|
Optional<std::string> url,
|
||||||
target,
|
target,
|
||||||
|
initial_mime_type,
|
||||||
window_class,
|
window_class,
|
||||||
id;
|
id;
|
||||||
Optional<bool> show_chrome,
|
Optional<bool> show_chrome,
|
||||||
|
|||||||
Reference in New Issue
Block a user