Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1002)

Unified Diff: third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h

Issue 2379993003: Mojo C++ bindings: make String16 and gfx::Size available in Blink (Closed)
Patch Set: mapping back to WebSize :( Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..3318ad8fc1eab3d617c7a892bae11eb2d5ab5aeb
--- /dev/null
+++ b/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
@@ -0,0 +1,22 @@
+// 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, ::WTF::String> {
+ static WTF::Vector<uint16_t> data(const ::WTF::String&);
+ static bool Read(mojo::common::mojom::String16DataView, ::WTF::String* out);
+};
+
+} // namespace mojo
+
+#endif // CommonCustomTypesStructTraits_h

Powered by Google App Engine
This is Rietveld 408576698