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

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: Updates/cleanups before pulling in reviewers. 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..cec9d6c93e52596203a37a1008322ed5fe1b1c1e
--- /dev/null
+++ b/content/renderer/vr_dispatcher.h
@@ -0,0 +1,41 @@
+// 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"
+#include "content/common/vr_messages.h"
+#include "content/public/renderer/render_process_observer.h"
+#include "third_party/WebKit/public/platform/WebSize.h"
+#include "third_party/WebKit/public/platform/WebVR.h"
+#include "third_party/WebKit/public/platform/WebVector.h"
+
+namespace content {
+
+class VRDispatcher : public RenderProcessObserver {
+ public:
+ VRDispatcher();
+ ~VRDispatcher() override;
+
+ void GetVRDevices(blink::WebVector<blink::WebVRDevice>* devices);
+
+ void GetHMDSensorState(
+ 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);
+
+ // RenderProcessObserver implementation.
+ bool OnControlMessageReceived(const IPC::Message& message) override;
no sievers 2015/03/19 01:24:53 private: DISALLOW_COPY_AND_ASSIGN(VRDispatcher)
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_VR_DISPATCHER_H_

Powered by Google App Engine
This is Rietveld 408576698