Index: third_party/WebKit/Source/platform/vr/vr_type_converters.h |
diff --git a/third_party/WebKit/Source/platform/vr/vr_type_converters.h b/third_party/WebKit/Source/platform/vr/vr_type_converters.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ead28d3ae420f2f4c40e72d91d12bb17aced16df |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/vr/vr_type_converters.h |
@@ -0,0 +1,62 @@ |
+// 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 BLINK_PLATFORM_VR_VR_TYPE_CONVERTERS_H_ |
+#define BLINK_PLATFORM_VR_VR_TYPE_CONVERTERS_H_ |
+ |
+#include "mojo/common/common_type_converters.h" |
yzshen1
2016/03/22 16:13:49
nit: #include "mojo/public/cpp/bindings/type_conve
RaviKasibhatla
2016/03/23 15:20:51
Done.
|
+#include "public/platform/modules/vr/vr_service.mojom.h" |
+#include "public/platform/modules/vr/WebVR.h" |
+ |
+namespace mojo { |
+ |
+// Type/enum conversions from WebVR data types to Mojo data types |
+// and vice versa. |
+ |
+template <> |
+struct TypeConverter<blink::WebVRVector3, mojom::VRVector3Ptr> { |
Yuki
2016/03/22 07:15:03
IIUC, WebVRVector, etc. are no longer exposed to o
RaviKasibhatla
2016/03/23 15:20:51
Sure. Since, WebVR.h was a public header, I was no
|
+ static blink::WebVRVector3 Convert(const mojom::VRVector3Ptr& input); |
+}; |
+ |
+template <> |
+struct TypeConverter<blink::WebVRVector4, mojom::VRVector4Ptr> { |
+ static blink::WebVRVector4 Convert(const mojom::VRVector4Ptr& input); |
+}; |
+ |
+template <> |
+struct TypeConverter<blink::WebVRRect, mojom::VRRectPtr> { |
+ static blink::WebVRRect Convert(const mojom::VRRectPtr& input); |
+}; |
+ |
+template <> |
+struct TypeConverter<blink::WebVRFieldOfView, mojom::VRFieldOfViewPtr> { |
+ static blink::WebVRFieldOfView Convert( |
+ const mojom::VRFieldOfViewPtr& input); |
+}; |
+ |
+template <> |
+struct TypeConverter<blink::WebVREyeParameters, mojom::VREyeParametersPtr> { |
+ static blink::WebVREyeParameters Convert( |
+ const mojom::VREyeParametersPtr& input); |
+}; |
+ |
+template <> |
+struct TypeConverter<blink::WebVRHMDInfo, mojom::VRHMDInfoPtr> { |
+ static blink::WebVRHMDInfo Convert(const mojom::VRHMDInfoPtr& input); |
+}; |
+ |
+template <> |
+struct TypeConverter<blink::WebVRDevice, mojom::VRDeviceInfoPtr> { |
+ static blink::WebVRDevice Convert(const mojom::VRDeviceInfoPtr& input); |
+}; |
+ |
+template <> |
+struct TypeConverter<blink::WebHMDSensorState, mojom::VRSensorStatePtr> { |
+ static blink::WebHMDSensorState Convert( |
+ const mojom::VRSensorStatePtr& input); |
+}; |
+ |
+} // namespace mojo |
+ |
+#endif // BLINK_PLATFORM_VR_VR_TYPE_CONVERTERS_H_ |