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 2fc1b165e66f19102e73f88d982b7ddd9c21485d..28b9d655c9da52c848449a4e92f0a0d6c2edf0bd 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" |
@@ -1009,10 +1006,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)); |
@@ -1057,6 +1050,17 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { |
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()); |