Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index 7a13a828ab98c692dd2ef81743faed2bc8c9e591..44ff17bac21f5bfc3765063539212ff64316cac2 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -79,6 +79,7 @@ |
#include "content/public/common/isolated_world_ids.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/common/url_utils.h" |
+#include "device/sensors/sensor_service.h" |
#include "device/vibration/vibration_manager_impl.h" |
#include "ui/accessibility/ax_tree.h" |
#include "ui/accessibility/ax_tree_update.h" |
@@ -2029,6 +2030,11 @@ void RenderFrameHostImpl::RegisterMojoServices() { |
base::Bind(&device::VRDeviceManager::BindRequest)); |
} |
#endif |
+ // TODO(Mikhail): Add cmd line switch for sensors. |
+ GetServiceRegistry()->AddService(base::Bind( |
+ &device::SensorService::BindRequest, |
+ base::RetainedRef( |
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)))); |
GetContentClient()->browser()->RegisterRenderFrameMojoServices( |
GetServiceRegistry(), this); |