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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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
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/BatteryDispatcher.h" 5 #include "modules/battery/BatteryDispatcher.h"
6 6
7 #include "platform/mojo/MojoHelper.h" 7 #include "platform/mojo/MojoHelper.h"
8 #include "public/platform/InterfaceProvider.h" 8 #include "public/platform/InterfaceProvider.h"
9 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
10 #include "wtf/Assertions.h" 10 #include "wtf/Assertions.h"
(...skipping 27 matching lines...) Expand all
38 void BatteryDispatcher::updateBatteryStatus( 38 void BatteryDispatcher::updateBatteryStatus(
39 const BatteryStatus& batteryStatus) { 39 const BatteryStatus& batteryStatus) {
40 m_batteryStatus = batteryStatus; 40 m_batteryStatus = batteryStatus;
41 m_hasLatestData = true; 41 m_hasLatestData = true;
42 notifyControllers(); 42 notifyControllers();
43 } 43 }
44 44
45 void BatteryDispatcher::startListening() { 45 void BatteryDispatcher::startListening() {
46 DCHECK(!m_monitor.is_bound()); 46 DCHECK(!m_monitor.is_bound());
47 Platform::current()->interfaceProvider()->getInterface( 47 Platform::current()->interfaceProvider()->getInterface(
48 mojo::GetProxy(&m_monitor)); 48 mojo::MakeRequest(&m_monitor));
49 queryNextStatus(); 49 queryNextStatus();
50 } 50 }
51 51
52 void BatteryDispatcher::stopListening() { 52 void BatteryDispatcher::stopListening() {
53 m_monitor.reset(); 53 m_monitor.reset();
54 m_hasLatestData = false; 54 m_hasLatestData = false;
55 } 55 }
56 56
57 } // namespace blink 57 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698