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

Unified Diff: sky/services/sensors/sensors.mojom

Issue 962043002: Expose Android sensors to via Mojo services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Review comments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/services/sensors/org/domokit/sensors/SensorServiceImpl.java ('k') | sky/shell/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+};
« no previous file with comments | « sky/services/sensors/org/domokit/sensors/SensorServiceImpl.java ('k') | sky/shell/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698