OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_ | 5 #ifndef MOJO_CONVERTERS_GEOMETRY_TYPE_CONVERTERS_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_ | 6 #define MOJO_CONVERTERS_GEOMETRY_TYPE_CONVERTERS_H_ |
7 | 7 |
8 #include "mojo/services/public/cpp/geometry/mojo_geometry_export.h" | 8 #include "mojo/converters/mojo_converters_export.h" |
9 #include "mojo/services/public/interfaces/geometry/geometry.mojom.h" | 9 #include "mojo/services/public/interfaces/geometry/geometry.mojom.h" |
10 #include "ui/gfx/geometry/point.h" | 10 #include "ui/gfx/geometry/point.h" |
11 #include "ui/gfx/geometry/point_f.h" | 11 #include "ui/gfx/geometry/point_f.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
14 #include "ui/gfx/transform.h" | 14 #include "ui/gfx/transform.h" |
15 | 15 |
16 namespace mojo { | 16 namespace mojo { |
17 | 17 |
18 template <> | 18 template <> |
19 struct MOJO_GEOMETRY_EXPORT TypeConverter<PointPtr, gfx::Point> { | 19 struct MOJO_CONVERTERS_EXPORT TypeConverter<PointPtr, gfx::Point> { |
20 static PointPtr Convert(const gfx::Point& input); | 20 static PointPtr Convert(const gfx::Point& input); |
21 }; | 21 }; |
22 template <> | 22 template <> |
23 struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::Point, PointPtr> { | 23 struct MOJO_CONVERTERS_EXPORT TypeConverter<gfx::Point, PointPtr> { |
24 static gfx::Point Convert(const PointPtr& input); | 24 static gfx::Point Convert(const PointPtr& input); |
25 }; | 25 }; |
26 | 26 |
27 template <> | 27 template <> |
28 struct MOJO_GEOMETRY_EXPORT TypeConverter<PointFPtr, gfx::PointF> { | 28 struct MOJO_CONVERTERS_EXPORT TypeConverter<PointFPtr, gfx::PointF> { |
29 static PointFPtr Convert(const gfx::PointF& input); | 29 static PointFPtr Convert(const gfx::PointF& input); |
30 }; | 30 }; |
31 template <> | 31 template <> |
32 struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::PointF, PointFPtr> { | 32 struct MOJO_CONVERTERS_EXPORT TypeConverter<gfx::PointF, PointFPtr> { |
33 static gfx::PointF Convert(const PointFPtr& input); | 33 static gfx::PointF Convert(const PointFPtr& input); |
34 }; | 34 }; |
35 | 35 |
36 template <> | 36 template <> |
37 struct MOJO_GEOMETRY_EXPORT TypeConverter<SizePtr, gfx::Size> { | 37 struct MOJO_CONVERTERS_EXPORT TypeConverter<SizePtr, gfx::Size> { |
38 static SizePtr Convert(const gfx::Size& input); | 38 static SizePtr Convert(const gfx::Size& input); |
39 }; | 39 }; |
40 template <> | 40 template <> |
41 struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::Size, SizePtr> { | 41 struct MOJO_CONVERTERS_EXPORT TypeConverter<gfx::Size, SizePtr> { |
42 static gfx::Size Convert(const SizePtr& input); | 42 static gfx::Size Convert(const SizePtr& input); |
43 }; | 43 }; |
44 | 44 |
45 template <> | 45 template <> |
46 struct MOJO_GEOMETRY_EXPORT TypeConverter<RectPtr, gfx::Rect> { | 46 struct MOJO_CONVERTERS_EXPORT TypeConverter<RectPtr, gfx::Rect> { |
47 static RectPtr Convert(const gfx::Rect& input); | 47 static RectPtr Convert(const gfx::Rect& input); |
48 }; | 48 }; |
49 template <> | 49 template <> |
50 struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::Rect, RectPtr> { | 50 struct MOJO_CONVERTERS_EXPORT TypeConverter<gfx::Rect, RectPtr> { |
51 static gfx::Rect Convert(const RectPtr& input); | 51 static gfx::Rect Convert(const RectPtr& input); |
52 }; | 52 }; |
53 | 53 |
54 template <> | 54 template <> |
55 struct MOJO_GEOMETRY_EXPORT TypeConverter<RectFPtr, gfx::RectF> { | 55 struct MOJO_CONVERTERS_EXPORT TypeConverter<RectFPtr, gfx::RectF> { |
56 static RectFPtr Convert(const gfx::RectF& input); | 56 static RectFPtr Convert(const gfx::RectF& input); |
57 }; | 57 }; |
58 template <> | 58 template <> |
59 struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::RectF, RectFPtr> { | 59 struct MOJO_CONVERTERS_EXPORT TypeConverter<gfx::RectF, RectFPtr> { |
60 static gfx::RectF Convert(const RectFPtr& input); | 60 static gfx::RectF Convert(const RectFPtr& input); |
61 }; | 61 }; |
62 | 62 |
63 template <> | 63 template <> |
64 struct MOJO_GEOMETRY_EXPORT TypeConverter<TransformPtr, gfx::Transform> { | 64 struct MOJO_CONVERTERS_EXPORT TypeConverter<TransformPtr, gfx::Transform> { |
65 static TransformPtr Convert(const gfx::Transform& input); | 65 static TransformPtr Convert(const gfx::Transform& input); |
66 }; | 66 }; |
67 template <> | 67 template <> |
68 struct MOJO_GEOMETRY_EXPORT TypeConverter<gfx::Transform, TransformPtr> { | 68 struct MOJO_CONVERTERS_EXPORT TypeConverter<gfx::Transform, TransformPtr> { |
69 static gfx::Transform Convert(const TransformPtr& input); | 69 static gfx::Transform Convert(const TransformPtr& input); |
70 }; | 70 }; |
71 | 71 |
72 } // namespace mojo | 72 } // namespace mojo |
73 | 73 |
74 #endif // MOJO_SERVICES_PUBLIC_CPP_GEOMETRY_GEOMETRY_TYPE_CONVERTERS_H_ | 74 #endif // MOJO_CONVERTERS_GEOMETRY_TYPE_CONVERTERS_H_ |
OLD | NEW |