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 "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
9 #include "core/dom/DOMHighResTimeStamp.h" | 9 #include "core/dom/DOMHighResTimeStamp.h" |
10 #include "core/dom/DOMTimeStamp.h" | 10 #include "core/dom/DOMTimeStamp.h" |
11 #include "core/dom/SuspendableObject.h" | 11 #include "core/dom/SuspendableObject.h" |
12 #include "core/frame/PlatformEventController.h" | 12 #include "core/frame/PlatformEventController.h" |
13 #include "modules/EventTargetModules.h" | 13 #include "modules/EventTargetModules.h" |
14 #include "modules/sensor/SensorOptions.h" | 14 #include "modules/sensor/SensorOptions.h" |
15 #include "modules/sensor/SensorProxy.h" | 15 #include "modules/sensor/SensorProxy.h" |
| 16 #include "platform/WebTaskRunner.h" |
16 #include "platform/bindings/ActiveScriptWrappable.h" | 17 #include "platform/bindings/ActiveScriptWrappable.h" |
17 #include "platform/bindings/ScriptWrappable.h" | 18 #include "platform/bindings/ScriptWrappable.h" |
18 #include "platform/heap/Handle.h" | 19 #include "platform/heap/Handle.h" |
19 | 20 |
20 namespace blink { | 21 namespace blink { |
21 | 22 |
22 class DOMException; | 23 class DOMException; |
23 class ExceptionState; | 24 class ExceptionState; |
24 class ExecutionContext; | 25 class ExecutionContext; |
25 class SensorReading; | 26 class SensorReading; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 void NotifyOnActivate(); | 109 void NotifyOnActivate(); |
109 void NotifyError(DOMException* error); | 110 void NotifyError(DOMException* error); |
110 | 111 |
111 private: | 112 private: |
112 SensorOptions sensor_options_; | 113 SensorOptions sensor_options_; |
113 device::mojom::blink::SensorType type_; | 114 device::mojom::blink::SensorType type_; |
114 SensorState state_; | 115 SensorState state_; |
115 Member<SensorProxy> sensor_proxy_; | 116 Member<SensorProxy> sensor_proxy_; |
116 device::SensorReading reading_; | 117 device::SensorReading reading_; |
117 SensorConfigurationPtr configuration_; | 118 SensorConfigurationPtr configuration_; |
118 bool pending_reading_update_; | 119 TaskHandle pending_reading_update_; |
119 }; | 120 }; |
120 | 121 |
121 } // namespace blink | 122 } // namespace blink |
122 | 123 |
123 #endif // Sensor_h | 124 #endif // Sensor_h |
OLD | NEW |