Chromium Code Reviews| Index: third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp |
| diff --git a/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp b/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp |
| index 45e61e7d48d0a63fe10a75f691d8e9783a8e1316..9dcd2fb36494682edfa16cba41809f79266a0948 100644 |
| --- a/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp |
| +++ b/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp |
| @@ -6,8 +6,9 @@ |
| #include "modules/sensor/SensorProxy.h" |
| #include "platform/mojo/MojoHelper.h" |
| -#include "public/platform/InterfaceProvider.h" |
| #include "public/platform/Platform.h" |
| +#include "services/device/public/interfaces/constants.mojom-blink.h" |
| +#include "services/service_manager/public/cpp/connector.h" |
| namespace blink { |
| @@ -15,12 +16,12 @@ namespace blink { |
| SensorProviderProxy::SensorProviderProxy(LocalFrame& frame) |
| : Supplement<LocalFrame>(frame) {} |
| -void SensorProviderProxy::initializeIfNeeded(LocalFrame* frame) { |
| +void SensorProviderProxy::initializeIfNeeded() { |
| if (isInitialized()) |
| return; |
| - frame->interfaceProvider()->getInterface( |
| - mojo::MakeRequest(&m_sensorProvider)); |
| + Platform::current()->connector()->BindInterface( |
|
blundell
2017/03/29 09:41:59
Just to sanity-check: This feature doesn't have la
ke.he
2017/03/29 10:05:11
It has, in LayoutTests/sensor/resources/.
That's
|
| + device::mojom::blink::kServiceName, mojo::MakeRequest(&m_sensorProvider)); |
| m_sensorProvider.set_connection_error_handler(convertToBaseCallback( |
| WTF::bind(&SensorProviderProxy::onSensorProviderConnectionError, |
| wrapWeakPersistent(this)))); |
| @@ -39,7 +40,7 @@ SensorProviderProxy* SensorProviderProxy::from(LocalFrame* frame) { |
| providerProxy = new SensorProviderProxy(*frame); |
| Supplement<LocalFrame>::provideTo(*frame, supplementName(), providerProxy); |
| } |
| - providerProxy->initializeIfNeeded(frame); |
| + providerProxy->initializeIfNeeded(); |
| return providerProxy; |
| } |