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 #ifndef BLINK_PLATFORM_VR_VR_TYPE_CONVERTERS_H_ | |
6 #define BLINK_PLATFORM_VR_VR_TYPE_CONVERTERS_H_ | |
7 | |
8 #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.
| |
9 #include "public/platform/modules/vr/vr_service.mojom.h" | |
10 #include "public/platform/modules/vr/WebVR.h" | |
11 | |
12 namespace mojo { | |
13 | |
14 // Type/enum conversions from WebVR data types to Mojo data types | |
15 // and vice versa. | |
16 | |
17 template <> | |
18 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
| |
19 static blink::WebVRVector3 Convert(const mojom::VRVector3Ptr& input); | |
20 }; | |
21 | |
22 template <> | |
23 struct TypeConverter<blink::WebVRVector4, mojom::VRVector4Ptr> { | |
24 static blink::WebVRVector4 Convert(const mojom::VRVector4Ptr& input); | |
25 }; | |
26 | |
27 template <> | |
28 struct TypeConverter<blink::WebVRRect, mojom::VRRectPtr> { | |
29 static blink::WebVRRect Convert(const mojom::VRRectPtr& input); | |
30 }; | |
31 | |
32 template <> | |
33 struct TypeConverter<blink::WebVRFieldOfView, mojom::VRFieldOfViewPtr> { | |
34 static blink::WebVRFieldOfView Convert( | |
35 const mojom::VRFieldOfViewPtr& input); | |
36 }; | |
37 | |
38 template <> | |
39 struct TypeConverter<blink::WebVREyeParameters, mojom::VREyeParametersPtr> { | |
40 static blink::WebVREyeParameters Convert( | |
41 const mojom::VREyeParametersPtr& input); | |
42 }; | |
43 | |
44 template <> | |
45 struct TypeConverter<blink::WebVRHMDInfo, mojom::VRHMDInfoPtr> { | |
46 static blink::WebVRHMDInfo Convert(const mojom::VRHMDInfoPtr& input); | |
47 }; | |
48 | |
49 template <> | |
50 struct TypeConverter<blink::WebVRDevice, mojom::VRDeviceInfoPtr> { | |
51 static blink::WebVRDevice Convert(const mojom::VRDeviceInfoPtr& input); | |
52 }; | |
53 | |
54 template <> | |
55 struct TypeConverter<blink::WebHMDSensorState, mojom::VRSensorStatePtr> { | |
56 static blink::WebHMDSensorState Convert( | |
57 const mojom::VRSensorStatePtr& input); | |
58 }; | |
59 | |
60 } // namespace mojo | |
61 | |
62 #endif // BLINK_PLATFORM_VR_VR_TYPE_CONVERTERS_H_ | |
OLD | NEW |