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

Unified Diff: mojo/common/common_custom_types_struct_traits.h

Issue 2147693002: Struct traits used by GpuInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: The right public_deps Created 4 years, 4 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 | « mojo/common/common_custom_types.typemap ('k') | mojo/common/common_custom_types_struct_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/common_custom_types_struct_traits.h
diff --git a/mojo/common/common_custom_types_struct_traits.h b/mojo/common/common_custom_types_struct_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3190f9ac7a1624825debd1b18e6085432c0d6a7
--- /dev/null
+++ b/mojo/common/common_custom_types_struct_traits.h
@@ -0,0 +1,25 @@
+// Copyright 2016 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 MOJO_COMMON_COMMON_CUSTOM_TYPES_STRUCT_TRAITS_H_
+#define MOJO_COMMON_COMMON_CUSTOM_TYPES_STRUCT_TRAITS_H_
+
+#include "mojo/common/common_custom_types.mojom.h"
+
+namespace base {
+class Version;
+}
+
+namespace mojo {
+
+template <>
+struct StructTraits<mojo::common::mojom::Version, base::Version> {
+ static const std::vector<uint32_t>& components(const base::Version& version);
+ static bool Read(mojo::common::mojom::VersionDataView data,
+ base::Version* out);
+};
+
+} // namespace mojo
+
+#endif // MOJO_COMMON_COMMON_CUSTOM_TYPES_STRUCT_TRAITS_H_
« no previous file with comments | « mojo/common/common_custom_types.typemap ('k') | mojo/common/common_custom_types_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698