OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_GENERIC_SENSOR_PLATFORM_SENSOR_ACCELEROMETER_MAC_H_ | 5 #ifndef SERVICES_DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ACCELEROMETER_MAC_H_ |
6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ACCELEROMETER_MAC_H_ | 6 #define SERVICES_DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ACCELEROMETER_MAC_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
11 #include "device/generic_sensor/platform_sensor.h" | 11 #include "services/device/generic_sensor/platform_sensor.h" |
12 | 12 |
13 class SuddenMotionSensor; | 13 class SuddenMotionSensor; |
14 | 14 |
15 namespace device { | 15 namespace device { |
16 | 16 |
17 // Implementation of PlatformSensor for macOS to query the accelerometer | 17 // Implementation of PlatformSensor for macOS to query the accelerometer |
18 // sensor. | 18 // sensor. |
19 // This is a single instance object per browser process which is created by | 19 // This is a single instance object per browser process which is created by |
20 // The singleton PlatformSensorProviderMac. If there are no clients, this | 20 // The singleton PlatformSensorProviderMac. If there are no clients, this |
21 // instance is not created. | 21 // instance is not created. |
(...skipping 23 matching lines...) Expand all Loading... |
45 SensorReading reading_; | 45 SensorReading reading_; |
46 | 46 |
47 // Repeating timer for data polling. | 47 // Repeating timer for data polling. |
48 base::RepeatingTimer timer_; | 48 base::RepeatingTimer timer_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAccelerometerMac); | 50 DISALLOW_COPY_AND_ASSIGN(PlatformSensorAccelerometerMac); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace device | 53 } // namespace device |
54 | 54 |
55 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ACCELEROMETER_MAC_H_ | 55 #endif // SERVICES_DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_ACCELEROMETER_MAC_H_ |
OLD | NEW |