Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRTypeConverters.h

Issue 1808203005: [OnionSoup] Moving VR service from content to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to ToT and fixed the crash in webkit_unit_tests! Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
dcheng 2016/04/28 19:59:44 Let's not add new type converters. Can we add Stru
RaviKasibhatla 2016/04/29 14:49:05 I am checking at the possibility of using mojom ty
RaviKasibhatla 2016/05/03 14:34:21 @dcheng: By StructTraits, are you referring to the
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 VRTypeConverters_h
6 #define VRTypeConverters_h
7
8 #include "mojo/public/cpp/bindings/type_converter.h"
9 #include "public/platform/modules/vr/WebVR.h"
10 #include "public/platform/modules/vr/vr_service.mojom.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, blink::mojom::VRVector3Ptr> {
19 static blink::WebVRVector3 Convert(const blink::mojom::VRVector3Ptr& input);
20 };
21
22 template <>
23 struct TypeConverter<blink::WebVRVector4, blink::mojom::VRVector4Ptr> {
24 static blink::WebVRVector4 Convert(const blink::mojom::VRVector4Ptr& input);
25 };
26
27 template <>
28 struct TypeConverter<blink::WebVRRect, blink::mojom::VRRectPtr> {
29 static blink::WebVRRect Convert(const blink::mojom::VRRectPtr& input);
30 };
31
32 template <>
33 struct TypeConverter<blink::WebVRFieldOfView, blink::mojom::VRFieldOfViewPtr> {
34 static blink::WebVRFieldOfView Convert(
35 const blink::mojom::VRFieldOfViewPtr& input);
36 };
37
38 template <>
39 struct TypeConverter<blink::WebVREyeParameters, blink::mojom::VREyeParametersPtr > {
40 static blink::WebVREyeParameters Convert(
41 const blink::mojom::VREyeParametersPtr& input);
42 };
43
44 template <>
45 struct TypeConverter<blink::WebVRHMDInfo, blink::mojom::VRHMDInfoPtr> {
46 static blink::WebVRHMDInfo Convert(const blink::mojom::VRHMDInfoPtr& input);
47 };
48
49 template <>
50 struct TypeConverter<blink::WebVRDevice, blink::mojom::VRDeviceInfoPtr> {
51 static blink::WebVRDevice Convert(const blink::mojom::VRDeviceInfoPtr& input );
52 };
53
54 template <>
55 struct TypeConverter<blink::WebHMDSensorState, blink::mojom::VRSensorStatePtr> {
56 static blink::WebHMDSensorState Convert(
57 const blink::mojom::VRSensorStatePtr& input);
58 };
59
60 } // namespace mojo
61
62 #endif // VRTypeConverters_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698