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

Side by Side Diff: content/renderer/battery_status/fake_battery_status_dispatcher.cc

Issue 470683002: Revert "Refactor code listening to platform events in content/renderer/." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 #include "fake_battery_status_dispatcher.h"
6
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h"
10 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h"
11
12 namespace content {
13
14 FakeBatteryStatusDispatcher::FakeBatteryStatusDispatcher() : listener_(0) {
15 }
16
17 void FakeBatteryStatusDispatcher::SetListener(
18 blink::WebBatteryStatusListener* listener) {
19 listener_ = listener;
20 }
21
22 void FakeBatteryStatusDispatcher::PostBatteryStatusChange(
23 const blink::WebBatteryStatus& status) {
24 if (listener_)
25 listener_->updateBatteryStatus(status);
26 }
27
28 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698