namespace xswitches {
// Redefine settings not exposed by content module.
-const char kEnableViewport[] = "enable-viewport";
const char kEnableOverlayScrollbars[] = "enable-overlay-scrollbars";
}
void XWalkBrowserMainParts::PreMainMessageLoopStart() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
- command_line->AppendSwitch(xswitches::kEnableViewport);
+ command_line->AppendSwitch(switches::kEnableViewport);
+ command_line->AppendSwitch(switches::kEnableViewportMeta);
command_line->AppendSwitch(xswitches::kEnableOverlayScrollbars);
// FIXME: Add comment why this is needed on Android and Tizen.
command_line->AppendSwitch(switches::kAllowFileAccessFromFiles);
+ // Enable SIMD.JS API by default.
+ std::string js_flags("--simd_object");
+ if (command_line->HasSwitch(switches::kJavaScriptFlags)) {
+ js_flags += " ";
+ js_flags +=
+ command_line->GetSwitchValueASCII(switches::kJavaScriptFlags);
+ }
+ command_line->AppendSwitchASCII(switches::kJavaScriptFlags, js_flags);
+
startup_url_ = GetURLFromCommandLine(*command_line);
}
void XWalkBrowserMainParts::PreMainMessageLoopRun() {
xwalk_runner_->PreMainMessageLoopRun();
- runtime_context_ = xwalk_runner_->runtime_context();
extension_service_ = xwalk_runner_->extension_service();
if (extension_service_)
const char* local_ip = "0.0.0.0";
if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
remote_debugging_server_.reset(
- new RemoteDebuggingServer(runtime_context_,
+ new RemoteDebuggingServer(xwalk_runner_->runtime_context(),
local_ip, port, std::string()));
}
}