| OLD | NEW |
| 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 #ifndef Sensor_h | 5 #ifndef Sensor_h |
| 6 #define Sensor_h | 6 #define Sensor_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "core/dom/ActiveDOMObject.h" | 10 #include "core/dom/ActiveDOMObject.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void stopListening(); | 92 void stopListening(); |
| 93 | 93 |
| 94 // Makes sensor reading refresh its values from the shared buffer. | 94 // Makes sensor reading refresh its values from the shared buffer. |
| 95 void pollForData(); | 95 void pollForData(); |
| 96 | 96 |
| 97 void updateState(SensorState newState); | 97 void updateState(SensorState newState); |
| 98 void reportError(); | 98 void reportError(); |
| 99 | 99 |
| 100 void updatePollingStatus(); | 100 void updatePollingStatus(); |
| 101 | 101 |
| 102 void notifySensorReadingChanged(); |
| 103 void notifyStateChanged(); |
| 104 |
| 102 private: | 105 private: |
| 103 Member<SensorReading> m_sensorReading; | 106 Member<SensorReading> m_sensorReading; |
| 104 SensorOptions m_sensorOptions; | 107 SensorOptions m_sensorOptions; |
| 105 device::mojom::blink::SensorType m_type; | 108 device::mojom::blink::SensorType m_type; |
| 106 SensorState m_state; | 109 SensorState m_state; |
| 107 Member<SensorProxy> m_sensorProxy; | 110 Member<SensorProxy> m_sensorProxy; |
| 108 std::unique_ptr<SensorPollingStrategy> m_polling; | 111 std::unique_ptr<SensorPollingStrategy> m_polling; |
| 109 SensorProxy::Reading m_storedData; | 112 SensorProxy::Reading m_storedData; |
| 110 SensorConfigurationPtr m_configuration; | 113 SensorConfigurationPtr m_configuration; |
| 111 }; | 114 }; |
| 112 | 115 |
| 113 } // namespace blink | 116 } // namespace blink |
| 114 | 117 |
| 115 #endif // Sensor_h | 118 #endif // Sensor_h |
| OLD | NEW |