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

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

Issue 2136733002: Mojo C++ bindings: add a new mode to generator to use native STL/WTF types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@67_new
Patch Set: . Created 4 years, 5 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 0caaabf38146e91e6f8d22319350decf84afcc3b..d6f4f17c8a05a48b056928736318248d3430bd02 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -69,6 +69,16 @@ foreach(configuration, _bindings_configurations) {
# testonly (optional)
#
# visibility (optional)
+#
+# use_new_wrapper_types (optional)
+# If set to true, mojom array/map/string will be mapped to STL (for
+# chromium variant) or WTF (for blink) types. Otherwise, they will be
+# mapped to mojo::Array/Map/String/etc.
+# Default value is false.
+# TODO(yzshen):
+# - flip the flag and make use_new_wrapper_types=true the default;
+# - convert all users to use the new mode;
+# - remove support for the old mode.
template("mojom") {
assert(
defined(invoker.sources) || defined(invoker.deps) ||
@@ -219,6 +229,11 @@ template("mojom") {
bindings_configuration.for_blink) {
args += [ "--for_blink" ]
}
+
+ if (defined(invoker.use_new_wrapper_types) &&
+ invoker.use_new_wrapper_types) {
+ args += [ "--use_new_wrapper_types" ]
+ }
}
}
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | mojo/public/tools/bindings/mojom_bindings_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698