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

Side by Side Diff: third_party/WebKit/Source/modules/sensor/SensorProxy.cpp

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/sensor/SensorProxy.h" 5 #include "modules/sensor/SensorProxy.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "modules/sensor/SensorProviderProxy.h" 8 #include "modules/sensor/SensorProviderProxy.h"
9 #include "modules/sensor/SensorReading.h" 9 #include "modules/sensor/SensorReading.h"
10 #include "platform/mojo/MojoHelper.h" 10 #include "platform/mojo/MojoHelper.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 m_provider->getSensorProvider()->GetSensor(m_type, mojo::GetProxy(&m_sensor), 66 m_provider->getSensorProvider()->GetSensor(m_type, mojo::GetProxy(&m_sensor),
67 callback); 67 callback);
68 } 68 }
69 69
70 void SensorProxy::addConfiguration( 70 void SensorProxy::addConfiguration(
71 SensorConfigurationPtr configuration, 71 SensorConfigurationPtr configuration,
72 std::unique_ptr<Function<void(bool)>> callback) { 72 std::unique_ptr<Function<void(bool)>> callback) {
73 DCHECK(isInitialized()); 73 DCHECK(isInitialized());
74 auto wrapper = WTF::bind(&SensorProxy::onAddConfigurationCompleted, 74 auto wrapper = WTF::bind(&SensorProxy::onAddConfigurationCompleted,
75 wrapWeakPersistent(this), configuration->frequency, 75 wrapWeakPersistent(this), configuration->frequency,
76 passed(std::move(callback))); 76 WTF::passed(std::move(callback)));
77 m_sensor->AddConfiguration(std::move(configuration), 77 m_sensor->AddConfiguration(std::move(configuration),
78 convertToBaseCallback(std::move(wrapper))); 78 convertToBaseCallback(std::move(wrapper)));
79 } 79 }
80 80
81 void SensorProxy::removeConfiguration(SensorConfigurationPtr configuration) { 81 void SensorProxy::removeConfiguration(SensorConfigurationPtr configuration) {
82 DCHECK(isInitialized()); 82 DCHECK(isInitialized());
83 auto callback = WTF::bind(&SensorProxy::onRemoveConfigurationCompleted, 83 auto callback = WTF::bind(&SensorProxy::onRemoveConfigurationCompleted,
84 wrapWeakPersistent(this), configuration->frequency); 84 wrapWeakPersistent(this), configuration->frequency);
85 m_sensor->RemoveConfiguration(std::move(configuration), 85 m_sensor->RemoveConfiguration(std::move(configuration),
86 convertToBaseCallback(std::move(callback))); 86 convertToBaseCallback(std::move(callback)));
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 updateSensorReading(); 294 updateSensorReading();
295 m_timer.startRepeating(repeatInterval, BLINK_FROM_HERE); 295 m_timer.startRepeating(repeatInterval, BLINK_FROM_HERE);
296 } 296 }
297 } 297 }
298 298
299 void SensorProxy::onTimerFired(TimerBase*) { 299 void SensorProxy::onTimerFired(TimerBase*) {
300 updateSensorReading(); 300 updateSensorReading();
301 } 301 }
302 302
303 } // namespace blink 303 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698