| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 mojom::OrientationAbsoluteSensor>, | 53 mojom::OrientationAbsoluteSensor>, |
| 53 #if !defined(OS_ANDROID) | 54 #if !defined(OS_ANDROID) |
| 54 // On Android the Device Service provides BatteryMonitor via Java. | 55 // On Android the Device Service provides BatteryMonitor via Java. |
| 55 public service_manager::InterfaceFactory<BatteryMonitor>, | 56 public service_manager::InterfaceFactory<BatteryMonitor>, |
| 56 // On Android the Device Service provides VibrationManager via Java. | 57 // On Android the Device Service provides VibrationManager via Java. |
| 57 public service_manager::InterfaceFactory<mojom::VibrationManager>, | 58 public service_manager::InterfaceFactory<mojom::VibrationManager>, |
| 58 #endif | 59 #endif |
| 59 public service_manager::InterfaceFactory<mojom::PowerMonitor>, | 60 public service_manager::InterfaceFactory<mojom::PowerMonitor>, |
| 60 public service_manager::InterfaceFactory< | 61 public service_manager::InterfaceFactory< |
| 61 mojom::ScreenOrientationListener>, | 62 mojom::ScreenOrientationListener>, |
| 63 public service_manager::InterfaceFactory<mojom::SensorProvider>, |
| 62 public service_manager::InterfaceFactory<mojom::TimeZoneMonitor>, | 64 public service_manager::InterfaceFactory<mojom::TimeZoneMonitor>, |
| 63 public service_manager::InterfaceFactory<mojom::WakeLockContextProvider> { | 65 public service_manager::InterfaceFactory<mojom::WakeLockContextProvider> { |
| 64 public: | 66 public: |
| 65 #if defined(OS_ANDROID) | 67 #if defined(OS_ANDROID) |
| 66 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, | 68 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, |
| 67 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, | 69 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, |
| 68 const WakeLockContextCallback& wake_lock_context_callback); | 70 const WakeLockContextCallback& wake_lock_context_callback); |
| 69 #else | 71 #else |
| 70 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, | 72 DeviceService(scoped_refptr<base::SingleThreadTaskRunner> file_task_runner, |
| 71 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); | 73 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 #endif | 110 #endif |
| 109 | 111 |
| 110 // InterfaceFactory<mojom::PowerMonitor>: | 112 // InterfaceFactory<mojom::PowerMonitor>: |
| 111 void Create(const service_manager::Identity& remote_identity, | 113 void Create(const service_manager::Identity& remote_identity, |
| 112 mojom::PowerMonitorRequest request) override; | 114 mojom::PowerMonitorRequest request) override; |
| 113 | 115 |
| 114 // InterfaceFactory<mojom::ScreenOrientationListener>: | 116 // InterfaceFactory<mojom::ScreenOrientationListener>: |
| 115 void Create(const service_manager::Identity& remote_identity, | 117 void Create(const service_manager::Identity& remote_identity, |
| 116 mojom::ScreenOrientationListenerRequest request) override; | 118 mojom::ScreenOrientationListenerRequest request) override; |
| 117 | 119 |
| 120 // InterfaceFactory<mojom::SensorProvider>: |
| 121 void Create(const service_manager::Identity& remote_identity, |
| 122 mojom::SensorProviderRequest request) override; |
| 123 |
| 118 // InterfaceFactory<mojom::TimeZoneMonitor>: | 124 // InterfaceFactory<mojom::TimeZoneMonitor>: |
| 119 void Create(const service_manager::Identity& remote_identity, | 125 void Create(const service_manager::Identity& remote_identity, |
| 120 mojom::TimeZoneMonitorRequest request) override; | 126 mojom::TimeZoneMonitorRequest request) override; |
| 121 | 127 |
| 122 // InterfaceFactory<mojom::WakeLockContextProvider>: | 128 // InterfaceFactory<mojom::WakeLockContextProvider>: |
| 123 void Create(const service_manager::Identity& remote_identity, | 129 void Create(const service_manager::Identity& remote_identity, |
| 124 mojom::WakeLockContextProviderRequest request) override; | 130 mojom::WakeLockContextProviderRequest request) override; |
| 125 | 131 |
| 126 std::unique_ptr<PowerMonitorMessageBroadcaster> | 132 std::unique_ptr<PowerMonitorMessageBroadcaster> |
| 127 power_monitor_message_broadcaster_; | 133 power_monitor_message_broadcaster_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 141 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 147 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 142 | 148 |
| 143 WakeLockContextCallback wake_lock_context_callback_; | 149 WakeLockContextCallback wake_lock_context_callback_; |
| 144 | 150 |
| 145 DISALLOW_COPY_AND_ASSIGN(DeviceService); | 151 DISALLOW_COPY_AND_ASSIGN(DeviceService); |
| 146 }; | 152 }; |
| 147 | 153 |
| 148 } // namespace device | 154 } // namespace device |
| 149 | 155 |
| 150 #endif // SERVICES_DEVICE_DEVICE_SERVICE_H_ | 156 #endif // SERVICES_DEVICE_DEVICE_SERVICE_H_ |
| OLD | NEW |