Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: mojo/public/tools/bindings/mojom.gni

Issue 2400313002: Convert miscellaneous RenderThreadImpl messages to mojom (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/public/tools/bindings/chromium_bindings_configuration.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 ] 32 ]
33 } else { 33 } else {
34 _bindings_configuration_files = 34 _bindings_configuration_files =
35 [ "//mojo/public/tools/bindings/chromium_bindings_configuration.gni" ] 35 [ "//mojo/public/tools/bindings/chromium_bindings_configuration.gni" ]
36 } 36 }
37 _bindings_configurations = [] 37 _bindings_configurations = []
38 foreach(config_file, _bindings_configuration_files) { 38 foreach(config_file, _bindings_configuration_files) {
39 _bindings_configurations += [ read_file(config_file, "scope") ] 39 _bindings_configurations += [ read_file(config_file, "scope") ]
40 } 40 }
41 foreach(configuration, _bindings_configurations) { 41 foreach(configuration, _bindings_configurations) {
42 # Check that the mojom field of each typemap refers to a mojom that exists.
42 foreach(typemap, configuration.typemaps) { 43 foreach(typemap, configuration.typemaps) {
43 # Check that the mojom field of each typemap refers to a mojom that exists.
44 read_file(typemap.mojom, "") 44 read_file(typemap.mojom, "")
45 } 45 }
46 if (is_mac && defined(configuration.typemaps_mac)) {
47 foreach(typemap, configuration.typemaps_mac) {
48 read_file(typemap.mojom, "")
49 }
50 }
46 } 51 }
47 52
48 # Generate C++/JavaScript/Java source files from mojom files. The output files 53 # Generate C++/JavaScript/Java source files from mojom files. The output files
49 # will go under the generated file directory tree with the same path as each 54 # will go under the generated file directory tree with the same path as each
50 # input file. 55 # input file.
51 # 56 #
52 # Parameters: 57 # Parameters:
53 # 58 #
54 # sources (optional if one of the deps sets listed below is present) 59 # sources (optional if one of the deps sets listed below is present)
55 # List of source .mojom files to compile. 60 # List of source .mojom files to compile.
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } else { 256 } else {
252 enabled_sources = invoker.sources 257 enabled_sources = invoker.sources
253 } 258 }
254 foreach(source, enabled_sources) { 259 foreach(source, enabled_sources) {
255 # TODO(sammc): Use a map instead of a linear scan when GN supports maps. 260 # TODO(sammc): Use a map instead of a linear scan when GN supports maps.
256 foreach(typemap, bindings_configuration.typemaps) { 261 foreach(typemap, bindings_configuration.typemaps) {
257 if (get_path_info(source, "abspath") == typemap.mojom) { 262 if (get_path_info(source, "abspath") == typemap.mojom) {
258 active_typemaps += [ typemap ] 263 active_typemaps += [ typemap ]
259 } 264 }
260 } 265 }
266 if (is_mac && defined(bindings_configuration.typemaps_mac)) {
267 foreach(typemap, bindings_configuration.typemaps_mac) {
268 if (get_path_info(source, "abspath") == typemap.mojom) {
269 active_typemaps += [ typemap ]
270 }
271 }
272 }
261 } 273 }
262 274
263 if (!cpp_only) { 275 if (!cpp_only) {
264 generator_js_outputs = 276 generator_js_outputs =
265 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.js" ] 277 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.js" ]
266 generator_java_outputs = 278 generator_java_outputs =
267 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.srcjar" ] 279 [ "{{source_gen_dir}}/{{source_name_part}}.mojom.srcjar" ]
268 } 280 }
269 generator_target_name = "${target_name}${variant_suffix}__generator" 281 generator_target_name = "${target_name}${variant_suffix}__generator"
270 action_foreach(generator_target_name) { 282 action_foreach(generator_target_name) {
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 full_name = get_label_info(d, "label_no_toolchain") 538 full_name = get_label_info(d, "label_no_toolchain")
527 deps += [ "${full_name}_java" ] 539 deps += [ "${full_name}_java" ]
528 } 540 }
529 541
530 srcjar_deps = [ ":$java_srcjar_target_name" ] 542 srcjar_deps = [ ":$java_srcjar_target_name" ]
531 run_findbugs_override = false 543 run_findbugs_override = false
532 } 544 }
533 } 545 }
534 } 546 }
535 } 547 }
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/chromium_bindings_configuration.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698