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..5ee20bff8ba4b4cde49756661f4c133224ea3de9 |
--- /dev/null |
+++ b/Source/modules/battery/NavigatorBattery.h |
@@ -0,0 +1,39 @@ |
+// 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 ScriptExecutionContext; |
abarth-chromium
2014/02/28 06:45:14
This forward declaration doesn't appear to be used
|
+ |
+class NavigatorBattery : public Supplement<Navigator>, DOMWindowProperty { |
abarth-chromium
2014/02/28 06:45:14
Why does this class need to be a DOMWindowProperty
|
+public: |
+ virtual ~NavigatorBattery(); |
+ |
+ static NavigatorBattery& from(Navigator&); |
+ |
+ static BatteryManager* battery(Navigator&); |
+ BatteryManager* battery(); |
+ |
+ BatteryManager* batteryManager(); |
abarth-chromium
2014/02/28 06:45:14
What's the difference between battery() and batter
|
+ |
+private: |
+ NavigatorBattery(Frame*); |
abarth-chromium
2014/02/28 06:45:14
Please mark one-argument constructors explicit.
|
+ static const char* supplementName(); |
+ |
+ RefPtr<BatteryManager> m_batteryManager; |
+}; |
+ |
+} // namespace WebCore |
+ |
+#endif // NavigatorBattery_h |
+ |
+ |
abarth-chromium
2014/02/28 06:45:14
Please remove these extra blank lines at the end o
|