| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |