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

Unified Diff: third_party/WebKit/Source/platform/payments/BlinkTypeConverters.h

Issue 1753543002: PaymentRequest Mojo bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface
Patch Set: Rename WebStuff into PlatformStuff 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: third_party/WebKit/Source/platform/payments/BlinkTypeConverters.h
diff --git a/third_party/WebKit/Source/platform/payments/BlinkTypeConverters.h b/third_party/WebKit/Source/platform/payments/BlinkTypeConverters.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c768677c182d700efbaf09a2e0d746408aa86b9
--- /dev/null
+++ b/third_party/WebKit/Source/platform/payments/BlinkTypeConverters.h
@@ -0,0 +1,40 @@
+// 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 BlinkTypeConverters_h
+#define BlinkTypeConverters_h
+
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/string.h"
+#include "mojo/public/cpp/bindings/type_converter.h"
+#include "wtf/Vector.h"
+#include "wtf/text/WTFString.h"
+
+// TODO(rouslan): Remove this file when http://crbug.com/583738 is fixed.
+
+namespace mojo {
+
+template <>
+struct TypeConverter<String, WTF::String> {
+ static String Convert(const WTF::String& input);
+};
+
+template <>
+struct TypeConverter<WTF::String, String> {
+ static WTF::String Convert(const String& input);
+};
+
+template <>
+struct TypeConverter<WTF::Vector<WTF::String>, Array<String>> {
+ static WTF::Vector<WTF::String> Convert(const Array<String>& input);
+};
+
+template <>
+struct TypeConverter<Array<String>, WTF::Vector<WTF::String>> {
+ static Array<String> Convert(const WTF::Vector<WTF::String>& input);
+};
+
+} // namespace mojo
+
+#endif // BlinkTypeConverters_h

Powered by Google App Engine
This is Rietveld 408576698