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): |
| 79 # - flip the flag and make use_new_wrapper_types=true the default; |
| 80 # - convert all users to use the new mode; |
| 81 # - remove support for the old mode. |
72 template("mojom") { | 82 template("mojom") { |
73 assert( | 83 assert( |
74 defined(invoker.sources) || defined(invoker.deps) || | 84 defined(invoker.sources) || defined(invoker.deps) || |
75 defined(invoker.public_deps), | 85 defined(invoker.public_deps), |
76 "\"sources\" or \"deps\" must be defined for the $target_name template.") | 86 "\"sources\" or \"deps\" must be defined for the $target_name template.") |
77 | 87 |
78 all_deps = [] | 88 all_deps = [] |
79 if (defined(invoker.deps)) { | 89 if (defined(invoker.deps)) { |
80 all_deps += invoker.deps | 90 all_deps += invoker.deps |
81 } | 91 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 222 |
213 args += [ | 223 args += [ |
214 "--typemap", | 224 "--typemap", |
215 rebase_path(type_mappings_path, root_build_dir), | 225 rebase_path(type_mappings_path, root_build_dir), |
216 ] | 226 ] |
217 | 227 |
218 if (defined(bindings_configuration.for_blink) && | 228 if (defined(bindings_configuration.for_blink) && |
219 bindings_configuration.for_blink) { | 229 bindings_configuration.for_blink) { |
220 args += [ "--for_blink" ] | 230 args += [ "--for_blink" ] |
221 } | 231 } |
| 232 |
| 233 if (defined(invoker.use_new_wrapper_types) && |
| 234 invoker.use_new_wrapper_types) { |
| 235 args += [ "--use_new_wrapper_types" ] |
| 236 } |
222 } | 237 } |
223 } | 238 } |
224 | 239 |
225 action(type_mappings_target_name) { | 240 action(type_mappings_target_name) { |
226 inputs = _bindings_configuration_files | 241 inputs = _bindings_configuration_files |
227 outputs = [ | 242 outputs = [ |
228 type_mappings_path, | 243 type_mappings_path, |
229 ] | 244 ] |
230 script = "$mojom_generator_root/generate_type_mappings.py" | 245 script = "$mojom_generator_root/generate_type_mappings.py" |
231 deps = [] | 246 deps = [] |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 full_name = get_label_info(d, "label_no_toolchain") | 416 full_name = get_label_info(d, "label_no_toolchain") |
402 deps += [ "${full_name}_java" ] | 417 deps += [ "${full_name}_java" ] |
403 } | 418 } |
404 | 419 |
405 srcjar_deps = [ ":$java_srcjar_target_name" ] | 420 srcjar_deps = [ ":$java_srcjar_target_name" ] |
406 run_findbugs_override = false | 421 run_findbugs_override = false |
407 } | 422 } |
408 } | 423 } |
409 } | 424 } |
410 } | 425 } |
OLD | NEW |