| 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 } | 1157 } |
| 1158 | 1158 |
| 1159 // Must happen after the I/O thread is shutdown since this class lives on the | 1159 // Must happen after the I/O thread is shutdown since this class lives on the |
| 1160 // I/O thread and isn't threadsafe. | 1160 // I/O thread and isn't threadsafe. |
| 1161 { | 1161 { |
| 1162 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); | 1162 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); |
| 1163 GamepadService::GetInstance()->Terminate(); | 1163 GamepadService::GetInstance()->Terminate(); |
| 1164 } | 1164 } |
| 1165 { | 1165 { |
| 1166 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:SensorService"); | 1166 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:SensorService"); |
| 1167 DeviceSensorService::GetInstance()->Shutdown(); | 1167 DeviceSensorService::GetInstance()->ShutDownOnUIThread(); |
| 1168 } | 1168 } |
| 1169 #if !defined(OS_ANDROID) | 1169 #if !defined(OS_ANDROID) |
| 1170 { | 1170 { |
| 1171 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:BatteryStatusService"); | 1171 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:BatteryStatusService"); |
| 1172 device::BatteryStatusService::GetInstance()->Shutdown(); | 1172 device::BatteryStatusService::GetInstance()->Shutdown(); |
| 1173 } | 1173 } |
| 1174 #endif | 1174 #endif |
| 1175 { | 1175 { |
| 1176 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); | 1176 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); |
| 1177 URLDataManager::DeleteDataSources(); | 1177 URLDataManager::DeleteDataSources(); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 | 1335 |
| 1336 { | 1336 { |
| 1337 TRACE_EVENT0("startup", | 1337 TRACE_EVENT0("startup", |
| 1338 "BrowserMainLoop::BrowserThreadsStarted::TimeZoneMonitor"); | 1338 "BrowserMainLoop::BrowserThreadsStarted::TimeZoneMonitor"); |
| 1339 time_zone_monitor_ = | 1339 time_zone_monitor_ = |
| 1340 device::TimeZoneMonitor::Create(file_thread_->task_runner()); | 1340 device::TimeZoneMonitor::Create(file_thread_->task_runner()); |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 { | 1343 { |
| 1344 TRACE_EVENT0("startup", | 1344 TRACE_EVENT0("startup", |
| 1345 "BrowserMainLoop::BrowserThreadsStarted::SaveFileManager"); | 1345 "BrowserMainLoop::BrowserThreadsStarted::SaveFileManager"); |
| 1346 save_file_manager_ = new SaveFileManager(); | 1346 save_file_manager_ = new SaveFileManager(); |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 // Alert the clipboard class to which threads are allowed to access the | 1349 // Alert the clipboard class to which threads are allowed to access the |
| 1350 // clipboard: | 1350 // clipboard: |
| 1351 std::vector<base::PlatformThreadId> allowed_clipboard_threads; | 1351 std::vector<base::PlatformThreadId> allowed_clipboard_threads; |
| 1352 // The current thread is the UI thread. | 1352 // The current thread is the UI thread. |
| 1353 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId()); | 1353 allowed_clipboard_threads.push_back(base::PlatformThread::CurrentId()); |
| 1354 #if defined(OS_WIN) | 1354 #if defined(OS_WIN) |
| 1355 // On Windows, clipboards are also used on the FILE or IO threads. | 1355 // On Windows, clipboards are also used on the FILE or IO threads. |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1588 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1589 audio_thread_->task_runner(); | 1589 audio_thread_->task_runner(); |
| 1590 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1590 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1591 std::move(worker_task_runner), | 1591 std::move(worker_task_runner), |
| 1592 MediaInternals::GetInstance()); | 1592 MediaInternals::GetInstance()); |
| 1593 } | 1593 } |
| 1594 CHECK(audio_manager_); | 1594 CHECK(audio_manager_); |
| 1595 } | 1595 } |
| 1596 | 1596 |
| 1597 } // namespace content | 1597 } // namespace content |
| OLD | NEW |