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

Unified Diff: mojo/public/cpp/bindings/lib/wtf_string_serialization.h

Issue 1751563002: Mojo C++ bindings: support mapping mojo string to WTF::String. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync & rebase Created 4 years, 9 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: mojo/public/cpp/bindings/lib/wtf_string_serialization.h
diff --git a/mojo/public/cpp/bindings/lib/wtf_string_serialization.h b/mojo/public/cpp/bindings/lib/wtf_string_serialization.h
new file mode 100644
index 0000000000000000000000000000000000000000..a1102654dcd8ef1f641ef90c573123f69fec9b3b
--- /dev/null
+++ b/mojo/public/cpp/bindings/lib/wtf_string_serialization.h
@@ -0,0 +1,28 @@
+// 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 MOJO_PUBLIC_CPP_BINDINGS_LIB_WTF_STRING_SERIALIZATION_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_LIB_WTF_STRING_SERIALIZATION_H_
+
+#include <stddef.h>
+
+#include "mojo/public/cpp/bindings/lib/array_internal.h"
+#include "mojo/public/cpp/bindings/lib/bindings_serialization.h"
+
+namespace WTF {
+class String;
+
+size_t GetSerializedSize_(const WTF::String& input,
+ mojo::internal::SerializationContext* context);
+void Serialize_(const WTF::String& input,
+ mojo::internal::Buffer* buffer,
+ mojo::internal::String_Data** output,
+ mojo::internal::SerializationContext* context);
+bool Deserialize_(mojo::internal::String_Data* input,
+ WTF::String* output,
+ mojo::internal::SerializationContext* context);
+
+} // namespace WTF
+
+#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_WTF_STRING_SERIALIZATION_H_

Powered by Google App Engine
This is Rietveld 408576698