OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 BatteryManager_h | 5 #ifndef BatteryManager_h |
6 #define BatteryManager_h | 6 #define BatteryManager_h |
7 | 7 |
8 #include "bindings/core/v8/ActiveScriptWrappable.h" | 8 #include "bindings/core/v8/ActiveScriptWrappable.h" |
9 #include "bindings/core/v8/ScriptPromise.h" | 9 #include "bindings/core/v8/ScriptPromise.h" |
10 #include "bindings/core/v8/ScriptPromiseProperty.h" | 10 #include "bindings/core/v8/ScriptPromiseProperty.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 void didUpdateData() override; | 45 void didUpdateData() override; |
46 void registerWithDispatcher() override; | 46 void registerWithDispatcher() override; |
47 void unregisterWithDispatcher() override; | 47 void unregisterWithDispatcher() override; |
48 bool hasLastData() override; | 48 bool hasLastData() override; |
49 | 49 |
50 // ActiveDOMObject implementation. | 50 // ActiveDOMObject implementation. |
51 void suspend() override; | 51 void suspend() override; |
52 void resume() override; | 52 void resume() override; |
53 void stop() override; | 53 void stop() override; |
54 | 54 |
55 // ActiveScriptWrappable implementation. | 55 // ScriptWrappable implementation. |
56 bool hasPendingActivity() const final; | 56 bool hasPendingActivity() const final; |
57 | 57 |
58 DECLARE_VIRTUAL_TRACE(); | 58 DECLARE_VIRTUAL_TRACE(); |
59 | 59 |
60 private: | 60 private: |
61 explicit BatteryManager(ExecutionContext*); | 61 explicit BatteryManager(ExecutionContext*); |
62 | 62 |
63 using BatteryProperty = ScriptPromiseProperty<Member<BatteryManager>, Member
<BatteryManager>, Member<DOMException>>; | 63 using BatteryProperty = ScriptPromiseProperty<Member<BatteryManager>, Member
<BatteryManager>, Member<DOMException>>; |
64 Member<BatteryProperty> m_batteryProperty; | 64 Member<BatteryProperty> m_batteryProperty; |
65 BatteryStatus m_batteryStatus; | 65 BatteryStatus m_batteryStatus; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace blink | 68 } // namespace blink |
69 | 69 |
70 #endif // BatteryManager_h | 70 #endif // BatteryManager_h |
OLD | NEW |