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

Unified Diff: content/renderer/vr_dispatcher.h

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/vr_dispatcher.h
diff --git a/content/renderer/vr_dispatcher.h b/content/renderer/vr_dispatcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..2000ea77dabdad0f5b9c6c07f5dbb1778b10b440
--- /dev/null
+++ b/content/renderer/vr_dispatcher.h
@@ -0,0 +1,40 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_VR_DISPATCHER_H_
+#define CONTENT_RENDERER_VR_DISPATCHER_H_
+
+#include "base/memory/scoped_ptr.h"
no sievers 2015/03/26 19:55:15 nit: unneeded?
+#include "content/common/vr_messages.h"
no sievers 2015/03/26 19:55:15 nit: can this move to the .cc file?
+#include "content/public/renderer/render_process_observer.h"
no sievers 2015/03/26 19:55:15 nit: unneeded?
+#include "third_party/WebKit/public/platform/WebSize.h"
no sievers 2015/03/26 19:55:15 nit: unneeded? and maybe some can be fwd-declared
+#include "third_party/WebKit/public/platform/WebVR.h"
+#include "third_party/WebKit/public/platform/WebVector.h"
+
+namespace content {
+
+class VRDispatcher {
+ public:
+ VRDispatcher();
+ ~VRDispatcher();
+
+ void GetVRDevices(blink::WebVector<blink::WebVRDevice>* devices);
+
+ void GetSensorState(
+ unsigned int index, blink::WebHMDSensorState& state);
+
+ void ResetSensor(unsigned int index);
+
+ void GetRenderTargetRects(unsigned index,
+ blink::WebVRFieldOfView leftFov,
+ blink::WebVRFieldOfView rightFov,
+ blink::WebVRVector4* leftRect,
+ blink::WebVRVector4* rightRect);
+
+ DISALLOW_COPY_AND_ASSIGN(VRDispatcher);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_VR_DISPATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698