| 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 #ifndef SERVICES_DEVICE_DEVICE_SERVICE_H_ | 5 #ifndef SERVICES_DEVICE_DEVICE_SERVICE_H_ |
| 6 #define SERVICES_DEVICE_DEVICE_SERVICE_H_ | 6 #define SERVICES_DEVICE_DEVICE_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "device/battery/battery_monitor.mojom.h" | 9 #include "device/battery/battery_monitor.mojom.h" |
| 10 #include "device/generic_sensor/public/interfaces/sensor_provider.mojom.h" |
| 10 #include "device/screen_orientation/public/interfaces/screen_orientation.mojom.h
" | 11 #include "device/screen_orientation/public/interfaces/screen_orientation.mojom.h
" |
| 11 #include "device/sensors/public/interfaces/light.mojom.h" | 12 #include "device/sensors/public/interfaces/light.mojom.h" |
| 12 #include "device/sensors/public/interfaces/motion.mojom.h" | 13 #include "device/sensors/public/interfaces/motion.mojom.h" |
| 13 #include "device/sensors/public/interfaces/orientation.mojom.h" | 14 #include "device/sensors/public/interfaces/orientation.mojom.h" |
| 14 #include "device/vibration/vibration_manager.mojom.h" | 15 #include "device/vibration/vibration_manager.mojom.h" |
| 15 #include "device/wake_lock/public/interfaces/wake_lock_context_provider.mojom.h" | 16 #include "device/wake_lock/public/interfaces/wake_lock_context_provider.mojom.h" |
| 16 #include "device/wake_lock/wake_lock_service_context.h" | 17 #include "device/wake_lock/wake_lock_service_context.h" |
| 17 #include "mojo/public/cpp/bindings/binding_set.h" | 18 #include "mojo/public/cpp/bindings/binding_set.h" |
| 18 #include "services/device/public/interfaces/fingerprint.mojom.h" | 19 #include "services/device/public/interfaces/fingerprint.mojom.h" |
| 19 #include "services/device/public/interfaces/power_monitor.mojom.h" | 20 #include "services/device/public/interfaces/power_monitor.mojom.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 mojom::OrientationAbsoluteSensor>, | 54 mojom::OrientationAbsoluteSensor>, |
| 54 #if !defined(OS_ANDROID) | 55 #if !defined(OS_ANDROID) |
| 55 // On Android the Device Service provides BatteryMonitor via Java. | 56 // On Android the Device Service provides BatteryMonitor via Java. |
| 56 public service_manager::InterfaceFactory<mojom::BatteryMonitor>, | 57 public service_manager::InterfaceFactory<mojom::BatteryMonitor>, |
| 57 // On Android the Device Service provides VibrationManager via Java. | 58 // On Android the Device Service provides VibrationManager via Java. |
| 58 public service_manager::InterfaceFactory<mojom::VibrationManager>, | 59 public service_manager::InterfaceFactory<mojom::VibrationManager>, |
| 59 #endif | 60 #endif |
| 60 public service_manager::InterfaceFactory<mojom::PowerMonitor>, | 61 public service_manager::InterfaceFactory<mojom::PowerMonitor>, |
| 61 public service_manager::InterfaceFactory< | 62 public service_manager::InterfaceFactory< |
| 62 mojom::ScreenOrientationListener>, | 63 mojom::ScreenOrientationListener>, |
| 64 public service_manager::InterfaceFactory<mojom::SensorProvider>, |
| 63 public service_manager::InterfaceFactory<mojom::TimeZoneMonitor>, | 65 public service_manager::InterfaceFactory<mojom::TimeZoneMonitor>, |
| 64 public service_manager::InterfaceFactory<mojom::WakeLockContextProvider> { | 66 public service_manager::InterfaceFactory<mojom::WakeLockContextProvider> { |
| 65 public: | 67 public: |
| 66 #if defined(OS_ANDROID) | 68 #if defined(OS_ANDROID) |
| 67 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, | 69 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, |
| 68 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 70 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| 69 const WakeLockContextCallback& wake_lock_context_callback); | 71 const WakeLockContextCallback& wake_lock_context_callback); |
| 70 #else | 72 #else |
| 71 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, | 73 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, |
| 72 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); | 74 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 #endif | 112 #endif |
| 111 | 113 |
| 112 // InterfaceFactory<mojom::PowerMonitor>: | 114 // InterfaceFactory<mojom::PowerMonitor>: |
| 113 void Create(const service_manager::Identity& remote_identity, | 115 void Create(const service_manager::Identity& remote_identity, |
| 114 mojom::PowerMonitorRequest request) override; | 116 mojom::PowerMonitorRequest request) override; |
| 115 | 117 |
| 116 // InterfaceFactory<mojom::ScreenOrientationListener>: | 118 // InterfaceFactory<mojom::ScreenOrientationListener>: |
| 117 void Create(const service_manager::Identity& remote_identity, | 119 void Create(const service_manager::Identity& remote_identity, |
| 118 mojom::ScreenOrientationListenerRequest request) override; | 120 mojom::ScreenOrientationListenerRequest request) override; |
| 119 | 121 |
| 122 // InterfaceFactory<mojom::SensorProvider>: |
| 123 void Create(const service_manager::Identity& remote_identity, |
| 124 mojom::SensorProviderRequest request) override; |
| 125 |
| 120 // InterfaceFactory<mojom::TimeZoneMonitor>: | 126 // InterfaceFactory<mojom::TimeZoneMonitor>: |
| 121 void Create(const service_manager::Identity& remote_identity, | 127 void Create(const service_manager::Identity& remote_identity, |
| 122 mojom::TimeZoneMonitorRequest request) override; | 128 mojom::TimeZoneMonitorRequest request) override; |
| 123 | 129 |
| 124 // InterfaceFactory<mojom::WakeLockContextProvider>: | 130 // InterfaceFactory<mojom::WakeLockContextProvider>: |
| 125 void Create(const service_manager::Identity& remote_identity, | 131 void Create(const service_manager::Identity& remote_identity, |
| 126 mojom::WakeLockContextProviderRequest request) override; | 132 mojom::WakeLockContextProviderRequest request) override; |
| 127 | 133 |
| 128 std::unique_ptr<PowerMonitorMessageBroadcaster> | 134 std::unique_ptr<PowerMonitorMessageBroadcaster> |
| 129 power_monitor_message_broadcaster_; | 135 power_monitor_message_broadcaster_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 145 WakeLockContextCallback wake_lock_context_callback_; | 151 WakeLockContextCallback wake_lock_context_callback_; |
| 146 | 152 |
| 147 service_manager::BinderRegistry registry_; | 153 service_manager::BinderRegistry registry_; |
| 148 | 154 |
| 149 DISALLOW_COPY_AND_ASSIGN(DeviceService); | 155 DISALLOW_COPY_AND_ASSIGN(DeviceService); |
| 150 }; | 156 }; |
| 151 | 157 |
| 152 } // namespace device | 158 } // namespace device |
| 153 | 159 |
| 154 #endif // SERVICES_DEVICE_DEVICE_SERVICE_H_ | 160 #endif // SERVICES_DEVICE_DEVICE_SERVICE_H_ |
| OLD | NEW |