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

Side by Side Diff: device/generic_sensor/public/interfaces/sensor.mojom

Issue 2284613002: [sensors] Android platform adaptation for Generic Sensor API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to master. Created 4 years, 3 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
« no previous file with comments | « device/generic_sensor/public/cpp/platform_sensor_configuration.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 module device.mojom; 5 module device.mojom;
6 6
7 // Types of supported sensors 7 // Types of supported sensors
8 enum SensorType { 8 enum SensorType {
9 FIRST = 1, 9 FIRST = 1,
10 AMBIENT_LIGHT = FIRST, 10 AMBIENT_LIGHT = FIRST,
11 PROXIMITY, 11 PROXIMITY,
12 ACCELEROMETER, 12 ACCELEROMETER,
13 LINEAR_ACCELERATION,
13 GYROSCOPE, 14 GYROSCOPE,
15 MAGNETOMETER,
14 PRESSURE, 16 PRESSURE,
15 LAST = PRESSURE // Note: LAST is also equal to the types count. 17 LAST = PRESSURE // Note: LAST is also equal to the types count.
16 }; 18 };
17 19
18 // Reporting mode supported by the Sensor. 20 // Reporting mode supported by the Sensor.
19 // ON_CHANGE - client will be notified through OnSensorReadingChanged() signal 21 // ON_CHANGE - client will be notified through OnSensorReadingChanged() signal
20 // whenever sensor reading is changed. 22 // whenever sensor reading is changed.
21 // CONTINUOUS - sensor will continuously update its reading with frequency 23 // CONTINUOUS - sensor will continuously update its reading with frequency
22 // specified in SensorConfiguration.frequency. 24 // specified in SensorConfiguration.frequency.
23 // OnSensorReadingChanged() signal is not sent to the client for 25 // OnSensorReadingChanged() signal is not sent to the client for
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Interface that client of the Sensor interface must implement to observe 75 // Interface that client of the Sensor interface must implement to observe
74 // sensor reading changes and error conditions. 76 // sensor reading changes and error conditions.
75 interface SensorClient { 77 interface SensorClient {
76 // Signals SensorClient when there is an error. 78 // Signals SensorClient when there is an error.
77 RaiseError(); 79 RaiseError();
78 80
79 // Signals SensorClient when reading has been changed (only for sensors with 81 // Signals SensorClient when reading has been changed (only for sensors with
80 // ReportingMode::ON_CHANGE). 82 // ReportingMode::ON_CHANGE).
81 SensorReadingChanged(); 83 SensorReadingChanged();
82 }; 84 };
OLDNEW
« no previous file with comments | « device/generic_sensor/public/cpp/platform_sensor_configuration.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698