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 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 // them before |system_monitor_| goes away. | 1253 // them before |system_monitor_| goes away. |
1254 // On Mac and windows, the monitor needs to be destroyed on the same thread | 1254 // On Mac and windows, the monitor needs to be destroyed on the same thread |
1255 // as they were created. On Linux, the monitor will be deleted when IO thread | 1255 // as they were created. On Linux, the monitor will be deleted when IO thread |
1256 // goes away. | 1256 // goes away. |
1257 #if defined(OS_WIN) | 1257 #if defined(OS_WIN) |
1258 system_message_window_.reset(); | 1258 system_message_window_.reset(); |
1259 #elif defined(OS_MACOSX) | 1259 #elif defined(OS_MACOSX) |
1260 device_monitor_mac_.reset(); | 1260 device_monitor_mac_.reset(); |
1261 #endif | 1261 #endif |
1262 | 1262 |
| 1263 if (BrowserGpuChannelHostFactory::instance()) { |
| 1264 BrowserGpuChannelHostFactory::instance()->CloseChannel(); |
| 1265 } |
| 1266 |
1263 // Shutdown the Service Manager and IPC. | 1267 // Shutdown the Service Manager and IPC. |
1264 service_manager_context_.reset(); | 1268 service_manager_context_.reset(); |
1265 mojo_ipc_support_.reset(); | 1269 mojo_ipc_support_.reset(); |
1266 | 1270 |
1267 // Must be size_t so we can subtract from it. | 1271 // Must be size_t so we can subtract from it. |
1268 for (size_t thread_id = BrowserThread::ID_COUNT - 1; | 1272 for (size_t thread_id = BrowserThread::ID_COUNT - 1; |
1269 thread_id >= (BrowserThread::UI + 1); | 1273 thread_id >= (BrowserThread::UI + 1); |
1270 --thread_id) { | 1274 --thread_id) { |
1271 // Find the thread object we want to stop. Looping over all valid | 1275 // Find the thread object we want to stop. Looping over all valid |
1272 // BrowserThread IDs and DCHECKing on a missing case in the switch | 1276 // BrowserThread IDs and DCHECKing on a missing case in the switch |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1790 if (!audio_manager_) { | 1794 if (!audio_manager_) { |
1791 audio_thread_ = base::MakeUnique<AudioManagerThread>(); | 1795 audio_thread_ = base::MakeUnique<AudioManagerThread>(); |
1792 audio_manager_ = media::AudioManager::Create( | 1796 audio_manager_ = media::AudioManager::Create( |
1793 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), | 1797 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), |
1794 MediaInternals::GetInstance()); | 1798 MediaInternals::GetInstance()); |
1795 } | 1799 } |
1796 CHECK(audio_manager_); | 1800 CHECK(audio_manager_); |
1797 } | 1801 } |
1798 | 1802 |
1799 } // namespace content | 1803 } // namespace content |
OLD | NEW |