Index: sky/services/sensors/sensors.mojom |
diff --git a/sky/services/sensors/sensors.mojom b/sky/services/sensors/sensors.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0e3b704f51581f65abb3d32371f3abb3d8c7a77a |
--- /dev/null |
+++ b/sky/services/sensors/sensors.mojom |
@@ -0,0 +1,42 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+module sensors; |
+ |
+enum SensorType { |
+ ACCELEROMETER, |
+ AMBIENT_TEMPERATURE, |
+ GAME_ROTATION_VECTOR, |
+ GEOMAGNETIC_ROTATION_VECTOR, |
+ GRAVITY, |
+ GYROSCOPE, |
+ GYROSCOPE_UNCALIBRATED, |
+ HEART_RATE, |
+ LIGHT, |
+ LINEAR_ACCELERATION, |
+ MAGNETIC_FIELD, |
+ MAGNETIC_FIELD_UNCALIBRATED, |
+ PRESSURE, |
+ PROXIMITY, |
+ RELATIVE_HUMIDITY, |
+ ROTATION_VECTOR, |
+ SIGNIFICANT_MOTION, |
+ STEP_COUNTER, |
+ STEP_DETECTOR, |
+}; |
+ |
+struct SensorData { |
+ int32 accuracy; |
+ int64 time_stamp; |
+ array<float> values; |
+}; |
+ |
+interface SensorListener { |
+ OnAccuracyChanged(int32 accuracy); |
+ OnSensorChanged(SensorData data); |
+}; |
+ |
+interface SensorService { |
+ AddListener(SensorType type, SensorListener listener); |
+}; |