OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 [DartPackage="mojo_services"] |
5 module sensors; | 6 module sensors; |
6 | 7 |
7 enum SensorType { | 8 enum SensorType { |
8 ACCELEROMETER, | 9 ACCELEROMETER, |
9 AMBIENT_TEMPERATURE, | 10 AMBIENT_TEMPERATURE, |
10 GAME_ROTATION_VECTOR, | 11 GAME_ROTATION_VECTOR, |
11 GEOMAGNETIC_ROTATION_VECTOR, | 12 GEOMAGNETIC_ROTATION_VECTOR, |
12 GRAVITY, | 13 GRAVITY, |
13 GYROSCOPE, | 14 GYROSCOPE, |
14 GYROSCOPE_UNCALIBRATED, | 15 GYROSCOPE_UNCALIBRATED, |
(...skipping 18 matching lines...) Expand all Loading... |
33 }; | 34 }; |
34 | 35 |
35 interface SensorListener { | 36 interface SensorListener { |
36 OnAccuracyChanged(int32 accuracy); | 37 OnAccuracyChanged(int32 accuracy); |
37 OnSensorChanged(SensorData data); | 38 OnSensorChanged(SensorData data); |
38 }; | 39 }; |
39 | 40 |
40 interface SensorService { | 41 interface SensorService { |
41 AddListener(SensorType type, SensorListener listener); | 42 AddListener(SensorType type, SensorListener listener); |
42 }; | 43 }; |
OLD | NEW |