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 NavigatorBattery_h | 5 #ifndef NavigatorBattery_h |
6 #define NavigatorBattery_h | 6 #define NavigatorBattery_h |
7 | 7 |
8 #include "core/frame/Navigator.h" | 8 #include "core/frame/Navigator.h" |
9 #include "heap/Handle.h" | |
9 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
10 | 11 |
11 namespace WebCore { | 12 namespace WebCore { |
12 | 13 |
13 class BatteryManager; | 14 class BatteryManager; |
14 class Navigator; | 15 class Navigator; |
15 | 16 |
16 class NavigatorBattery : public Supplement<Navigator> { | 17 class NavigatorBattery : public NoBaseWillBeGarbageCollectedFinalized<NavigatorB attery>, public WillBeHeapSupplement<Navigator> { |
haraken
2014/03/19 04:02:36
Add FINAL.
| |
18 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorBattery); | |
17 public: | 19 public: |
18 virtual ~NavigatorBattery(); | 20 virtual ~NavigatorBattery(); |
19 | 21 |
20 static NavigatorBattery& from(Navigator&); | 22 static NavigatorBattery& from(Navigator&); |
21 | 23 |
22 static BatteryManager* battery(Navigator&); | 24 static BatteryManager* battery(Navigator&); |
23 BatteryManager* batteryManager(Navigator&); | 25 BatteryManager* batteryManager(Navigator&); |
24 | 26 |
27 virtual void trace(Visitor*); | |
haraken
2014/03/19 04:02:36
Drop virtual.
| |
28 | |
25 private: | 29 private: |
26 NavigatorBattery(); | 30 NavigatorBattery(); |
27 static const char* supplementName(); | 31 static const char* supplementName(); |
28 | 32 |
29 RefPtr<BatteryManager> m_batteryManager; | 33 RefPtrWillBeMember<BatteryManager> m_batteryManager; |
30 }; | 34 }; |
31 | 35 |
32 } // namespace WebCore | 36 } // namespace WebCore |
33 | 37 |
34 #endif // NavigatorBattery_h | 38 #endif // NavigatorBattery_h |
OLD | NEW |