Chromium Code Reviews| Index: content/renderer/device_sensors/device_sensor_event_pump.h |
| diff --git a/content/renderer/device_sensors/device_sensor_event_pump.h b/content/renderer/device_sensors/device_sensor_event_pump.h |
| index b5859079755c0a8c21a5e60fedbf9f17b722af7d..c83239eec501b21b6bca1c003dc911b6dbdfa671 100644 |
| --- a/content/renderer/device_sensors/device_sensor_event_pump.h |
| +++ b/content/renderer/device_sensors/device_sensor_event_pump.h |
| @@ -11,10 +11,12 @@ |
| #include "base/memory/shared_memory.h" |
| #include "base/time/time.h" |
| #include "base/timer/timer.h" |
| +#include "content/public/common/service_manager_connection.h" |
| #include "content/public/renderer/platform_event_observer.h" |
| #include "content/renderer/render_thread_impl.h" |
| #include "mojo/public/cpp/system/platform_handle.h" |
| -#include "services/service_manager/public/cpp/interface_provider.h" |
| +#include "services/device/public/interfaces/constants.mojom.h" |
| +#include "services/service_manager/public/cpp/connector.h" |
| namespace content { |
| @@ -24,7 +26,6 @@ class CONTENT_EXPORT DeviceSensorMojoClientMixin : public Base { |
| template <typename... Args> |
| explicit DeviceSensorMojoClientMixin(Args&&... args) |
| : Base(std::forward<Args>(args)...) { |
| - mojo::InterfaceRequest<MojoInterface> request(&mojo_interface_); |
|
blundell
2017/02/22 16:30:24
The problem is here. You're now not binding |mojo_
|
| // When running layout tests, those observers should not listen to the |
| // actual hardware changes. In order to make that happen, don't connect |
| @@ -34,8 +35,10 @@ class CONTENT_EXPORT DeviceSensorMojoClientMixin : public Base { |
| // is ready and the layout tests are converted to use that for mocking. |
| if (RenderThreadImpl::current() && |
| !RenderThreadImpl::current()->layout_test_mode()) { |
| - RenderThread::Get()->GetRemoteInterfaces()->GetInterface( |
| - std::move(request)); |
| + RenderThreadImpl::current() |
| + ->GetServiceManagerConnection() |
| + ->GetConnector() |
| + ->BindInterface(device::mojom::kServiceName, &mojo_interface_); |
| } |
| } |