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/renderer/renderer_blink_platform_impl.cc

Issue 829803003: Adding Chrome-side WebVR interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed the rest of sievers@ input Created 5 years, 9 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/renderer/renderer_blink_platform_impl.cc
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 2ac75e6a7b8d357af2e1b661b8cc4eac144cfff2..814d1ed696c91755bdcab75f1be7b1130e390094 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -54,6 +54,7 @@
#include "content/renderer/scheduler/web_scheduler_impl.h"
#include "content/renderer/scheduler/webthread_impl_for_scheduler.h"
#include "content/renderer/screen_orientation/screen_orientation_observer.h"
+#include "content/renderer/vr_dispatcher.h"
#include "content/renderer/webclipboard_impl.h"
#include "content/renderer/webgraphicscontext3d_provider_impl.h"
#include "content/renderer/webpublicsuffixlist_impl.h"
@@ -78,6 +79,7 @@
#include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h"
#include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
#include "third_party/WebKit/public/platform/WebURL.h"
+#include "third_party/WebKit/public/platform/WebVR.h"
#include "third_party/WebKit/public/platform/WebVector.h"
#include "ui/gfx/color_profile.h"
#include "url/gurl.h"
@@ -841,6 +843,32 @@ void RendererBlinkPlatformImpl::sampleGamepads(WebGamepads& gamepads) {
//------------------------------------------------------------------------------
+void RendererBlinkPlatformImpl::getVRDevices(
+ blink::WebVector<blink::WebVRDevice>* devices) {
no sievers 2015/03/26 19:55:15 Looks like all the APIs below check RenderThreadIm
+ RenderThreadImpl::current()->vr_dispatcher()->GetVRDevices(
+ devices);
+}
+
+void RendererBlinkPlatformImpl::getHMDSensorState(
+ unsigned index, blink::WebHMDSensorState& into) {
+ RenderThreadImpl::current()->vr_dispatcher()->GetSensorState(index, into);
+}
+
+void RendererBlinkPlatformImpl::resetVRSensor(unsigned index) {
+ RenderThreadImpl::current()->vr_dispatcher()->ResetSensor(index);
+}
+
+void RendererBlinkPlatformImpl::getVRRenderTargetRects(unsigned index,
+ blink::WebVRFieldOfView leftFov,
+ blink::WebVRFieldOfView rightFov,
+ blink::WebVRVector4* leftRect,
+ blink::WebVRVector4* rightRect) {
+ RenderThreadImpl::current()->vr_dispatcher()->GetRenderTargetRects(
+ index, leftFov, rightFov, leftRect, rightRect);
+}
+
+//------------------------------------------------------------------------------
+
WebRTCPeerConnectionHandler*
RendererBlinkPlatformImpl::createRTCPeerConnectionHandler(
WebRTCPeerConnectionHandlerClient* client) {

Powered by Google App Engine
This is Rietveld 408576698