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", |
+ ] |
+ } |
} |
} |