Chromium Code Reviews| 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 module sensors; | 5 module sensors; |
| 6 | 6 |
| 7 enum SensorType { | 7 enum SensorType { |
| 8 ACCELEROMETER, | 8 ACCELEROMETER, |
| 9 AMBIENT_TEMPERATURE, | 9 AMBIENT_TEMPERATURE, |
| 10 GAME_ROTATION_VECTOR, | 10 GAME_ROTATION_VECTOR, |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 int64 time_stamp; | 31 int64 time_stamp; |
| 32 array<float> values; | 32 array<float> values; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 interface SensorListener { | 35 interface SensorListener { |
| 36 OnAccuracyChanged(int32 accuracy); | 36 OnAccuracyChanged(int32 accuracy); |
| 37 OnSensorChanged(SensorData data); | 37 OnSensorChanged(SensorData data); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 interface SensorService { | 40 interface SensorService { |
| 41 AddListener(SensorType type, SensorListener listener); | 41 AddListener(SensorType type, SensorListener listener); |
|
qsr
2015/04/21 08:28:45
I though we didn't want to use the observer patter
DaveMoore
2015/04/21 15:00:07
This was lifted as is from the Sky implementation.
qsr
2015/04/21 15:59:32
Ok. Let's see that in another CL.
| |
| 42 }; | 42 }; |
| OLD | NEW |