| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 true. | 77 # Default value is true. |
| 78 # TODO(yzshen): | 78 # TODO(yzshen): |
| 79 # - convert all users to use the new mode; | 79 # - convert all users to use the new mode; |
| 80 # - remove support for the old mode. | 80 # - remove support for the old mode. |
| 81 # | 81 # |
| 82 # cpp_only (optional) |
| 83 # If set to true, only the C++ bindings targets will be generated. |
| 84 # |
| 82 # The following parameters are used to support the component build. They are | 85 # The following parameters are used to support the component build. They are |
| 83 # needed so that bindings which are linked with a component can use the same | 86 # needed so that bindings which are linked with a component can use the same |
| 84 # export settings for classes. The first three are for the chromium variant, and | 87 # export settings for classes. The first three are for the chromium variant, and |
| 85 # the last three are for the blink variant. | 88 # the last three are for the blink variant. |
| 86 # export_class_attribute (optional) | 89 # export_class_attribute (optional) |
| 87 # The attribute to add to the class declaration. e.g. "CONTENT_EXPORT" | 90 # The attribute to add to the class declaration. e.g. "CONTENT_EXPORT" |
| 88 # export_define (optional) | 91 # export_define (optional) |
| 89 # A define to be added to the source_set which is needed by the export | 92 # A define to be added to the source_set which is needed by the export |
| 90 # header. e.g. "CONTENT_IMPLEMENTATION=1" | 93 # header. e.g. "CONTENT_IMPLEMENTATION=1" |
| 91 # export_header (optional) | 94 # export_header (optional) |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 # //mojo/something:something and we can append shared_cpp_sources_suffix | 205 # //mojo/something:something and we can append shared_cpp_sources_suffix |
| 203 # to get the cpp dependency name. | 206 # to get the cpp dependency name. |
| 204 full_name = get_label_info("$d", "label_no_toolchain") | 207 full_name = get_label_info("$d", "label_no_toolchain") |
| 205 public_deps += [ "${full_name}_${shared_cpp_sources_suffix}" ] | 208 public_deps += [ "${full_name}_${shared_cpp_sources_suffix}" ] |
| 206 } | 209 } |
| 207 } | 210 } |
| 208 | 211 |
| 209 # Generate code for variants. | 212 # Generate code for variants. |
| 210 foreach(bindings_configuration, _bindings_configurations) { | 213 foreach(bindings_configuration, _bindings_configurations) { |
| 211 cpp_only = false | 214 cpp_only = false |
| 215 if (defined(invoker.cpp_only)) { |
| 216 cpp_only = invoker.cpp_only |
| 217 } |
| 212 variant_suffix = "" | 218 variant_suffix = "" |
| 213 if (defined(bindings_configuration.variant)) { | 219 if (defined(bindings_configuration.variant)) { |
| 214 variant = bindings_configuration.variant | 220 variant = bindings_configuration.variant |
| 215 variant_suffix = "_${variant}" | 221 variant_suffix = "_${variant}" |
| 216 cpp_only = true | 222 cpp_only = true |
| 217 } | 223 } |
| 218 type_mappings_target_name = "${target_name}${variant_suffix}__type_mappings" | 224 type_mappings_target_name = "${target_name}${variant_suffix}__type_mappings" |
| 219 type_mappings_path = | 225 type_mappings_path = |
| 220 "$target_gen_dir/${target_name}${variant_suffix}__type_mappings" | 226 "$target_gen_dir/${target_name}${variant_suffix}__type_mappings" |
| 221 active_typemaps = [] | 227 active_typemaps = [] |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 full_name = get_label_info(d, "label_no_toolchain") | 532 full_name = get_label_info(d, "label_no_toolchain") |
| 527 deps += [ "${full_name}_java" ] | 533 deps += [ "${full_name}_java" ] |
| 528 } | 534 } |
| 529 | 535 |
| 530 srcjar_deps = [ ":$java_srcjar_target_name" ] | 536 srcjar_deps = [ ":$java_srcjar_target_name" ] |
| 531 run_findbugs_override = false | 537 run_findbugs_override = false |
| 532 } | 538 } |
| 533 } | 539 } |
| 534 } | 540 } |
| 535 } | 541 } |
| OLD | NEW |