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

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

Issue 2087333002: mus::GpuService: Support establish GpuChannel asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months 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
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 #endif 184 #endif
185 185
186 #if defined(USE_NSS_CERTS) 186 #if defined(USE_NSS_CERTS)
187 #include "crypto/nss_util.h" 187 #include "crypto/nss_util.h"
188 #endif 188 #endif
189 189
190 #if defined(ENABLE_VULKAN) 190 #if defined(ENABLE_VULKAN)
191 #include "gpu/vulkan/vulkan_implementation.h" 191 #include "gpu/vulkan/vulkan_implementation.h"
192 #endif 192 #endif
193 193
194 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
195 #include "components/mus/common/gpu_service.h"
196 #endif
197
194 // One of the linux specific headers defines this as a macro. 198 // One of the linux specific headers defines this as a macro.
195 #ifdef DestroyAll 199 #ifdef DestroyAll
196 #undef DestroyAll 200 #undef DestroyAll
197 #endif 201 #endif
198 202
199 namespace content { 203 namespace content {
200 namespace { 204 namespace {
201 205
202 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 206 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
203 void SetupSandbox(const base::CommandLine& parsed_command_line) { 207 void SetupSandbox(const base::CommandLine& parsed_command_line) {
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 1168
1165 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( 1169 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
1166 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) 1170 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
1167 ->task_runner())); 1171 ->task_runner()));
1168 1172
1169 mojo_shell_context_.reset(new MojoShellContext); 1173 mojo_shell_context_.reset(new MojoShellContext);
1170 if (shell::ShellIsRemote()) { 1174 if (shell::ShellIsRemote()) {
1171 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) 1175 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
1172 // TODO(rockot): Remove the blocking wait for init. 1176 // TODO(rockot): Remove the blocking wait for init.
1173 // http://crbug.com/594852. 1177 // http://crbug.com/594852.
1174 if (MojoShellConnection::GetForProcess()) 1178 auto connection = MojoShellConnection::GetForProcess();
1179 if (connection) {
1175 WaitForMojoShellInitialize(); 1180 WaitForMojoShellInitialize();
1181 mus::GpuService::Initialize(connection->GetConnector());
1182 }
1176 #endif 1183 #endif
1177 } 1184 }
1178 1185
1179 #if defined(OS_MACOSX) 1186 #if defined(OS_MACOSX)
1180 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); 1187 mojo::edk::SetMachPortProvider(MachBroker::GetInstance());
1181 #endif // defined(OS_MACOSX) 1188 #endif // defined(OS_MACOSX)
1182 1189
1183 indexed_db_thread_.reset(new base::Thread("IndexedDB")); 1190 indexed_db_thread_.reset(new base::Thread("IndexedDB"));
1184 indexed_db_thread_->Start(); 1191 indexed_db_thread_->Start();
1185 1192
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 std::move(worker_task_runner), 1511 std::move(worker_task_runner),
1505 MediaInternals::GetInstance()); 1512 MediaInternals::GetInstance());
1506 } 1513 }
1507 CHECK(audio_manager_); 1514 CHECK(audio_manager_);
1508 1515
1509 if (use_hang_monitor) 1516 if (use_hang_monitor)
1510 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); 1517 media::AudioManager::StartHangMonitor(io_thread_->task_runner());
1511 } 1518 }
1512 1519
1513 } // namespace content 1520 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698