Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2570873002: Revert of Implement a runtime headless mode for Linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/app/chrome_main.cc ('k') | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "mojo/edk/embedder/scoped_ipc_support.h" 98 #include "mojo/edk/embedder/scoped_ipc_support.h"
99 #include "net/base/network_change_notifier.h" 99 #include "net/base/network_change_notifier.h"
100 #include "net/socket/client_socket_factory.h" 100 #include "net/socket/client_socket_factory.h"
101 #include "net/ssl/ssl_config_service.h" 101 #include "net/ssl/ssl_config_service.h"
102 #include "ppapi/features/features.h" 102 #include "ppapi/features/features.h"
103 #include "services/service_manager/runner/common/client_util.h" 103 #include "services/service_manager/runner/common/client_util.h"
104 #include "skia/ext/event_tracer_impl.h" 104 #include "skia/ext/event_tracer_impl.h"
105 #include "skia/ext/skia_memory_dump_provider.h" 105 #include "skia/ext/skia_memory_dump_provider.h"
106 #include "sql/sql_memory_dump_provider.h" 106 #include "sql/sql_memory_dump_provider.h"
107 #include "ui/base/clipboard/clipboard.h" 107 #include "ui/base/clipboard/clipboard.h"
108 #include "ui/gfx/switches.h"
109 108
110 #if defined(USE_AURA) || defined(OS_MACOSX) 109 #if defined(USE_AURA) || defined(OS_MACOSX)
111 #include "content/browser/compositor/image_transport_factory.h" 110 #include "content/browser/compositor/image_transport_factory.h"
112 #endif 111 #endif
113 112
114 #if defined(USE_AURA) 113 #if defined(USE_AURA)
115 #include "content/public/browser/context_factory.h" 114 #include "content/public/browser/context_factory.h"
116 #include "ui/aura/env.h" 115 #include "ui/aura/env.h"
117 #endif 116 #endif
118 117
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 explicit GpuDataManagerVisualProxy(GpuDataManagerImpl* gpu_data_manager) 456 explicit GpuDataManagerVisualProxy(GpuDataManagerImpl* gpu_data_manager)
458 : gpu_data_manager_(gpu_data_manager) { 457 : gpu_data_manager_(gpu_data_manager) {
459 gpu_data_manager_->AddObserver(this); 458 gpu_data_manager_->AddObserver(this);
460 } 459 }
461 460
462 ~GpuDataManagerVisualProxy() override { 461 ~GpuDataManagerVisualProxy() override {
463 gpu_data_manager_->RemoveObserver(this); 462 gpu_data_manager_->RemoveObserver(this);
464 } 463 }
465 464
466 void OnGpuInfoUpdate() override { 465 void OnGpuInfoUpdate() override {
467 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kHeadless))
468 return;
469 gpu::GPUInfo gpu_info = gpu_data_manager_->GetGPUInfo(); 466 gpu::GPUInfo gpu_info = gpu_data_manager_->GetGPUInfo();
470 if (!ui::XVisualManager::GetInstance()->OnGPUInfoChanged( 467 if (!ui::XVisualManager::GetInstance()->OnGPUInfoChanged(
471 gpu_info.software_rendering || 468 gpu_info.software_rendering ||
472 !gpu_data_manager_->GpuAccessAllowed(nullptr), 469 !gpu_data_manager_->GpuAccessAllowed(nullptr),
473 gpu_info.system_visual, gpu_info.rgba_visual)) { 470 gpu_info.system_visual, gpu_info.rgba_visual)) {
474 // The GPU process sent back bad visuals, which should never happen. 471 // The GPU process sent back bad visuals, which should never happen.
475 auto* gpu_process_host = GpuProcessHost::Get( 472 auto* gpu_process_host = GpuProcessHost::Get(
476 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false); 473 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false);
477 if (gpu_process_host) 474 if (gpu_process_host)
478 gpu_process_host->ForceShutdown(); 475 gpu_process_host->ForceShutdown();
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 INITCOMMONCONTROLSEX config; 1562 INITCOMMONCONTROLSEX config;
1566 config.dwSize = sizeof(config); 1563 config.dwSize = sizeof(config);
1567 config.dwICC = ICC_WIN95_CLASSES; 1564 config.dwICC = ICC_WIN95_CLASSES;
1568 if (!InitCommonControlsEx(&config)) 1565 if (!InitCommonControlsEx(&config))
1569 PLOG(FATAL); 1566 PLOG(FATAL);
1570 #endif 1567 #endif
1571 1568
1572 #if defined(USE_AURA) 1569 #if defined(USE_AURA)
1573 1570
1574 #if defined(USE_X11) 1571 #if defined(USE_X11)
1575 if (!parsed_command_line_.HasSwitch(switches::kHeadless) && 1572 if (!gfx::GetXDisplay()) {
1576 !gfx::GetXDisplay()) {
1577 LOG(ERROR) << "Unable to open X display."; 1573 LOG(ERROR) << "Unable to open X display.";
1578 return false; 1574 return false;
1579 } 1575 }
1580 #endif 1576 #endif
1581 1577
1582 // Env creates the compositor. Aura widgets need the compositor to be created 1578 // Env creates the compositor. Aura widgets need the compositor to be created
1583 // before they can be initialized by the browser. 1579 // before they can be initialized by the browser.
1584 env_ = aura::Env::CreateInstance(parameters_.env_mode); 1580 env_ = aura::Env::CreateInstance(parameters_.env_mode);
1585 #endif // defined(USE_AURA) 1581 #endif // defined(USE_AURA)
1586 1582
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 if (!audio_manager_) { 1701 if (!audio_manager_) {
1706 audio_thread_ = base::MakeUnique<AudioDeviceThread>(); 1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>();
1707 audio_manager_ = media::AudioManager::Create( 1703 audio_manager_ = media::AudioManager::Create(
1708 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(), 1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(),
1709 MediaInternals::GetInstance()); 1705 MediaInternals::GetInstance());
1710 } 1706 }
1711 CHECK(audio_manager_); 1707 CHECK(audio_manager_);
1712 } 1708 }
1713 1709
1714 } // namespace content 1710 } // namespace content
OLDNEW
« no previous file with comments | « chrome/app/chrome_main.cc ('k') | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698