Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2037513002: Convert device_sensors to use mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@conversion--mime-registry
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/device_sensors/device_sensor_message_filter.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1c2f0563339e1c2e50a061de70bbf36b4b93ecab..ae6265019aabb14cc79d9138c1aaec679ad118c3 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -60,10 +60,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"
@@ -1015,10 +1012,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));
@@ -1068,6 +1061,17 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
base::Bind(&MimeRegistryImpl::Create),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
+ GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceLightHost::Create),
+ io_task_runner);
+ GetInterfaceRegistry()->AddInterface(base::Bind(&DeviceMotionHost::Create),
+ io_task_runner);
+ GetInterfaceRegistry()->AddInterface(
+ base::Bind(&DeviceOrientationHost::Create), io_task_runner);
+ GetInterfaceRegistry()->AddInterface(
+ base::Bind(&DeviceOrientationAbsoluteHost::Create), io_task_runner);
+
#if defined(OS_ANDROID)
ServiceRegistrarAndroid::RegisterProcessHostServices(
mojo_child_connection_->service_registry_android());
« no previous file with comments | « content/browser/device_sensors/device_sensor_message_filter.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698