#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "cc/base/switches.h"
-#include "components/nacl/browser/nacl_browser.h"
-#include "components/nacl/browser/nacl_process_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "xwalk/application/browser/application_system.h"
#include "xwalk/extensions/browser/xwalk_extension_service.h"
#include "xwalk/extensions/common/xwalk_extension_switches.h"
-#include "xwalk/runtime/browser/devtools/remote_debugging_server.h"
-#include "xwalk/runtime/browser/nacl_host/nacl_browser_delegate_impl.h"
-#include "xwalk/runtime/browser/runtime.h"
-#include "xwalk/runtime/browser/runtime_context.h"
#include "xwalk/runtime/browser/xwalk_runner.h"
#include "xwalk/runtime/common/xwalk_runtime_features.h"
#include "xwalk/runtime/common/xwalk_switches.h"
+#if !defined(DISABLE_NACL)
+#include "components/nacl/browser/nacl_browser.h"
+#include "components/nacl/browser/nacl_process_host.h"
+#include "xwalk/runtime/browser/nacl_host/nacl_browser_delegate_impl.h"
+#endif
+
#if defined(USE_AURA) && defined(USE_X11)
-#include "ui/base/ime/input_method_initializer.h"
#include "ui/events/x/touch_factory_x11.h"
#endif
+#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
+#include "ui/base/ime/input_method_initializer.h"
+#endif
+
namespace {
// FIXME: Compare with method in startup_browser_creator.cc.
XWalkBrowserMainParts::XWalkBrowserMainParts(
const content::MainFunctionParams& parameters)
: xwalk_runner_(XWalkRunner::GetInstance()),
+ extension_service_(NULL),
startup_url_(url::kAboutBlankURL),
parameters_(parameters),
run_default_message_loop_(true) {
void XWalkBrowserMainParts::PreMainMessageLoopStart() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
command_line->AppendSwitch(switches::kEnableViewport);
- command_line->AppendSwitch(switches::kEnableViewportMeta);
command_line->AppendSwitch(xswitches::kEnableOverlayScrollbars);
// This also enables pinch on Tizen.
command_line->AppendSwitch(switches::kEnableThreadedCompositing);
- // Show feedback on touch.
- command_line->AppendSwitch(switches::kEnableGestureTapHighlight);
-
// FIXME: Add comment why this is needed on Android and Tizen.
command_line->AppendSwitch(switches::kAllowFileAccessFromFiles);
}
void XWalkBrowserMainParts::PreEarlyInitialization() {
-#if defined(USE_AURA) && defined(USE_X11)
- ui::InitializeInputMethodForTesting();
+#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
+ ui::InitializeInputMethodForTesting();
#endif
}
std::string port_str =
command_line->GetSwitchValueASCII(switches::kRemoteDebuggingPort);
int port;
- const char* local_ip = "0.0.0.0";
- if (base::StringToInt(port_str, &port) && port > 0 && port < 65535) {
- remote_debugging_server_.reset(
- new RemoteDebuggingServer(xwalk_runner_->runtime_context(),
- local_ip, port, std::string()));
- }
+ base::StringToInt(port_str, &port);
+ xwalk_runner_->EnableRemoteDebugging(port);
}
NativeAppWindow::Initialize();