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

Side by Side Diff: device/sensors/device_sensors_consts.h

Issue 2885203004: Refactor content/renderer/device_sensors to use device/generic_sensor instead of device/sensors (Closed)
Patch Set: updated content/renderer/BUILD.gn Created 3 years, 7 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
(Empty)
1 // Copyright 2015 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.
4
5 #ifndef DEVICE_SENSORS_DEVICE_SENSORS_CONSTS_H_
6 #define DEVICE_SENSORS_DEVICE_SENSORS_CONSTS_H_
7
8 #include "base/time/time.h"
9
10 namespace device {
11
12 // Constants related to the Device {Motion|Orientation} APIs.
13
14 // A Java counterpart will be generated for this enum.
15 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.device.sensors
16 enum ConsumerType {
17 CONSUMER_TYPE_MOTION = 1 << 0,
18 CONSUMER_TYPE_ORIENTATION = 1 << 1,
19 CONSUMER_TYPE_ORIENTATION_ABSOLUTE = 1 << 2,
20 };
21
22 // Specifies the sampling rate for sensor data updates.
23 // Note that when changing this value it is desirable to have an adequate
24 // matching value |DeviceSensorEventPump::kDefaultPumpFrequencyHz| in
25 // content/renderer/device_orientation/device_sensor_event_pump.cc.
26 const int kDeviceSensorSamplingRateHz = 60;
27 const int kDeviceSensorIntervalMicroseconds =
28 base::Time::kMicrosecondsPerSecond / kDeviceSensorSamplingRateHz;
29
30 } // namespace device
31
32 #endif // DEVICE_SENSORS_DEVICE_SENSORS_CONSTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698