Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: Source/modules/battery/NavigatorBattery.h

Issue 182613002: Add support to Battery Status API in blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add to RunTimeEnabledFeatures Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698