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

Unified Diff: ui/display/mojo/display_constants_struct_traits.h

Issue 2646213002: Write mojom and StructTraits for DisplaySnapshot. (Closed)
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/mojo/display_constants_struct_traits.h
diff --git a/ui/display/mojo/display_constants_struct_traits.h b/ui/display/mojo/display_constants_struct_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..bb7c13eee31adfd0099c5e02553743ef942a8a95
--- /dev/null
+++ b/ui/display/mojo/display_constants_struct_traits.h
@@ -0,0 +1,24 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_
+#define UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_
+
+#include "ui/display/mojo/display_constants.mojom.h"
+#include "ui/display/types/display_constants.h"
+
+namespace mojo {
+
+template <>
+struct EnumTraits<display::mojom::DisplayConnectionType,
+ display::DisplayConnectionType> {
+ static display::mojom::DisplayConnectionType ToMojom(
+ display::DisplayConnectionType type);
+ static bool FromMojom(display::mojom::DisplayConnectionType type,
+ display::DisplayConnectionType* out);
+};
+
+}; // namespace mojo
+
+#endif // UI_DISPLAY_MOJO_DISPLAY_CONSTANTS_STRUCT_TRAITS_H_
« 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