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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2144623003: [sensors] Introduce Generic Sensor API interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from Tim and Reilly Created 4 years, 4 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/DEPS ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ec402d5f1e27adf7dae049e9632c55869854705a..90d82a56454a2f0c2445c239d5e30e9e44eb1b71 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -80,6 +80,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/generic_sensor/sensor_service.h"
#include "device/geolocation/geolocation_service_context.h"
#include "device/vibration/vibration_manager_impl.h"
#include "media/mojo/interfaces/media_service.mojom.h"
@@ -2141,6 +2142,13 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
base::Bind(&device::VRServiceImpl::BindRequest));
}
#endif
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableGenericSensors)) {
+ GetInterfaceRegistry()->AddInterface(base::Bind(
+ &device::SensorService::BindRequest,
+ base::RetainedRef(
Reilly Grant (use Gerrit) 2016/08/10 18:00:19 base::RetainedRef() is not necessary here as GetTa
Mikhail 2016/08/10 18:16:50 Done.
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))));
+ }
GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces(
GetInterfaceRegistry(), this);
« no previous file with comments | « content/browser/DEPS ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698