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 b4858eae51b1ce11ad612fb3a39c8fe3bcf6bdf3..8597e12d04fee1f93ab54dcecff584f4aa4d6688 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->GetInterfaceProvider()->GetInterface( |
- mojo::MakeRequest(&sensor_provider_)); |
+ Platform::Current()->GetConnector()->BindInterface( |
+ device::mojom::blink::kServiceName, mojo::MakeRequest(&sensor_provider_)); |
sensor_provider_.set_connection_error_handler(ConvertToBaseCallback( |
WTF::Bind(&SensorProviderProxy::OnSensorProviderConnectionError, |
WrapWeakPersistent(this)))); |
@@ -39,7 +40,7 @@ SensorProviderProxy* SensorProviderProxy::From(LocalFrame* frame) { |
provider_proxy = new SensorProviderProxy(*frame); |
Supplement<LocalFrame>::ProvideTo(*frame, SupplementName(), provider_proxy); |
} |
- provider_proxy->InitializeIfNeeded(frame); |
+ provider_proxy->InitializeIfNeeded(); |
return provider_proxy; |
} |