OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/device/device_service.h" | 5 #include "services/device/device_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
12 #include "services/device/fingerprint/fingerprint.h" | 12 #include "services/device/fingerprint/fingerprint.h" |
13 #include "services/device/power_monitor/power_monitor_message_broadcaster.h" | 13 #include "services/device/power_monitor/power_monitor_message_broadcaster.h" |
14 #include "services/device/time_zone_monitor/time_zone_monitor.h" | 14 #include "services/device/time_zone_monitor/time_zone_monitor.h" |
15 #include "services/service_manager/public/cpp/connection.h" | 15 #include "services/service_manager/public/cpp/connection.h" |
16 #include "services/service_manager/public/cpp/interface_registry.h" | 16 #include "services/service_manager/public/cpp/interface_registry.h" |
| 17 #include "services/service_manager/public/cpp/service_info.h" |
17 | 18 |
18 #if defined(OS_ANDROID) | 19 #if defined(OS_ANDROID) |
19 #include "services/device/android/register_jni.h" | 20 #include "services/device/android/register_jni.h" |
20 #include "services/device/screen_orientation/screen_orientation_listener_android
.h" | 21 #include "services/device/screen_orientation/screen_orientation_listener_android
.h" |
21 #endif | 22 #endif |
22 | 23 |
23 namespace device { | 24 namespace device { |
24 | 25 |
25 std::unique_ptr<service_manager::Service> CreateDeviceService( | 26 std::unique_ptr<service_manager::Service> CreateDeviceService( |
26 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, | 27 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 83 } |
83 | 84 |
84 void DeviceService::Create(const service_manager::Identity& remote_identity, | 85 void DeviceService::Create(const service_manager::Identity& remote_identity, |
85 mojom::TimeZoneMonitorRequest request) { | 86 mojom::TimeZoneMonitorRequest request) { |
86 if (!time_zone_monitor_) | 87 if (!time_zone_monitor_) |
87 time_zone_monitor_ = TimeZoneMonitor::Create(file_task_runner_); | 88 time_zone_monitor_ = TimeZoneMonitor::Create(file_task_runner_); |
88 time_zone_monitor_->Bind(std::move(request)); | 89 time_zone_monitor_->Bind(std::move(request)); |
89 } | 90 } |
90 | 91 |
91 } // namespace device | 92 } // namespace device |
OLD | NEW |