Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index ffba7d094627d8873b1dbe6b473176b524fe1ded..bef52ccd468589c77379408e1db1e2218273c11c 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -59,10 +59,7 @@ |
#include "content/browser/cache_storage/cache_storage_context_impl.h" |
#include "content/browser/cache_storage/cache_storage_dispatcher_host.h" |
#include "content/browser/child_process_security_policy_impl.h" |
-#include "content/browser/device_sensors/device_light_message_filter.h" |
-#include "content/browser/device_sensors/device_motion_message_filter.h" |
-#include "content/browser/device_sensors/device_orientation_absolute_message_filter.h" |
-#include "content/browser/device_sensors/device_orientation_message_filter.h" |
+#include "content/browser/device_sensors/device_sensor_host.h" |
#include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
#include "content/browser/dom_storage/dom_storage_message_filter.h" |
#include "content/browser/fileapi/fileapi_message_filter.h" |
@@ -1013,10 +1010,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { |
AddFilter(notification_message_filter_.get()); |
AddFilter(new GamepadBrowserMessageFilter()); |
- AddFilter(new DeviceLightMessageFilter()); |
- AddFilter(new DeviceMotionMessageFilter()); |
- AddFilter(new DeviceOrientationMessageFilter()); |
- AddFilter(new DeviceOrientationAbsoluteMessageFilter()); |
AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
AddFilter(new HistogramMessageFilter()); |
AddFilter(new MemoryMessageFilter(this)); |
@@ -1093,6 +1086,17 @@ void RenderProcessHostImpl::RegisterMojoServices() { |
base::Bind(&MimeRegistryImpl::Create), |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = |
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
+ mojo_application_host_->service_registry()->AddService( |
+ base::Bind(&DeviceLightHost::Create), io_task_runner); |
+ mojo_application_host_->service_registry()->AddService( |
+ base::Bind(&DeviceMotionHost::Create), io_task_runner); |
+ mojo_application_host_->service_registry()->AddService( |
+ base::Bind(&DeviceOrientationHost::Create), io_task_runner); |
+ mojo_application_host_->service_registry()->AddService( |
+ base::Bind(&DeviceOrientationAbsoluteHost::Create), io_task_runner); |
+ |
#if defined(OS_ANDROID) |
ServiceRegistrarAndroid::RegisterProcessHostServices( |
mojo_application_host_->service_registry_android()); |