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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ba66a14dba4ac12139e90a1e69a375f5fe829751 |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h |
@@ -0,0 +1,23 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CommonCustomTypesStructTraits_h |
+#define CommonCustomTypesStructTraits_h |
+ |
+#include "mojo/common/common_custom_types.mojom-blink.h" |
+#include "platform/PlatformExport.h" |
+ |
+namespace mojo { |
+ |
+template <> |
+struct PLATFORM_EXPORT |
+ StructTraits<mojo::common::mojom::String16DataView, ::blink::WebString> { |
+ static WTF::Vector<uint16_t> data(const ::blink::WebString&); |
+ static bool Read(mojo::common::mojom::String16DataView, |
+ ::blink::WebString* out); |
+}; |
+ |
+} // namespace mojo |
+ |
+#endif // CommonCustomTypesStructTraits_h |