OLD | NEW |
(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::WebVRRect) |
| 31 IPC_STRUCT_TRAITS_MEMBER(x) |
| 32 IPC_STRUCT_TRAITS_MEMBER(y) |
| 33 IPC_STRUCT_TRAITS_MEMBER(width) |
| 34 IPC_STRUCT_TRAITS_MEMBER(height) |
| 35 IPC_STRUCT_TRAITS_END() |
| 36 |
| 37 IPC_STRUCT_TRAITS_BEGIN(blink::WebVRFieldOfView) |
| 38 IPC_STRUCT_TRAITS_MEMBER(upDegrees) |
| 39 IPC_STRUCT_TRAITS_MEMBER(downDegrees) |
| 40 IPC_STRUCT_TRAITS_MEMBER(leftDegrees) |
| 41 IPC_STRUCT_TRAITS_MEMBER(rightDegrees) |
| 42 IPC_STRUCT_TRAITS_END() |
| 43 |
| 44 IPC_STRUCT_TRAITS_BEGIN(blink::WebHMDSensorState) |
| 45 IPC_STRUCT_TRAITS_MEMBER(timestamp) |
| 46 IPC_STRUCT_TRAITS_MEMBER(frameIndex) |
| 47 IPC_STRUCT_TRAITS_MEMBER(flags) |
| 48 IPC_STRUCT_TRAITS_MEMBER(orientation) |
| 49 IPC_STRUCT_TRAITS_MEMBER(position) |
| 50 IPC_STRUCT_TRAITS_MEMBER(angularVelocity) |
| 51 IPC_STRUCT_TRAITS_MEMBER(linearVelocity) |
| 52 IPC_STRUCT_TRAITS_MEMBER(angularAcceleration) |
| 53 IPC_STRUCT_TRAITS_MEMBER(linearAcceleration) |
| 54 IPC_STRUCT_TRAITS_END() |
| 55 |
| 56 // Messages sent from the browser to the renderer |
| 57 IPC_MESSAGE_ROUTED2(VRMsg_GetDevicesSuccess, |
| 58 int /* request_id */, |
| 59 std::vector<blink::WebVRDevice> /* devices */) |
| 60 |
| 61 IPC_MESSAGE_ROUTED1(VRMsg_GetDevicesError, |
| 62 int /* request_id */) |
| 63 |
| 64 // Messages sent from the renderer to the browser. |
| 65 |
| 66 // Query the list of active WebVR devices. |
| 67 IPC_MESSAGE_CONTROL2(VRHostMsg_GetVRDevices, |
| 68 int32_t /* render_frame_id */, |
| 69 int /* request_id */) |
| 70 |
| 71 // Get the current instantaneous state of a position sensor. |
| 72 IPC_SYNC_MESSAGE_CONTROL2_1(VRHostMsg_GetSensorState, |
| 73 int32_t /* render_frame_id */, |
| 74 unsigned int /* index */, |
| 75 blink::WebHMDSensorState /* state */) |
| 76 |
| 77 // Reset the origin and rotation of a position sensor based on current values. |
| 78 IPC_MESSAGE_CONTROL2(VRHostMsg_ResetSensor, |
| 79 int32_t /* render_frame_id */, |
| 80 unsigned int /* index */) |
OLD | NEW |