Chromium Code Reviews| Index: Source/modules/battery/NavigatorBattery.h |
| diff --git a/Source/modules/battery/NavigatorBattery.h b/Source/modules/battery/NavigatorBattery.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..754ef7d01496705a5caf3c1b347241b0824589aa |
| --- /dev/null |
| +++ b/Source/modules/battery/NavigatorBattery.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NavigatorBattery_h |
| +#define NavigatorBattery_h |
| + |
| +#include "core/frame/Navigator.h" |
| +#include "platform/Supplementable.h" |
| + |
| +namespace WebCore { |
| + |
| +class BatteryManager; |
| +class Navigator; |
| + |
| +class NavigatorBattery : public Supplement<Navigator> { |
| +public: |
| + virtual ~NavigatorBattery(); |
| + |
| + static NavigatorBattery& from(Navigator&); |
| + |
| + static BatteryManager* battery(Navigator&); |
| + BatteryManager* batteryManager(Navigator&); |
| + |
| +private: |
| + explicit NavigatorBattery(); |
|
Inactive
2014/03/06 13:45:39
A bit odd to make this constructor explicit since
|
| + static const char* supplementName(); |
| + |
| + RefPtr<BatteryManager> m_batteryManager; |
| +}; |
| + |
| +} // namespace WebCore |
| + |
| +#endif // NavigatorBattery_h |