| 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..ef3ec8fd20fca67b9abb39819d7c96a32e2b905b
|
| --- /dev/null
|
| +++ b/content/common/vr_messages.h
|
| @@ -0,0 +1,80 @@
|
| +// 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.
|
| +
|
| +// 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::WebVRRect)
|
| + IPC_STRUCT_TRAITS_MEMBER(x)
|
| + IPC_STRUCT_TRAITS_MEMBER(y)
|
| + IPC_STRUCT_TRAITS_MEMBER(width)
|
| + IPC_STRUCT_TRAITS_MEMBER(height)
|
| +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 browser to the renderer
|
| +IPC_MESSAGE_ROUTED2(VRMsg_GetDevicesSuccess,
|
| + int /* request_id */,
|
| + std::vector<blink::WebVRDevice> /* devices */)
|
| +
|
| +IPC_MESSAGE_ROUTED1(VRMsg_GetDevicesError,
|
| + int /* request_id */)
|
| +
|
| +// Messages sent from the renderer to the browser.
|
| +
|
| +// Query the list of active WebVR devices.
|
| +IPC_MESSAGE_CONTROL2(VRHostMsg_GetVRDevices,
|
| + int32_t /* render_frame_id */,
|
| + int /* request_id */)
|
| +
|
| +// Get the current instantaneous state of a position sensor.
|
| +IPC_SYNC_MESSAGE_CONTROL2_1(VRHostMsg_GetSensorState,
|
| + int32_t /* render_frame_id */,
|
| + unsigned int /* index */,
|
| + blink::WebHMDSensorState /* state */)
|
| +
|
| +// Reset the origin and rotation of a position sensor based on current values.
|
| +IPC_MESSAGE_CONTROL2(VRHostMsg_ResetSensor,
|
| + int32_t /* render_frame_id */,
|
| + unsigned int /* index */)
|
|
|