Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: ui/display/mojo/display_constants_struct_traits.h

Issue 2732093006: Write mojom and EnumTraits for display::HDCPState. (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_
OLDNEW
« no previous file with comments | « ui/display/mojo/display_constants.typemap ('k') | ui/display/mojo/display_constants_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698