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

Unified Diff: mojo/public/tools/bindings/mojom.gni

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: Created 4 years, 10 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/tools/bindings/mojom.gni
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index 6e2a62a8aa0fc4c8102bdd9395d6f0b7ff541ca5..abd9f28863f6407733cb24849e638653844229e1 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -64,6 +64,9 @@ mojom_generator_sources = [
# testonly (optional)
#
# visibility (optional)
+#
+# use_wtf_types (optional, C++ only)
Ken Rockot(use gerrit already) 2016/03/01 02:06:37 nit: How about more generically something like for
yzshen1 2016/03/01 18:42:46 Sounds good. Done.
+# Use WTF types as generated type for mojo string/array/map.
template("mojom") {
assert(
defined(invoker.sources) || defined(invoker.deps) ||
@@ -163,6 +166,10 @@ template("mojom") {
}
inputs += invoker.typemaps
}
+
+ if (defined(invoker.use_wtf_types) && invoker.use_wtf_types) {
+ args += [ "--use_wtf_types" ]
+ }
}
}
@@ -253,6 +260,12 @@ template("mojom") {
if (!defined(invoker.with_environment) || invoker.with_environment) {
deps += [ "//mojo/environment:chromium" ]
}
+ if (defined(invoker.use_wtf_types) && invoker.use_wtf_types) {
+ public_deps += [
+ "//mojo/public/cpp/bindings:wtf_support",
+ "//third_party/WebKit/Source/wtf",
+ ]
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698