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

Side by Side Diff: content/browser/device_sensors/device_sensors_consts.h

Issue 2646093002: Move //content/browser/device_sensor/ into device/sensors (Closed)
Patch Set: gn format & code rebase Created 3 years, 10 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 CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSORS_CONSTS_H_
6 #define CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSORS_CONSTS_H_
7
8 #include "base/time/time.h"
9
10 namespace content {
11
12 // Constants related to the Device {Motion|Orientation|Light} APIs.
13
14 // A Java counterpart will be generated for this enum.
15 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content.browser
16 enum ConsumerType {
17 CONSUMER_TYPE_MOTION = 1 << 0,
18 CONSUMER_TYPE_ORIENTATION = 1 << 1,
19 CONSUMER_TYPE_ORIENTATION_ABSOLUTE = 1 << 2,
20 CONSUMER_TYPE_LIGHT = 1 << 3,
21 };
22
23 // Specifies the sampling rate for sensor data updates.
24 // Note that when changing this value it is desirable to have an adequate
25 // matching value |DeviceSensorEventPump::kDefaultPumpFrequencyHz| in
26 // content/renderer/device_orientation/device_sensor_event_pump.cc.
27 const int kDeviceSensorSamplingRateHz = 60;
28 const int kDeviceSensorIntervalMicroseconds =
29 base::Time::kMicrosecondsPerSecond / kDeviceSensorSamplingRateHz;
30
31 // Corresponding |kDefaultLightPumpFrequencyHz| is in
32 // content/renderer/device_sensors/device_light_event_pump.cc.
33 const int kLightSensorSamplingRateHz = 5;
34 const int kLightSensorIntervalMicroseconds =
35 base::Time::kMicrosecondsPerSecond / kLightSensorSamplingRateHz;
36
37 } // namespace content
38
39 #endif // CONTENT_BROWSER_DEVICE_SENSORS_DEVICE_SENSORS_CONSTS_H_
OLDNEW
« no previous file with comments | « content/browser/device_sensors/device_sensor_service.cc ('k') | content/browser/device_sensors/sensor_manager_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698