| 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 #ifndef UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_ | 5 #ifndef UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_ |
| 6 #define UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_ | 6 #define UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "ui/display/display.h" | 8 #include "ui/display/display.h" |
| 9 #include "ui/display/mojo/display.mojom.h" | 9 #include "ui/display/mojo/display.mojom.h" |
| 10 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
| 10 | 11 |
| 11 namespace mojo { | 12 namespace mojo { |
| 12 | 13 |
| 13 template <> | 14 template <> |
| 14 struct EnumTraits<display::mojom::Rotation, display::Display::Rotation> { | 15 struct EnumTraits<display::mojom::Rotation, display::Display::Rotation> { |
| 15 static display::mojom::Rotation ToMojom(display::Display::Rotation type); | 16 static display::mojom::Rotation ToMojom(display::Display::Rotation type); |
| 16 static bool FromMojom(display::mojom::Rotation type, | 17 static bool FromMojom(display::mojom::Rotation type, |
| 17 display::Display::Rotation* output); | 18 display::Display::Rotation* output); |
| 18 }; | 19 }; |
| 19 | 20 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 static const gfx::Size& maximum_cursor_size(const display::Display& display) { | 55 static const gfx::Size& maximum_cursor_size(const display::Display& display) { |
| 55 return display.maximum_cursor_size(); | 56 return display.maximum_cursor_size(); |
| 56 } | 57 } |
| 57 | 58 |
| 58 static bool Read(display::mojom::DisplayDataView data, display::Display* out); | 59 static bool Read(display::mojom::DisplayDataView data, display::Display* out); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 } // namespace mojo | 62 } // namespace mojo |
| 62 | 63 |
| 63 #endif // UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_ | 64 #endif // UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_ |
| OLD | NEW |