| Index: third_party/WebKit/Source/modules/vr/VRTypeConverters.h
|
| diff --git a/third_party/WebKit/Source/modules/vr/VRTypeConverters.h b/third_party/WebKit/Source/modules/vr/VRTypeConverters.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0d14ec9a27f53a1827ad2e222e693297bc76e25d
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/vr/VRTypeConverters.h
|
| @@ -0,0 +1,67 @@
|
| +// 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 VRTypeConverters_h
|
| +#define VRTypeConverters_h
|
| +
|
| +#include "mojo/public/cpp/bindings/type_converter.h"
|
| +#include "public/platform/modules/vr/WebVR.h"
|
| +#include "public/platform/modules/vr/vr_service.mojom-wtf.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +// Type/enum conversions from WebVR data types to Mojo data types
|
| +// and vice versa.
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebVRVector3, blink::mojom::wtf::VRVector3Ptr> {
|
| + static blink::WebVRVector3 Convert(
|
| + const blink::mojom::wtf::VRVector3Ptr& input);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebVRVector4, blink::mojom::wtf::VRVector4Ptr> {
|
| + static blink::WebVRVector4 Convert(
|
| + const blink::mojom::wtf::VRVector4Ptr& input);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebVRRect, blink::mojom::wtf::VRRectPtr> {
|
| + static blink::WebVRRect Convert(const blink::mojom::wtf::VRRectPtr& input);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebVRFieldOfView, blink::mojom::wtf::VRFieldOfViewPtr> {
|
| + static blink::WebVRFieldOfView Convert(
|
| + const blink::mojom::wtf::VRFieldOfViewPtr& input);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebVREyeParameters, blink::mojom::wtf::VREyeParametersPtr> {
|
| + static blink::WebVREyeParameters Convert(
|
| + const blink::mojom::wtf::VREyeParametersPtr& input);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebVRHMDInfo, blink::mojom::wtf::VRHMDInfoPtr> {
|
| + static blink::WebVRHMDInfo Convert(
|
| + const blink::mojom::wtf::VRHMDInfoPtr& input);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebVRDevice, blink::mojom::wtf::VRDeviceInfoPtr> {
|
| + static blink::WebVRDevice Convert(
|
| + const blink::mojom::wtf::VRDeviceInfoPtr& input
|
| +);
|
| +};
|
| +
|
| +template <>
|
| +struct TypeConverter<blink::WebHMDSensorState, blink::mojom::wtf::VRSensorStatePtr> {
|
| + static blink::WebHMDSensorState Convert(
|
| + const blink::mojom::wtf::VRSensorStatePtr& input);
|
| +};
|
| +
|
| +} // namespace mojo
|
| +
|
| +#endif // VRTypeConverters_h
|
|
|