diff options
Diffstat (limited to 'chromium/content/browser/browser_main_loop.cc')
-rw-r--r-- | chromium/content/browser/browser_main_loop.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chromium/content/browser/browser_main_loop.cc b/chromium/content/browser/browser_main_loop.cc index 096a17447e4..b0c9546fdc8 100644 --- a/chromium/content/browser/browser_main_loop.cc +++ b/chromium/content/browser/browser_main_loop.cc @@ -256,6 +256,9 @@ void SetupSandbox(const base::CommandLine& parsed_command_line) { // zygote are both disabled. It initializes the sandboxed process socket. SandboxHostLinux::GetInstance()->Init(); + if (parsed_command_line.HasSwitch(switches::kSingleProcess)) + return; + if (parsed_command_line.HasSwitch(switches::kNoZygote) && !parsed_command_line.HasSwitch(switches::kNoSandbox)) { LOG(ERROR) << "--no-sandbox should be used together with --no--zygote"; @@ -498,7 +501,7 @@ class GpuDataManagerVisualProxy : public GpuDataManagerObserver { } void OnGpuInfoUpdate() override { - if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless)) + if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless) || !gfx::GetXDisplay()) return; gpu::GPUInfo gpu_info = gpu_data_manager_->GetGPUInfo(); if (!ui::XVisualManager::GetInstance()->OnGPUInfoChanged( @@ -580,7 +583,7 @@ void BrowserMainLoop::EarlyInitialization() { SetupSandbox(parsed_command_line_); #endif -#if defined(USE_X11) +#if defined(USE_X11) && !defined(TOOLKIT_QT) if (UsingInProcessGpu()) { if (!gfx::InitializeThreadedX11()) { LOG(ERROR) << "Failed to put Xlib into threaded mode."; @@ -1096,7 +1099,7 @@ int BrowserMainLoop::CreateThreads() { LOG(FATAL) << "Failed to start the browser thread: id == " << id; } else { scoped_refptr<base::SingleThreadTaskRunner> redirection_task_runner; -#if defined(OS_WIN) +#if defined(OS_WIN) && !defined(TOOLKIT_QT) // On Windows, the FILE thread needs to have a UI message loop which // pumps messages in such a way that Google Update can communicate back // to us. The COM STA task runner provides this service. @@ -1526,7 +1529,7 @@ int BrowserMainLoop::BrowserThreadsStarted() { media_stream_manager_.reset(new MediaStreamManager( audio_system_.get(), audio_manager_->GetTaskRunner())); } - +#if defined(ENABLE_WEB_SPEECH) || defined(OS_ANDROID) { TRACE_EVENT0("startup", "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition"); @@ -1534,6 +1537,7 @@ int BrowserMainLoop::BrowserThreadsStarted() { audio_system_.get(), audio_manager_.get(), media_stream_manager_.get())); } +#endif { TRACE_EVENT0( @@ -1644,7 +1648,7 @@ bool BrowserMainLoop::InitializeToolkit() { #if defined(USE_AURA) -#if defined(USE_X11) +#if defined(USE_X11) && !defined(TOOLKIT_QT) if (!parsed_command_line_.HasSwitch(switches::kHeadless) && !gfx::GetXDisplay()) { LOG(ERROR) << "Unable to open X display."; |