| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 SensorReading* reading() const; | 47 SensorReading* reading() const; |
| 48 | 48 |
| 49 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); | 49 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); |
| 50 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); | 50 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); |
| 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); | 51 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| 52 | 52 |
| 53 // ActiveDOMObject implementation. | 53 // ActiveDOMObject implementation. |
| 54 void suspend() override; | 54 void suspend() override; |
| 55 void resume() override; | 55 void resume() override; |
| 56 void stop() override; | 56 void stop() override; |
| 57 |
| 58 // ScriptWrappable implementation. |
| 57 bool hasPendingActivity() const override; | 59 bool hasPendingActivity() const override; |
| 58 | 60 |
| 59 DECLARE_VIRTUAL_TRACE(); | 61 DECLARE_VIRTUAL_TRACE(); |
| 60 | 62 |
| 61 protected: | 63 protected: |
| 62 Sensor(ExecutionContext*, const SensorOptions&); | 64 Sensor(ExecutionContext*, const SensorOptions&); |
| 63 void notifyStateChange(); | 65 void notifyStateChange(); |
| 64 | 66 |
| 65 SensorState m_sensorState; | 67 SensorState m_sensorState; |
| 66 Member<SensorReading> m_sensorReading; | 68 Member<SensorReading> m_sensorReading; |
| 67 SensorOptions m_sensorOptions; | 69 SensorOptions m_sensorOptions; |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 } // namespace blink | 72 } // namespace blink |
| 71 | 73 |
| 72 #endif // Sensor_h | 74 #endif // Sensor_h |
| OLD | NEW |