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

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

Issue 1164563003: Extract device_sensors to /device via Mojofication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/sensor_manager_chromeos_unittest.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 7e750a5aec7a526b787ca1f50cfd9ed27e9bbfb4..3111265c670bd6bce7ee01591be1f5243526f2ce 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -47,9 +47,6 @@
#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_message_filter.h"
#include "content/browser/dom_storage/dom_storage_context_wrapper.h"
#include "content/browser/dom_storage/dom_storage_message_filter.h"
#include "content/browser/download/mhtml_generation_manager.h"
@@ -143,6 +140,9 @@
#include "content/public/common/sandboxed_process_launcher_delegate.h"
#include "content/public/common/url_constants.h"
#include "device/battery/battery_monitor_impl.h"
+#include "device/device_sensors/device_sensors_light_impl.h"
+#include "device/device_sensors/device_sensors_motion_impl.h"
+#include "device/device_sensors/device_sensors_orientation_impl.h"
#include "device/vibration/vibration_manager_impl.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buffer/client/gpu_switches.h"
@@ -912,9 +912,6 @@ void RenderProcessHostImpl::CreateMessageFilters() {
AddFilter(notification_message_filter_.get());
AddFilter(new GamepadBrowserMessageFilter());
- AddFilter(new DeviceLightMessageFilter());
- AddFilter(new DeviceMotionMessageFilter());
- AddFilter(new DeviceOrientationMessageFilter());
AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER));
AddFilter(new HistogramMessageFilter());
#if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID))
@@ -944,6 +941,17 @@ void RenderProcessHostImpl::RegisterMojoServices() {
mojo_application_host_->service_registry()->AddService(
base::Bind(&device::VibrationManagerImpl::Create));
+ scoped_refptr<base::SingleThreadTaskRunner> io_runner =
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
+ mojo_application_host_->service_registry()->AddService(
+ base::Bind(&device::DeviceSensorsMotionImpl::Create, io_runner));
+
+ mojo_application_host_->service_registry()->AddService(
+ base::Bind(&device::DeviceSensorsLightImpl::Create, io_runner));
+
+ mojo_application_host_->service_registry()->AddService(
+ base::Bind(&device::DeviceSensorsOrientationImpl::Create, io_runner));
+
mojo_application_host_->service_registry()->AddService(
base::Bind(&PermissionServiceContext::CreateService,
base::Unretained(permission_service_context_.get())));
« no previous file with comments | « content/browser/device_sensors/sensor_manager_chromeos_unittest.cc ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698