OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "mojo/converters/geometry/geometry_type_converters.h" | 5 #include "ui/gfx/geometry/mojo/geometry_type_converters.h" |
6 | 6 |
7 namespace mojo { | 7 namespace mojo { |
8 | 8 |
9 // static | 9 // static |
10 PointPtr TypeConverter<PointPtr, gfx::Point>::Convert(const gfx::Point& input) { | 10 PointPtr TypeConverter<PointPtr, gfx::Point>::Convert(const gfx::Point& input) { |
11 PointPtr point(Point::New()); | 11 PointPtr point(Point::New()); |
12 point->x = input.x(); | 12 point->x = input.x(); |
13 point->y = input.y(); | 13 point->y = input.y(); |
14 return point; | 14 return point; |
15 } | 15 } |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // static | 144 // static |
145 gfx::Insets TypeConverter<gfx::Insets, InsetsPtr>::Convert( | 145 gfx::Insets TypeConverter<gfx::Insets, InsetsPtr>::Convert( |
146 const InsetsPtr& input) { | 146 const InsetsPtr& input) { |
147 if (input.is_null()) | 147 if (input.is_null()) |
148 return gfx::Insets(); | 148 return gfx::Insets(); |
149 | 149 |
150 return gfx::Insets(input->top, input->left, input->bottom, input->right); | 150 return gfx::Insets(input->top, input->left, input->bottom, input->right); |
151 } | 151 } |
152 | 152 |
153 } // namespace mojo | 153 } // namespace mojo |
OLD | NEW |