| Index: third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
|
| diff --git a/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h b/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
|
| index 3318ad8fc1eab3d617c7a892bae11eb2d5ab5aeb..40595811d9769a9f7fdece63cdba4895cf9ff7cf 100644
|
| --- a/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
|
| +++ b/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CommonCustomTypesStructTraits_h
|
| #define CommonCustomTypesStructTraits_h
|
|
|
| +#include "base/strings/string16.h"
|
| #include "mojo/common/common_custom_types.mojom-blink.h"
|
| #include "platform/PlatformExport.h"
|
|
|
| @@ -12,9 +13,17 @@ namespace mojo {
|
|
|
| template <>
|
| struct PLATFORM_EXPORT
|
| - StructTraits<mojo::common::mojom::String16DataView, ::WTF::String> {
|
| - static WTF::Vector<uint16_t> data(const ::WTF::String&);
|
| - static bool Read(mojo::common::mojom::String16DataView, ::WTF::String* out);
|
| + StructTraits<common::mojom::String16DataView, WTF::String> {
|
| + static bool IsNull(const WTF::String& input) { return input.isNull(); }
|
| + static void SetToNull(WTF::String* output) { *output = WTF::String(); }
|
| +
|
| + static void* SetUpContext(const WTF::String& input);
|
| + static void TearDownContext(const WTF::String& input, void* context) {
|
| + delete static_cast<base::string16*>(context);
|
| + }
|
| +
|
| + static ConstCArray<uint16_t> data(const WTF::String& input, void* context);
|
| + static bool Read(common::mojom::String16DataView, WTF::String* out);
|
| };
|
|
|
| } // namespace mojo
|
|
|