OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NavigatorBattery_h |
| 6 #define NavigatorBattery_h |
| 7 |
| 8 #include "core/frame/Navigator.h" |
| 9 #include "platform/Supplementable.h" |
| 10 |
| 11 namespace WebCore { |
| 12 |
| 13 class BatteryManager; |
| 14 class Navigator; |
| 15 |
| 16 class NavigatorBattery : public Supplement<Navigator> { |
| 17 public: |
| 18 virtual ~NavigatorBattery(); |
| 19 |
| 20 static NavigatorBattery& from(Navigator&); |
| 21 |
| 22 static BatteryManager* battery(Navigator&); |
| 23 BatteryManager* batteryManager(Navigator&); |
| 24 |
| 25 private: |
| 26 explicit NavigatorBattery(); |
| 27 static const char* supplementName(); |
| 28 |
| 29 RefPtr<BatteryManager> m_batteryManager; |
| 30 }; |
| 31 |
| 32 } // namespace WebCore |
| 33 |
| 34 #endif // NavigatorBattery_h |
OLD | NEW |