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

Side by Side Diff: third_party/WebKit/Source/modules/battery/NavigatorBattery.cpp

Issue 1093103003: [cleanup, battery] Don't include unneeded headers. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tim's comments Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/modules/battery/NavigatorBattery.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/battery/NavigatorBattery.h" 5 #include "modules/battery/NavigatorBattery.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h"
7 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
8 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
9 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
10 #include "core/frame/LocalDOMWindow.h" 11 #include "core/frame/LocalDOMWindow.h"
12 #include "core/frame/Navigator.h"
11 #include "modules/battery/BatteryManager.h" 13 #include "modules/battery/BatteryManager.h"
14 #include "platform/bindings/ScriptState.h"
12 15
13 namespace blink { 16 namespace blink {
14 17
15 NavigatorBattery::NavigatorBattery(Navigator& navigator) 18 NavigatorBattery::NavigatorBattery(Navigator& navigator)
16 : Supplement<Navigator>(navigator) {} 19 : Supplement<Navigator>(navigator) {}
17 20
18 ScriptPromise NavigatorBattery::getBattery(ScriptState* script_state, 21 ScriptPromise NavigatorBattery::getBattery(ScriptState* script_state,
19 Navigator& navigator) { 22 Navigator& navigator) {
20 return NavigatorBattery::From(navigator).getBattery(script_state); 23 return NavigatorBattery::From(navigator).getBattery(script_state);
21 } 24 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 60 }
58 return *supplement; 61 return *supplement;
59 } 62 }
60 63
61 DEFINE_TRACE(NavigatorBattery) { 64 DEFINE_TRACE(NavigatorBattery) {
62 visitor->Trace(battery_manager_); 65 visitor->Trace(battery_manager_);
63 Supplement<Navigator>::Trace(visitor); 66 Supplement<Navigator>::Trace(visitor);
64 } 67 }
65 68
66 } // namespace blink 69 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/battery/NavigatorBattery.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698