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