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

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

Issue 829803003: Adding Chrome-side WebVR interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated to use Mojo as requested by eng review 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
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 99f120c9f833c3c3788ab417233ffd0d58ab20aa..8fdc70f833ff24656192effcfe4766b2f655d772 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -80,6 +80,10 @@
#include "media/mojo/services/mojo_renderer_service.h"
#endif
+#if defined(ENABLE_WEBVR)
+#include "content/browser/vr/vr_service_impl.h"
+#endif
+
using base::TimeDelta;
namespace content {
@@ -1557,6 +1561,16 @@ void RenderFrameHostImpl::RegisterMojoServices() {
base::Bind(&CreateMediaRendererService));
#endif
+#if defined(ENABLE_WEBVR)
+ const base::CommandLine& browser_command_line =
+ *base::CommandLine::ForCurrentProcess();
+
+ if (browser_command_line.HasSwitch(switches::kEnableWebVR)) {
+ GetServiceRegistry()->AddService<VRService>(
+ base::Bind(&VRServiceImpl::Create));
+ }
+#endif
+
GetContentClient()->browser()->OverrideRenderFrameMojoServices(
GetServiceRegistry(), this);
}

Powered by Google App Engine
This is Rietveld 408576698