| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_CONSTANTS_STRUCT_TRAITS_H_ | 5 #ifndef UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_ |
| 6 #define UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_ | 6 #define UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "ui/display/mojo/display_constants.mojom.h" | 8 #include "ui/display/mojo/display_constants.mojom.h" |
| 9 #include "ui/display/types/display_constants.h" | 9 #include "ui/display/types/display_constants.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 | 12 |
| 13 template <> | 13 template <> |
| 14 struct EnumTraits<display::mojom::DisplayConnectionType, | 14 struct EnumTraits<display::mojom::DisplayConnectionType, |
| 15 display::DisplayConnectionType> { | 15 display::DisplayConnectionType> { |
| 16 static display::mojom::DisplayConnectionType ToMojom( | 16 static display::mojom::DisplayConnectionType ToMojom( |
| 17 display::DisplayConnectionType type); | 17 display::DisplayConnectionType type); |
| 18 static bool FromMojom(display::mojom::DisplayConnectionType type, | 18 static bool FromMojom(display::mojom::DisplayConnectionType type, |
| 19 display::DisplayConnectionType* out); | 19 display::DisplayConnectionType* out); |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 template <> |
| 23 struct EnumTraits<display::mojom::HDCPState, display::HDCPState> { |
| 24 static display::mojom::HDCPState ToMojom(display::HDCPState type); |
| 25 static bool FromMojom(display::mojom::HDCPState type, |
| 26 display::HDCPState* out); |
| 27 }; |
| 28 |
| 22 }; // namespace mojo | 29 }; // namespace mojo |
| 23 | 30 |
| 24 #endif // UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_ | 31 #endif // UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_ |
| OLD | NEW |