OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_INERTIAL_SENSOR_CONSTS_H_ | 5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_ |
6 #define CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_ | 6 #define CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_ |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 | 9 |
10 // Constants related to the Device {Motion|Orientation|Light} APIs. | 10 // Constants related to the Device {Motion|Orientation|Light} APIs. |
11 | 11 |
12 enum ConsumerType { | 12 enum ConsumerType { |
13 CONSUMER_TYPE_MOTION = 1 << 0, | 13 CONSUMER_TYPE_MOTION = 1 << 0, |
14 CONSUMER_TYPE_ORIENTATION = 1 << 1, | 14 CONSUMER_TYPE_ORIENTATION = 1 << 1, |
15 CONSUMER_TYPE_LIGHT = 1 << 2, | 15 CONSUMER_TYPE_LIGHT = 1 << 2, |
16 }; | 16 }; |
17 | 17 |
18 // Specifies the minimal interval between subsequent sensor data updates. | 18 // Specifies the minimal interval between subsequent sensor data updates. |
19 // Note that when changing this value it is desirable to have an adequate | 19 // Note that when changing this value it is desirable to have an adequate |
20 // matching value |DeviceSensorEventPump::kDefaultPumpDelayMillis| in | 20 // matching value |DeviceSensorEventPump::kDefaultPumpDelayMicroseconds| in |
21 // content/renderer/device_sensors/device_sensor_event_pump.cc. | 21 // content/renderer/device_orientation/device_sensor_event_pump.cc. |
22 const int kInertialSensorIntervalMillis = 50; | 22 const int kInertialSensorIntervalMicroseconds = 1000000 / 60; |
timvolodine
2014/09/25 21:30:51
it not very clear what the interval means. could y
jdarpinian
2014/09/25 22:36:18
Done.
| |
23 // Corresponding |kDefaultLightPumpDelayMillis| is in | 23 // Corresponding |kDefaultLightPumpDelayMicroseconds| is in |
24 // content/renderer/device_sensors/device_light_event_pump.cc. | 24 // content/renderer/device_sensors/device_light_event_pump.cc. |
25 const int kLightSensorIntervalMillis = 200; | 25 const int kLightSensorIntervalMicroseconds = 1000000 / 5; |
timvolodine
2014/09/25 21:30:51
same as above
jdarpinian
2014/09/25 22:36:18
Done.
| |
26 | 26 |
27 } // namespace content | 27 } // namespace content |
28 | 28 |
29 #endif // CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_ | 29 #endif // CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_ |
OLD | NEW |