OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 mojom_generator_root = "//mojo/public/tools/bindings" | 5 mojom_generator_root = "//mojo/public/tools/bindings" |
6 mojom_generator_script = "$mojom_generator_root/mojom_bindings_generator.py" | 6 mojom_generator_script = "$mojom_generator_root/mojom_bindings_generator.py" |
7 mojom_generator_sources = [ | 7 mojom_generator_sources = [ |
8 "$mojom_generator_root/generators/mojom_cpp_generator.py", | 8 "$mojom_generator_root/generators/mojom_cpp_generator.py", |
9 "$mojom_generator_root/generators/mojom_js_generator.py", | 9 "$mojom_generator_root/generators/mojom_js_generator.py", |
10 "$mojom_generator_root/generators/mojom_java_generator.py", | 10 "$mojom_generator_root/generators/mojom_java_generator.py", |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 # | 62 # |
63 # public_deps (optional) | 63 # public_deps (optional) |
64 # Note: this can contain only other mojom targets. | 64 # Note: this can contain only other mojom targets. |
65 # | 65 # |
66 # import_dirs (optional) | 66 # import_dirs (optional) |
67 # List of import directories that will get added when processing sources. | 67 # List of import directories that will get added when processing sources. |
68 # | 68 # |
69 # testonly (optional) | 69 # testonly (optional) |
70 # | 70 # |
71 # visibility (optional) | 71 # visibility (optional) |
| 72 # |
| 73 # use_new_wrapper_types (optional) |
| 74 # If set to true, mojom array/map/string will be mapped to STL (for |
| 75 # chromium variant) or WTF (for blink) types. Otherwise, they will be |
| 76 # mapped to mojo::Array/Map/String/etc. |
| 77 # Default value is false. |
| 78 # TODO(yzshen): Eventually remove this parameter. |
72 template("mojom") { | 79 template("mojom") { |
73 assert( | 80 assert( |
74 defined(invoker.sources) || defined(invoker.deps) || | 81 defined(invoker.sources) || defined(invoker.deps) || |
75 defined(invoker.public_deps), | 82 defined(invoker.public_deps), |
76 "\"sources\" or \"deps\" must be defined for the $target_name template.") | 83 "\"sources\" or \"deps\" must be defined for the $target_name template.") |
77 | 84 |
78 all_deps = [] | 85 all_deps = [] |
79 if (defined(invoker.deps)) { | 86 if (defined(invoker.deps)) { |
80 all_deps += invoker.deps | 87 all_deps += invoker.deps |
81 } | 88 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 219 |
213 args += [ | 220 args += [ |
214 "--typemap", | 221 "--typemap", |
215 rebase_path(type_mappings_path, root_build_dir), | 222 rebase_path(type_mappings_path, root_build_dir), |
216 ] | 223 ] |
217 | 224 |
218 if (defined(bindings_configuration.for_blink) && | 225 if (defined(bindings_configuration.for_blink) && |
219 bindings_configuration.for_blink) { | 226 bindings_configuration.for_blink) { |
220 args += [ "--for_blink" ] | 227 args += [ "--for_blink" ] |
221 } | 228 } |
| 229 |
| 230 if (defined(invoker.use_new_wrapper_types) && |
| 231 invoker.use_new_wrapper_types) { |
| 232 args += [ "--use_new_wrapper_types" ] |
| 233 } |
222 } | 234 } |
223 } | 235 } |
224 | 236 |
225 action(type_mappings_target_name) { | 237 action(type_mappings_target_name) { |
226 inputs = _bindings_configuration_files | 238 inputs = _bindings_configuration_files |
227 outputs = [ | 239 outputs = [ |
228 type_mappings_path, | 240 type_mappings_path, |
229 ] | 241 ] |
230 script = "$mojom_generator_root/generate_type_mappings.py" | 242 script = "$mojom_generator_root/generate_type_mappings.py" |
231 deps = [] | 243 deps = [] |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 full_name = get_label_info(d, "label_no_toolchain") | 413 full_name = get_label_info(d, "label_no_toolchain") |
402 deps += [ "${full_name}_java" ] | 414 deps += [ "${full_name}_java" ] |
403 } | 415 } |
404 | 416 |
405 srcjar_deps = [ ":$java_srcjar_target_name" ] | 417 srcjar_deps = [ ":$java_srcjar_target_name" ] |
406 run_findbugs_override = false | 418 run_findbugs_override = false |
407 } | 419 } |
408 } | 420 } |
409 } | 421 } |
410 } | 422 } |
OLD | NEW |