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

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

Issue 2730333002: Make DeviceSensorService implement MainLoop::DestructionObserver (Closed)
Patch Set: code rebase Created 3 years, 9 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
« no previous file with comments | « no previous file | device/sensors/device_sensor_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
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" 93 #include "device/battery/battery_status_service.h"
94 #include "device/gamepad/gamepad_service.h" 94 #include "device/gamepad/gamepad_service.h"
95 #include "device/sensors/device_sensor_service.h"
96 #include "gpu/vulkan/features.h" 95 #include "gpu/vulkan/features.h"
97 #include "media/audio/audio_system_impl.h" 96 #include "media/audio/audio_system_impl.h"
98 #include "media/base/media.h" 97 #include "media/base/media.h"
99 #include "media/base/user_input_monitor.h" 98 #include "media/base/user_input_monitor.h"
100 #include "media/midi/midi_service.h" 99 #include "media/midi/midi_service.h"
101 #include "mojo/edk/embedder/embedder.h" 100 #include "mojo/edk/embedder/embedder.h"
102 #include "mojo/edk/embedder/scoped_ipc_support.h" 101 #include "mojo/edk/embedder/scoped_ipc_support.h"
103 #include "net/base/network_change_notifier.h" 102 #include "net/base/network_change_notifier.h"
104 #include "net/socket/client_socket_factory.h" 103 #include "net/socket/client_socket_factory.h"
105 #include "net/ssl/ssl_config_service.h" 104 #include "net/ssl/ssl_config_service.h"
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 BrowserGpuChannelHostFactory::Terminate(); 1367 BrowserGpuChannelHostFactory::Terminate();
1369 } 1368 }
1370 } 1369 }
1371 1370
1372 // Must happen after the I/O thread is shutdown since this class lives on the 1371 // Must happen after the I/O thread is shutdown since this class lives on the
1373 // I/O thread and isn't threadsafe. 1372 // I/O thread and isn't threadsafe.
1374 { 1373 {
1375 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService"); 1374 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:GamepadService");
1376 device::GamepadService::GetInstance()->Terminate(); 1375 device::GamepadService::GetInstance()->Terminate();
1377 } 1376 }
1378 {
1379 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:SensorService");
1380 device::DeviceSensorService::GetInstance()->Shutdown();
1381 }
1382 #if !defined(OS_ANDROID) 1377 #if !defined(OS_ANDROID)
1383 { 1378 {
1384 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:BatteryStatusService"); 1379 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:BatteryStatusService");
1385 device::BatteryStatusService::GetInstance()->Shutdown(); 1380 device::BatteryStatusService::GetInstance()->Shutdown();
1386 } 1381 }
1387 #endif 1382 #endif
1388 { 1383 {
1389 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources"); 1384 TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:DeleteDataSources");
1390 URLDataManager::DeleteDataSources(); 1385 URLDataManager::DeleteDataSources();
1391 } 1386 }
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1788 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 1783 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
1789 MediaInternals::GetInstance()); 1784 MediaInternals::GetInstance());
1790 } 1785 }
1791 CHECK(audio_manager_); 1786 CHECK(audio_manager_);
1792 1787
1793 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get()); 1788 audio_system_ = media::AudioSystemImpl::Create(audio_manager_.get());
1794 CHECK(audio_system_); 1789 CHECK(audio_system_);
1795 } 1790 }
1796 1791
1797 } // namespace content 1792 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | device/sensors/device_sensor_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698