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

Side by Side Diff: Source/modules/battery/BatteryDispatcher.cpp

Issue 246773007: Add setBatteryListener into Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add double space between sections. Created 6 years, 8 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 | « Source/modules/battery/BatteryDispatcher.h ('k') | public/platform/Platform.h » ('j') | 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 "config.h" 5 #include "config.h"
6 #include "modules/battery/BatteryDispatcher.h" 6 #include "modules/battery/BatteryDispatcher.h"
7 7
8 #include "core/events/Event.h" 8 #include "core/events/Event.h"
9 #include "modules/battery/BatteryStatus.h" 9 #include "modules/battery/BatteryStatus.h"
10 #include "platform/NotImplemented.h" 10 #include "platform/NotImplemented.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 static_cast<BatteryManager*>(m_controllers[i])->didChangeBattery Status(event); 78 static_cast<BatteryManager*>(m_controllers[i])->didChangeBattery Status(event);
79 } 79 }
80 } 80 }
81 81
82 if (m_needsPurge) 82 if (m_needsPurge)
83 purgeControllers(); 83 purgeControllers();
84 } 84 }
85 85
86 void BatteryDispatcher::startListening() 86 void BatteryDispatcher::startListening()
87 { 87 {
88 notImplemented(); 88 blink::Platform::current()->setBatteryStatusListener(this);
89 } 89 }
90 90
91 void BatteryDispatcher::stopListening() 91 void BatteryDispatcher::stopListening()
92 { 92 {
93 notImplemented(); 93 blink::Platform::current()->setBatteryStatusListener(0);
94 } 94 }
95 95
96 } 96 }
OLDNEW
« no previous file with comments | « Source/modules/battery/BatteryDispatcher.h ('k') | public/platform/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698