| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 # | 72 # |
| 73 # use_new_wrapper_types (optional) | 73 # use_new_wrapper_types (optional) |
| 74 # If set to true, mojom array/map/string will be mapped to STL (for | 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 | 75 # chromium variant) or WTF (for blink) types. Otherwise, they will be |
| 76 # mapped to mojo::Array/Map/String/etc. | 76 # mapped to mojo::Array/Map/String/etc. |
| 77 # Default value is false. | 77 # Default value is true. |
| 78 # TODO(yzshen): | 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; | 79 # - convert all users to use the new mode; |
| 81 # - remove support for the old mode. | 80 # - remove support for the old mode. |
| 82 template("mojom") { | 81 template("mojom") { |
| 83 assert( | 82 assert( |
| 84 defined(invoker.sources) || defined(invoker.deps) || | 83 defined(invoker.sources) || defined(invoker.deps) || |
| 85 defined(invoker.public_deps), | 84 defined(invoker.public_deps), |
| 86 "\"sources\" or \"deps\" must be defined for the $target_name template.") | 85 "\"sources\" or \"deps\" must be defined for the $target_name template.") |
| 87 | 86 |
| 88 all_deps = [] | 87 all_deps = [] |
| 89 if (defined(invoker.deps)) { | 88 if (defined(invoker.deps)) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 args += [ | 222 args += [ |
| 224 "--typemap", | 223 "--typemap", |
| 225 rebase_path(type_mappings_path, root_build_dir), | 224 rebase_path(type_mappings_path, root_build_dir), |
| 226 ] | 225 ] |
| 227 | 226 |
| 228 if (defined(bindings_configuration.for_blink) && | 227 if (defined(bindings_configuration.for_blink) && |
| 229 bindings_configuration.for_blink) { | 228 bindings_configuration.for_blink) { |
| 230 args += [ "--for_blink" ] | 229 args += [ "--for_blink" ] |
| 231 } | 230 } |
| 232 | 231 |
| 233 if (defined(invoker.use_new_wrapper_types) && | 232 if (!defined(invoker.use_new_wrapper_types) || |
| 234 invoker.use_new_wrapper_types) { | 233 invoker.use_new_wrapper_types) { |
| 235 args += [ "--use_new_wrapper_types" ] | 234 args += [ "--use_new_wrapper_types" ] |
| 236 } | 235 } |
| 237 } | 236 } |
| 238 } | 237 } |
| 239 | 238 |
| 240 action(type_mappings_target_name) { | 239 action(type_mappings_target_name) { |
| 241 inputs = _bindings_configuration_files | 240 inputs = _bindings_configuration_files |
| 242 outputs = [ | 241 outputs = [ |
| 243 type_mappings_path, | 242 type_mappings_path, |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 full_name = get_label_info(d, "label_no_toolchain") | 415 full_name = get_label_info(d, "label_no_toolchain") |
| 417 deps += [ "${full_name}_java" ] | 416 deps += [ "${full_name}_java" ] |
| 418 } | 417 } |
| 419 | 418 |
| 420 srcjar_deps = [ ":$java_srcjar_target_name" ] | 419 srcjar_deps = [ ":$java_srcjar_target_name" ] |
| 421 run_findbugs_override = false | 420 run_findbugs_override = false |
| 422 } | 421 } |
| 423 } | 422 } |
| 424 } | 423 } |
| 425 } | 424 } |
| OLD | NEW |