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

Side by Side Diff: mojo/public/cpp/bindings/lib/serialization_forward.h

Issue 2226853002: Mojo C++ bindings: add support for UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@85_10_inline_more
Patch Set: . 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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/bindings/BUILD.gn ('k') | mojo/public/cpp/bindings/union_traits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_FORWARD_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_FORWARD_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_FORWARD_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_FORWARD_H_
7 7
8 #include "base/optional.h" 8 #include "base/optional.h"
9 #include "mojo/public/cpp/bindings/array_traits.h" 9 #include "mojo/public/cpp/bindings/array_traits.h"
10 #include "mojo/public/cpp/bindings/enum_traits.h" 10 #include "mojo/public/cpp/bindings/enum_traits.h"
11 #include "mojo/public/cpp/bindings/lib/template_util.h" 11 #include "mojo/public/cpp/bindings/lib/template_util.h"
12 #include "mojo/public/cpp/bindings/map_traits.h" 12 #include "mojo/public/cpp/bindings/map_traits.h"
13 #include "mojo/public/cpp/bindings/string_traits.h" 13 #include "mojo/public/cpp/bindings/string_traits.h"
14 #include "mojo/public/cpp/bindings/struct_traits.h" 14 #include "mojo/public/cpp/bindings/struct_traits.h"
15 #include "mojo/public/cpp/bindings/union_traits.h"
15 16
16 // This file is included by serialization implementation files to avoid circular 17 // This file is included by serialization implementation files to avoid circular
17 // includes. 18 // includes.
18 // Users of the serialization funtions should include serialization.h (and also 19 // Users of the serialization funtions should include serialization.h (and also
19 // wtf_serialization.h if necessary). 20 // wtf_serialization.h if necessary).
20 21
21 namespace mojo { 22 namespace mojo {
22 namespace internal { 23 namespace internal {
23 24
24 template <typename MojomType, typename MaybeConstUserType> 25 template <typename MojomType, typename MaybeConstUserType>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (!*output) 114 if (!*output)
114 output->emplace(); 115 output->emplace();
115 return Deserialize<MojomType>(std::forward<DataType>(input), &output->value(), 116 return Deserialize<MojomType>(std::forward<DataType>(input), &output->value(),
116 std::forward<Args>(args)...); 117 std::forward<Args>(args)...);
117 } 118 }
118 119
119 } // namespace internal 120 } // namespace internal
120 } // namespace mojo 121 } // namespace mojo
121 122
122 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_FORWARD_H_ 123 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_SERIALIZATION_FORWARD_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/BUILD.gn ('k') | mojo/public/cpp/bindings/union_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698