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 CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ |
6 #define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ | 6 #define CONTENT_BROWSER_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 "content/browser/device_sensors/device_sensors_consts.h" | 10 #include "content/browser/device_sensors/device_sensors_consts.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 explicit DeviceSensorHost(mojo::InterfaceRequest<MojoInterface> request); | 29 explicit DeviceSensorHost(mojo::InterfaceRequest<MojoInterface> request); |
30 | 30 |
31 void StartPolling( | 31 void StartPolling( |
32 const typename MojoInterface::StartPollingCallback& callback) override; | 32 const typename MojoInterface::StartPollingCallback& callback) override; |
33 void StopPolling() override; | 33 void StopPolling() override; |
34 | 34 |
35 bool is_started_; | 35 bool is_started_; |
36 | 36 |
37 mojo::StrongBinding<MojoInterface> binding_; | 37 mojo::StrongBinding<MojoInterface> binding_; |
38 | 38 |
| 39 base::ThreadChecker thread_checker_; |
| 40 |
39 DISALLOW_COPY_AND_ASSIGN(DeviceSensorHost); | 41 DISALLOW_COPY_AND_ASSIGN(DeviceSensorHost); |
40 }; | 42 }; |
41 | 43 |
42 using DeviceLightHost = | 44 using DeviceLightHost = |
43 DeviceSensorHost<device::mojom::LightSensor, CONSUMER_TYPE_LIGHT>; | 45 DeviceSensorHost<device::mojom::LightSensor, CONSUMER_TYPE_LIGHT>; |
44 using DeviceMotionHost = | 46 using DeviceMotionHost = |
45 DeviceSensorHost<device::mojom::MotionSensor, CONSUMER_TYPE_MOTION>; | 47 DeviceSensorHost<device::mojom::MotionSensor, CONSUMER_TYPE_MOTION>; |
46 using DeviceOrientationHost = DeviceSensorHost<device::mojom::OrientationSensor, | 48 using DeviceOrientationHost = DeviceSensorHost<device::mojom::OrientationSensor, |
47 CONSUMER_TYPE_ORIENTATION>; | 49 CONSUMER_TYPE_ORIENTATION>; |
48 using DeviceOrientationAbsoluteHost = | 50 using DeviceOrientationAbsoluteHost = |
49 DeviceSensorHost<device::mojom::OrientationAbsoluteSensor, | 51 DeviceSensorHost<device::mojom::OrientationAbsoluteSensor, |
50 CONSUMER_TYPE_ORIENTATION_ABSOLUTE>; | 52 CONSUMER_TYPE_ORIENTATION_ABSOLUTE>; |
51 | 53 |
52 } // namespace content | 54 } // namespace content |
53 | 55 |
54 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ | 56 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSOR_HOST_H_ |
OLD | NEW |