Chromium Code Reviews| 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 class ScriptExecutionContext; | |
|
abarth-chromium
2014/02/28 06:45:14
This forward declaration doesn't appear to be used
| |
| 16 | |
| 17 class NavigatorBattery : public Supplement<Navigator>, DOMWindowProperty { | |
|
abarth-chromium
2014/02/28 06:45:14
Why does this class need to be a DOMWindowProperty
| |
| 18 public: | |
| 19 virtual ~NavigatorBattery(); | |
| 20 | |
| 21 static NavigatorBattery& from(Navigator&); | |
| 22 | |
| 23 static BatteryManager* battery(Navigator&); | |
| 24 BatteryManager* battery(); | |
| 25 | |
| 26 BatteryManager* batteryManager(); | |
|
abarth-chromium
2014/02/28 06:45:14
What's the difference between battery() and batter
| |
| 27 | |
| 28 private: | |
| 29 NavigatorBattery(Frame*); | |
|
abarth-chromium
2014/02/28 06:45:14
Please mark one-argument constructors explicit.
| |
| 30 static const char* supplementName(); | |
| 31 | |
| 32 RefPtr<BatteryManager> m_batteryManager; | |
| 33 }; | |
| 34 | |
| 35 } // namespace WebCore | |
| 36 | |
| 37 #endif // NavigatorBattery_h | |
| 38 | |
| 39 | |
|
abarth-chromium
2014/02/28 06:45:14
Please remove these extra blank lines at the end o
| |
| OLD | NEW |