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

Side by Side Diff: services/device/sensors/device_sensor_host.h

Issue 2819273006: Move //device/sensor impl to be part of the internal implemenation of the Device Service. (Closed)
Patch Set: Move //device/sensor impl to be part of the internal implemenation of the Device Service Created 3 years, 8 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 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 DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ 5 #ifndef SERVICES_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_
6 #define DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ 6 #define SERVICES_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "device/sensors/device_sensors_consts.h"
11 #include "device/sensors/public/interfaces/light.mojom.h"
12 #include "device/sensors/public/interfaces/motion.mojom.h"
13 #include "device/sensors/public/interfaces/orientation.mojom.h"
14 #include "mojo/public/cpp/bindings/interface_request.h" 10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "services/device/public/interfaces/light.mojom.h"
12 #include "services/device/public/interfaces/motion.mojom.h"
13 #include "services/device/public/interfaces/orientation.mojom.h"
14 #include "services/device/sensors/device_sensors_consts.h"
15 15
16 namespace device { 16 namespace device {
17 17
18 // A base class for device sensor related mojo interface implementations. 18 // A base class for device sensor related mojo interface implementations.
19 template <typename MojoInterface, ConsumerType consumer_type> 19 template <typename MojoInterface, ConsumerType consumer_type>
20 class DeviceSensorHost : NON_EXPORTED_BASE(public MojoInterface) { 20 class DeviceSensorHost : NON_EXPORTED_BASE(public MojoInterface) {
21 public: 21 public:
22 static void Create(mojo::InterfaceRequest<MojoInterface> request); 22 static void Create(mojo::InterfaceRequest<MojoInterface> request);
23 23
24 // All methods below to be called on the IO thread. 24 // All methods below to be called on the IO thread.
(...skipping 18 matching lines...) Expand all
43 using DeviceMotionHost = 43 using DeviceMotionHost =
44 DeviceSensorHost<device::mojom::MotionSensor, CONSUMER_TYPE_MOTION>; 44 DeviceSensorHost<device::mojom::MotionSensor, CONSUMER_TYPE_MOTION>;
45 using DeviceOrientationHost = DeviceSensorHost<device::mojom::OrientationSensor, 45 using DeviceOrientationHost = DeviceSensorHost<device::mojom::OrientationSensor,
46 CONSUMER_TYPE_ORIENTATION>; 46 CONSUMER_TYPE_ORIENTATION>;
47 using DeviceOrientationAbsoluteHost = 47 using DeviceOrientationAbsoluteHost =
48 DeviceSensorHost<device::mojom::OrientationAbsoluteSensor, 48 DeviceSensorHost<device::mojom::OrientationAbsoluteSensor,
49 CONSUMER_TYPE_ORIENTATION_ABSOLUTE>; 49 CONSUMER_TYPE_ORIENTATION_ABSOLUTE>;
50 50
51 } // namespace device 51 } // namespace device
52 52
53 #endif // DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ 53 #endif // SERVICES_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_
OLDNEW
« no previous file with comments | « services/device/sensors/device_sensor_export.h ('k') | services/device/sensors/device_sensor_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698