| Index: mojo/public/cpp/bindings/lib/array_serialization.h
|
| diff --git a/mojo/public/cpp/bindings/lib/array_serialization.h b/mojo/public/cpp/bindings/lib/array_serialization.h
|
| index fd18863f80ceaf8c66023aad0ee4eff121758e63..41532388ac212a531c0a840eb6a544dcf3eb3fa8 100644
|
| --- a/mojo/public/cpp/bindings/lib/array_serialization.h
|
| +++ b/mojo/public/cpp/bindings/lib/array_serialization.h
|
| @@ -11,6 +11,7 @@
|
|
|
| #include "mojo/public/c/system/macros.h"
|
| #include "mojo/public/cpp/bindings/lib/array_internal.h"
|
| +#include "mojo/public/cpp/bindings/lib/map_serialization.h"
|
| #include "mojo/public/cpp/bindings/lib/string_serialization.h"
|
| #include "mojo/public/cpp/bindings/lib/template_util.h"
|
| #include "mojo/public/cpp/bindings/lib/validation_errors.h"
|
| @@ -29,6 +30,16 @@ inline void SerializeArray_(Array<E> input,
|
| internal::Buffer* buf,
|
| internal::Array_Data<F>** output);
|
|
|
| +template <typename ValueValidateParams,
|
| + typename KeyWrapperType,
|
| + typename ValueWrapperType,
|
| + typename KeySerializationType,
|
| + typename ValueSerializationType>
|
| +inline void SerializeMap_(
|
| + Map<KeyWrapperType, ValueWrapperType> input,
|
| + internal::Buffer* buf,
|
| + internal::Map_Data<KeySerializationType, ValueSerializationType>** output);
|
| +
|
| template <typename E, typename F>
|
| inline void Deserialize_(internal::Array_Data<F>* data, Array<E>* output);
|
|
|
| @@ -177,6 +188,15 @@ struct ArraySerializer<S, typename S::Data_*, true> {
|
| SerializeArray_<Params>(input.Pass(), buf, output);
|
| }
|
| };
|
| +
|
| + template <typename T, typename U, typename Params>
|
| + struct SerializeCaller<Map<T, U>, Params> {
|
| + static void Run(Map<T, U> input,
|
| + Buffer* buf,
|
| + typename Map<T, U>::Data_** output) {
|
| + SerializeMap_<Params>(input.Pass(), buf, output);
|
| + }
|
| + };
|
| };
|
|
|
| template <>
|
|
|