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

Side by Side 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: Addressed the rest of sievers@ input Created 5 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Multiply-included message file, no include guard.
6
7 #include <vector>
8
9 #include "content/common/vr_param_traits.h"
10 #include "ipc/ipc_message_macros.h"
11 #include "ipc/ipc_param_traits.h"
12 #include "ipc/ipc_platform_file.h"
13 #include "third_party/WebKit/public/platform/WebVR.h"
14
15 #define IPC_MESSAGE_START VRMsgStart
16
17 IPC_STRUCT_TRAITS_BEGIN(blink::WebVRVector3)
18 IPC_STRUCT_TRAITS_MEMBER(x)
19 IPC_STRUCT_TRAITS_MEMBER(y)
20 IPC_STRUCT_TRAITS_MEMBER(z)
21 IPC_STRUCT_TRAITS_END()
22
23 IPC_STRUCT_TRAITS_BEGIN(blink::WebVRVector4)
24 IPC_STRUCT_TRAITS_MEMBER(x)
25 IPC_STRUCT_TRAITS_MEMBER(y)
26 IPC_STRUCT_TRAITS_MEMBER(z)
27 IPC_STRUCT_TRAITS_MEMBER(w)
28 IPC_STRUCT_TRAITS_END()
29
30 IPC_STRUCT_TRAITS_BEGIN(blink::WebVRFieldOfView)
31 IPC_STRUCT_TRAITS_MEMBER(upDegrees)
32 IPC_STRUCT_TRAITS_MEMBER(downDegrees)
33 IPC_STRUCT_TRAITS_MEMBER(leftDegrees)
34 IPC_STRUCT_TRAITS_MEMBER(rightDegrees)
35 IPC_STRUCT_TRAITS_END()
36
37 IPC_STRUCT_TRAITS_BEGIN(blink::WebHMDSensorState)
38 IPC_STRUCT_TRAITS_MEMBER(timestamp)
39 IPC_STRUCT_TRAITS_MEMBER(frameIndex)
40 IPC_STRUCT_TRAITS_MEMBER(flags)
41 IPC_STRUCT_TRAITS_MEMBER(orientation)
42 IPC_STRUCT_TRAITS_MEMBER(position)
43 IPC_STRUCT_TRAITS_MEMBER(angularVelocity)
44 IPC_STRUCT_TRAITS_MEMBER(linearVelocity)
45 IPC_STRUCT_TRAITS_MEMBER(angularAcceleration)
46 IPC_STRUCT_TRAITS_MEMBER(linearAcceleration)
47 IPC_STRUCT_TRAITS_END()
48
49 // Messages sent from the renderer to the browser.
50
51 // Query the list of active WebVR devices.
52 IPC_SYNC_MESSAGE_CONTROL0_1(VRHostMsg_GetVRDevices,
53 std::vector<blink::WebVRDevice> /* devices */)
54
55 // Get the current instantaneous state of a position sensor.
56 IPC_SYNC_MESSAGE_CONTROL1_1(VRHostMsg_GetSensorState,
57 unsigned int /* index */,
58 blink::WebHMDSensorState /* state */)
59
60 // Reset the origin and rotation of a position sensor based on current values.
61 IPC_MESSAGE_CONTROL1(VRHostMsg_ResetSensor, unsigned int /* index */)
62
63 // Return the viewports that each eye's view should be rendered into to ensure
64 // correct output on the HMD.
65 IPC_SYNC_MESSAGE_CONTROL3_2(VRHostMsg_GetRenderTargetRects,
66 unsigned int /* index */,
67 blink::WebVRFieldOfView /* leftFov */,
68 blink::WebVRFieldOfView /* rightFov */,
69 blink::WebVRVector4 /* leftRect */,
70 blink::WebVRVector4 /* rightRect */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698