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

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: 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/tools/bindings/mojom.gni
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index d8923dd1460f440cda42c06ea75f22c396746887..9ff1af1265a7828eb15baca80aa482174ac5b47e 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -59,6 +59,9 @@ mojom_generator_sources = [
# testonly (optional)
#
# visibility (optional)
+#
+# for_blink (optional, C++ only)
+# Use WTF types as generated type for mojo string/array/map.
template("mojom") {
assert(
defined(invoker.sources) || defined(invoker.deps) ||
@@ -158,6 +161,10 @@ template("mojom") {
}
inputs += invoker.typemaps
}
+
+ if (defined(invoker.for_blink) && invoker.for_blink) {
+ args += [ "--for_blink" ]
+ }
}
}
@@ -245,6 +252,9 @@ template("mojom") {
full_name = get_label_info(d, "label_no_toolchain")
deps += [ "${full_name}_${cpp_sources_suffix}" ]
}
+ if (defined(invoker.for_blink) && invoker.for_blink) {
+ public_deps += [ "//mojo/public/cpp/bindings:wtf_support" ]
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698