Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2643713002: Port BatteryMonitor into Device Service (Closed)
Patch Set: Rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #include "content/public/browser/browser_main_parts.h" 83 #include "content/public/browser/browser_main_parts.h"
84 #include "content/public/browser/content_browser_client.h" 84 #include "content/public/browser/content_browser_client.h"
85 #include "content/public/browser/gpu_data_manager_observer.h" 85 #include "content/public/browser/gpu_data_manager_observer.h"
86 #include "content/public/browser/render_process_host.h" 86 #include "content/public/browser/render_process_host.h"
87 #include "content/public/browser/tracing_controller.h" 87 #include "content/public/browser/tracing_controller.h"
88 #include "content/public/common/content_client.h" 88 #include "content/public/common/content_client.h"
89 #include "content/public/common/content_features.h" 89 #include "content/public/common/content_features.h"
90 #include "content/public/common/content_switches.h" 90 #include "content/public/common/content_switches.h"
91 #include "content/public/common/main_function_params.h" 91 #include "content/public/common/main_function_params.h"
92 #include "content/public/common/result_codes.h" 92 #include "content/public/common/result_codes.h"
93 #include "device/battery/battery_status_service.h"
94 #include "device/gamepad/gamepad_service.h" 93 #include "device/gamepad/gamepad_service.h"
95 #include "media/base/media.h" 94 #include "media/base/media.h"
96 #include "media/base/user_input_monitor.h" 95 #include "media/base/user_input_monitor.h"
97 #include "media/midi/midi_service.h" 96 #include "media/midi/midi_service.h"
98 #include "mojo/edk/embedder/embedder.h" 97 #include "mojo/edk/embedder/embedder.h"
99 #include "mojo/edk/embedder/scoped_ipc_support.h" 98 #include "mojo/edk/embedder/scoped_ipc_support.h"
100 #include "net/base/network_change_notifier.h" 99 #include "net/base/network_change_notifier.h"
101 #include "net/socket/client_socket_factory.h" 100 #include "net/socket/client_socket_factory.h"
102 #include "net/ssl/ssl_config_service.h" 101 #include "net/ssl/ssl_config_service.h"
103 #include "ppapi/features/features.h" 102 #include "ppapi/features/features.h"
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 // Must happen after the I/O thread is shutdown since this class lives on the 1358 // Must happen after the I/O thread is shutdown since this class lives on the
1360 // I/O thread and isn't threadsafe. 1359 // I/O thread and isn't threadsafe.
1361 { 1360 {
1362 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); 1361 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService");
1363 device::GamepadService::GetInstance()->Terminate(); 1362 device::GamepadService::GetInstance()->Terminate();
1364 } 1363 }
1365 { 1364 {
1366 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:SensorService"); 1365 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:SensorService");
1367 DeviceSensorService::GetInstance()->Shutdown(); 1366 DeviceSensorService::GetInstance()->Shutdown();
1368 } 1367 }
1369 #if !defined(OS_ANDROID)
1370 {
1371 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:BatteryStatusService");
1372 device::BatteryStatusService::GetInstance()->Shutdown();
1373 }
1374 #endif
1375 { 1368 {
1376 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); 1369 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources");
1377 URLDataManager::DeleteDataSources(); 1370 URLDataManager::DeleteDataSources();
1378 } 1371 }
1379 1372
1380 if (parts_) { 1373 if (parts_) {
1381 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:PostDestroyThreads"); 1374 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:PostDestroyThreads");
1382 parts_->PostDestroyThreads(); 1375 parts_->PostDestroyThreads();
1383 } 1376 }
1384 } 1377 }
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 if (!audio_manager_) { 1779 if (!audio_manager_) {
1787 audio_thread_ = base::MakeUnique<AudioManagerThread>(); 1780 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1788 audio_manager_ = media::AudioManager::Create( 1781 audio_manager_ = media::AudioManager::Create(
1789 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), 1782 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1790 MediaInternals::GetInstance()); 1783 MediaInternals::GetInstance());
1791 } 1784 }
1792 CHECK(audio_manager_); 1785 CHECK(audio_manager_);
1793 } 1786 }
1794 1787
1795 } // namespace content 1788 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698