OLD | NEW |
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 Loading... |
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" // nogncheck |
| 196 #endif |
| 197 |
| 198 |
194 // One of the linux specific headers defines this as a macro. | 199 // One of the linux specific headers defines this as a macro. |
195 #ifdef DestroyAll | 200 #ifdef DestroyAll |
196 #undef DestroyAll | 201 #undef DestroyAll |
197 #endif | 202 #endif |
198 | 203 |
199 namespace content { | 204 namespace content { |
200 namespace { | 205 namespace { |
201 | 206 |
202 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 207 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
203 void SetupSandbox(const base::CommandLine& parsed_command_line) { | 208 void SetupSandbox(const base::CommandLine& parsed_command_line) { |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 | 1169 |
1165 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( | 1170 mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( |
1166 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) | 1171 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO) |
1167 ->task_runner())); | 1172 ->task_runner())); |
1168 | 1173 |
1169 mojo_shell_context_.reset(new MojoShellContext); | 1174 mojo_shell_context_.reset(new MojoShellContext); |
1170 if (shell::ShellIsRemote()) { | 1175 if (shell::ShellIsRemote()) { |
1171 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | 1176 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) |
1172 // TODO(rockot): Remove the blocking wait for init. | 1177 // TODO(rockot): Remove the blocking wait for init. |
1173 // http://crbug.com/594852. | 1178 // http://crbug.com/594852. |
1174 if (MojoShellConnection::GetForProcess()) | 1179 auto connection = MojoShellConnection::GetForProcess(); |
| 1180 if (connection) { |
1175 WaitForMojoShellInitialize(); | 1181 WaitForMojoShellInitialize(); |
| 1182 mus::GpuService::Initialize(connection->GetConnector()); |
| 1183 } |
1176 #endif | 1184 #endif |
1177 } | 1185 } |
1178 | 1186 |
1179 #if defined(OS_MACOSX) | 1187 #if defined(OS_MACOSX) |
1180 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); | 1188 mojo::edk::SetMachPortProvider(MachBroker::GetInstance()); |
1181 #endif // defined(OS_MACOSX) | 1189 #endif // defined(OS_MACOSX) |
1182 | 1190 |
1183 indexed_db_thread_.reset(new base::Thread("IndexedDB")); | 1191 indexed_db_thread_.reset(new base::Thread("IndexedDB")); |
1184 indexed_db_thread_->Start(); | 1192 indexed_db_thread_->Start(); |
1185 | 1193 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1504 std::move(worker_task_runner), | 1512 std::move(worker_task_runner), |
1505 MediaInternals::GetInstance()); | 1513 MediaInternals::GetInstance()); |
1506 } | 1514 } |
1507 CHECK(audio_manager_); | 1515 CHECK(audio_manager_); |
1508 | 1516 |
1509 if (use_hang_monitor) | 1517 if (use_hang_monitor) |
1510 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); | 1518 media::AudioManager::StartHangMonitor(io_thread_->task_runner()); |
1511 } | 1519 } |
1512 | 1520 |
1513 } // namespace content | 1521 } // namespace content |
OLD | NEW |