1 // Copyright 2019 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 DEVICE_VR_ANDROID_ARCORE_TYPE_CONVERTERS_H_ 6 #define DEVICE_VR_ANDROID_ARCORE_TYPE_CONVERTERS_H_ 7 8 #include "device/vr/android/arcore/arcore_sdk.h" 9 #include "device/vr/public/mojom/vr_service.mojom.h" 10 #include "ui/gfx/transform.h" 11 12 namespace mojo { 13 14 template <> 15 struct TypeConverter<device::mojom::XRPlaneOrientation, ArPlaneType> { 16 static device::mojom::XRPlaneOrientation Convert(ArPlaneType plane_type); 17 }; 18 19 template <> 20 struct TypeConverter<gfx::Transform, device::mojom::VRPosePtr> { 21 static gfx::Transform Convert(const device::mojom::VRPosePtr& pose); 22 }; 23 24 template <> 25 struct TypeConverter<gfx::Transform, device::mojom::Pose> { 26 static gfx::Transform Convert(const device::mojom::Pose& pose); 27 }; 28 29 } // namespace mojo 30 31 #endif // DEVICE_VR_ANDROID_ARCORE_TYPE_CONVERTERS_H_ 32