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

Unified Diff: content/common/vr_messages.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/common/vr_messages.h
diff --git a/content/common/vr_messages.h b/content/common/vr_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..3f20a9485797f0f9dad22e2f32d0711a76e7d660
--- /dev/null
+++ b/content/common/vr_messages.h
@@ -0,0 +1,67 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
no sievers 2015/03/19 01:24:52 nit: 2015
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Multiply-included message file, no include guard.
+
+#include <vector>
+
+#include "content/common/vr_param_traits.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_param_traits.h"
+#include "ipc/ipc_platform_file.h"
+#include "third_party/WebKit/public/platform/WebVR.h"
+
+#define IPC_MESSAGE_START VRMsgStart
+
+IPC_STRUCT_TRAITS_BEGIN(blink::WebVRVector3)
+ IPC_STRUCT_TRAITS_MEMBER(x)
+ IPC_STRUCT_TRAITS_MEMBER(y)
+ IPC_STRUCT_TRAITS_MEMBER(z)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(blink::WebVRVector4)
+ IPC_STRUCT_TRAITS_MEMBER(x)
+ IPC_STRUCT_TRAITS_MEMBER(y)
+ IPC_STRUCT_TRAITS_MEMBER(z)
+ IPC_STRUCT_TRAITS_MEMBER(w)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(blink::WebVRFieldOfView)
+ IPC_STRUCT_TRAITS_MEMBER(upDegrees)
+ IPC_STRUCT_TRAITS_MEMBER(downDegrees)
+ IPC_STRUCT_TRAITS_MEMBER(leftDegrees)
+ IPC_STRUCT_TRAITS_MEMBER(rightDegrees)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(blink::WebHMDSensorState)
+ IPC_STRUCT_TRAITS_MEMBER(timestamp)
+ IPC_STRUCT_TRAITS_MEMBER(frameIndex)
+ IPC_STRUCT_TRAITS_MEMBER(flags)
+ IPC_STRUCT_TRAITS_MEMBER(orientation)
+ IPC_STRUCT_TRAITS_MEMBER(position)
+ IPC_STRUCT_TRAITS_MEMBER(angularVelocity)
+ IPC_STRUCT_TRAITS_MEMBER(linearVelocity)
+ IPC_STRUCT_TRAITS_MEMBER(angularAcceleration)
+ IPC_STRUCT_TRAITS_MEMBER(linearAcceleration)
+IPC_STRUCT_TRAITS_END()
+
+// Messages sent from the renderer to the browser.
+
+IPC_SYNC_MESSAGE_CONTROL0_1(VRMsg_GetVRDevices,
no sievers 2015/03/19 01:24:52 nit: should these be named VRHostMsg_*?
+ std::vector<blink::WebVRDevice> /* handle */)
no sievers 2015/03/19 01:24:52 nit: /* devices */
+
+IPC_MESSAGE_CONTROL1(VRMsg_DeviceConsumerRemoved, unsigned int /* index */)
+
+IPC_SYNC_MESSAGE_CONTROL1_1(VRMsg_GetHMDSensorState,
+ unsigned int /* index */,
+ blink::WebHMDSensorState /* handle */)
no sievers 2015/03/19 01:24:52 nit: /* state */
+
+IPC_MESSAGE_CONTROL1(VRMsg_ResetSensor, unsigned int /* index */)
+
+IPC_SYNC_MESSAGE_CONTROL3_2(VRMsg_GetRenderTargetRects,
+ unsigned int /* index */,
+ blink::WebVRFieldOfView /* leftFov */,
+ blink::WebVRFieldOfView /* rightFov */,
+ blink::WebVRVector4 /* leftRect */,
+ blink::WebVRVector4 /* rightRect */)

Powered by Google App Engine
This is Rietveld 408576698