OLD | NEW |
1 // Copyright 2016 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 "ui/display/mojo/display_struct_traits.h" | 5 #include "ui/display/mojo/display_struct_traits.h" |
6 | 6 |
7 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" | |
8 | |
9 namespace mojo { | 7 namespace mojo { |
10 | 8 |
11 display::mojom::Rotation | 9 display::mojom::Rotation |
12 EnumTraits<display::mojom::Rotation, display::Display::Rotation>::ToMojom( | 10 EnumTraits<display::mojom::Rotation, display::Display::Rotation>::ToMojom( |
13 display::Display::Rotation rotation) { | 11 display::Display::Rotation rotation) { |
14 switch (rotation) { | 12 switch (rotation) { |
15 case display::Display::ROTATE_0: | 13 case display::Display::ROTATE_0: |
16 return display::mojom::Rotation::VALUE_0; | 14 return display::mojom::Rotation::VALUE_0; |
17 case display::Display::ROTATE_90: | 15 case display::Display::ROTATE_90: |
18 return display::mojom::Rotation::VALUE_90; | 16 return display::mojom::Rotation::VALUE_90; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if (!data.ReadTouchSupport(&out->touch_support_)) | 96 if (!data.ReadTouchSupport(&out->touch_support_)) |
99 return false; | 97 return false; |
100 | 98 |
101 if (!data.ReadMaximumCursorSize(&out->maximum_cursor_size_)) | 99 if (!data.ReadMaximumCursorSize(&out->maximum_cursor_size_)) |
102 return false; | 100 return false; |
103 | 101 |
104 return true; | 102 return true; |
105 } | 103 } |
106 | 104 |
107 } // namespace mojo | 105 } // namespace mojo |
OLD | NEW |