| 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
|
| index c45ab90ca2b494ba1cc2417c728357e145636d73..25a7d64d633c44c3e945c1ea9b064d244875f340 100644
|
| --- a/mojo/common/common_custom_types_struct_traits.h
|
| +++ b/mojo/common/common_custom_types_struct_traits.h
|
| @@ -11,11 +11,21 @@
|
| #include "base/version.h"
|
| #include "mojo/common/file.mojom-shared.h"
|
| #include "mojo/common/mojo_common_export.h"
|
| +#include "mojo/common/platform_handle.h"
|
| +#include "mojo/common/platform_handle.mojom-shared.h"
|
| #include "mojo/common/string16.mojom-shared.h"
|
| #include "mojo/common/time.mojom-shared.h"
|
| #include "mojo/common/unguessable_token.mojom-shared.h"
|
| #include "mojo/common/version.mojom-shared.h"
|
|
|
| +#if defined(OS_POSIX)
|
| +#include "mojo/common/common_custom_types_struct_traits_posix.h"
|
| +#endif
|
| +
|
| +#if defined(OS_WIN)
|
| +#include "mojo/common/common_custom_types_struct_traits_win.h"
|
| +#endif
|
| +
|
| namespace mojo {
|
|
|
| template <>
|
| @@ -83,6 +93,23 @@ struct StructTraits<common::mojom::FileDataView, base::File> {
|
| static bool Read(common::mojom::FileDataView data, base::File* file);
|
| };
|
|
|
| +template <typename DataView>
|
| +struct StructTraits<DataView, common::InvalidTypemappedType> {
|
| + static bool IsNull(const common::InvalidTypemappedType& unused) {
|
| + return true;
|
| + }
|
| +
|
| + static void SetToNull(common::InvalidTypemappedType* unused) {}
|
| +
|
| + static mojo::ScopedHandle wrapped_handle(
|
| + const common::InvalidTypemappedType& unused) {
|
| + return mojo::ScopedHandle();
|
| + }
|
| + static bool Read(DataView data, common::InvalidTypemappedType* unused) {
|
| + return false;
|
| + }
|
| +};
|
| +
|
| } // namespace mojo
|
|
|
| #endif // MOJO_COMMON_COMMON_CUSTOM_TYPES_STRUCT_TRAITS_H_
|
|
|