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 "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 bool charging(); | 28 bool charging(); |
29 double chargingTime(); | 29 double chargingTime(); |
30 double dischargingTime(); | 30 double dischargingTime(); |
31 double level(); | 31 double level(); |
32 | 32 |
33 DEFINE_ATTRIBUTE_EVENT_LISTENER(chargingchange); | 33 DEFINE_ATTRIBUTE_EVENT_LISTENER(chargingchange); |
34 DEFINE_ATTRIBUTE_EVENT_LISTENER(chargingtimechange); | 34 DEFINE_ATTRIBUTE_EVENT_LISTENER(chargingtimechange); |
35 DEFINE_ATTRIBUTE_EVENT_LISTENER(dischargingtimechange); | 35 DEFINE_ATTRIBUTE_EVENT_LISTENER(dischargingtimechange); |
36 DEFINE_ATTRIBUTE_EVENT_LISTENER(levelchange); | 36 DEFINE_ATTRIBUTE_EVENT_LISTENER(levelchange); |
37 | 37 |
38 void didChangeBatteryStatus(PassRefPtr<Event>, PassOwnPtr<BatteryStatus>); | 38 void didChangeBatteryStatus(PassRefPtrWillBeRawPtr<Event>, PassOwnPtr<Batter
yStatus>); |
39 | 39 |
40 void trace(Visitor*) { } | 40 void trace(Visitor*) { } |
41 | 41 |
42 private: | 42 private: |
43 explicit BatteryManager(ExecutionContext*); | 43 explicit BatteryManager(ExecutionContext*); |
44 | 44 |
45 OwnPtr<BatteryStatus> m_batteryStatus; | 45 OwnPtr<BatteryStatus> m_batteryStatus; |
46 }; | 46 }; |
47 | 47 |
48 } | 48 } |
49 | 49 |
50 #endif // BatteryManager_h | 50 #endif // BatteryManager_h |
51 | 51 |
OLD | NEW |