Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / content / browser / device_sensors / inertial_sensor_consts.h
blob1f665bdbb5d69c94436636a63ba6d7ff55ad3218
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_
6 #define CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_
8 #include "base/time/time.h"
10 namespace content {
12 // Constants related to the Device {Motion|Orientation|Light} APIs.
14 enum ConsumerType {
15 CONSUMER_TYPE_MOTION = 1 << 0,
16 CONSUMER_TYPE_ORIENTATION = 1 << 1,
17 CONSUMER_TYPE_LIGHT = 1 << 2,
20 // Specifies the sampling rate for sensor data updates.
21 // Note that when changing this value it is desirable to have an adequate
22 // matching value |DeviceSensorEventPump::kDefaultPumpFrequencyHz| in
23 // content/renderer/device_orientation/device_sensor_event_pump.cc.
24 const int kInertialSensorSamplingRateHz = 60;
25 const int kInertialSensorIntervalMicroseconds =
26 base::Time::kMicrosecondsPerSecond / kInertialSensorSamplingRateHz;
28 // Corresponding |kDefaultLightPumpFrequencyHz| is in
29 // content/renderer/device_sensors/device_light_event_pump.cc.
30 const int kLightSensorSamplingRateHz = 5;
31 const int kLightSensorIntervalMicroseconds =
32 base::Time::kMicrosecondsPerSecond / kLightSensorSamplingRateHz;
34 } // namespace content
36 #endif // CONTENT_BROWSER_DEVICE_SENSORS_INERTIAL_SENSOR_CONSTS_H_