| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index 86a5d31e2073c47e72ef333a56bdd18084e8d28e..0cf40d25a210cb205e1053b42aba19003b4d3e67 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -394,6 +394,8 @@ class GpuDataManagerVisualProxy : public GpuDataManagerObserver {
|
| }
|
|
|
| void OnGpuInfoUpdate() override {
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless))
|
| + return;
|
| gpu::GPUInfo gpu_info = gpu_data_manager_->GetGPUInfo();
|
| if (!ui::XVisualManager::GetInstance()->OnGPUInfoChanged(
|
| gpu_info.software_rendering ||
|
| @@ -1479,7 +1481,8 @@ bool BrowserMainLoop::InitializeToolkit() {
|
| #if defined(USE_AURA)
|
|
|
| #if defined(USE_X11)
|
| - if (!gfx::GetXDisplay()) {
|
| + if (!parsed_command_line_.HasSwitch(switches::kHeadless) &&
|
| + !gfx::GetXDisplay()) {
|
| LOG(ERROR) << "Unable to open X display.";
|
| return false;
|
| }
|
|
|