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