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

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

Issue 544423002: Convert GN visibility variables to lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 3 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/environment/BUILD.gn ('k') | ppapi/BUILD.gn » ('j') | 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 # Generate C++ and JavaScript source files from mojom files. The output files 5 # Generate C++ and JavaScript source files from mojom files. The output files
6 # will go under the generated file directory tree with the same path as each 6 # will go under the generated file directory tree with the same path as each
7 # input file. 7 # input file.
8 # 8 #
9 # Parameters: 9 # Parameters:
10 # 10 #
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 "{{source_gen_dir}}/{{source_name_part}}.mojom.h", 68 "{{source_gen_dir}}/{{source_name_part}}.mojom.h",
69 "{{source_gen_dir}}/{{source_name_part}}.mojom-internal.h", 69 "{{source_gen_dir}}/{{source_name_part}}.mojom-internal.h",
70 ] 70 ]
71 generator_js_outputs = [ 71 generator_js_outputs = [
72 "{{source_gen_dir}}/{{source_name_part}}.mojom.js", 72 "{{source_gen_dir}}/{{source_name_part}}.mojom.js",
73 ] 73 ]
74 generator_python_outputs = [ 74 generator_python_outputs = [
75 "{{source_gen_dir}}/{{source_name_part}}_mojom.py", 75 "{{source_gen_dir}}/{{source_name_part}}_mojom.py",
76 ] 76 ]
77 77
78 target_visibility = ":$target_name" 78 if (defined(invoker.visibility)) {
79 # Need to save this because the the target_name is overwritten inside the
80 # action to be that of the action itself. Only define this in the case the
81 # var is used to avoid unused var error.
82 target_visibility = [ ":$target_name" ]
83 }
79 84
80 generator_target_name = target_name + "_generator" 85 generator_target_name = target_name + "_generator"
81 action_foreach(generator_target_name) { 86 action_foreach(generator_target_name) {
82 visibility = target_visibility 87 if (defined(invoker.visibility)) {
88 visibility = target_visibility + invoker.visibility
89 }
83 script = generator_script 90 script = generator_script
84 inputs = generator_sources 91 inputs = generator_sources
85 sources = invoker.sources 92 sources = invoker.sources
86 outputs = generator_cpp_outputs + 93 outputs = generator_cpp_outputs +
87 generator_js_outputs + 94 generator_js_outputs +
88 generator_python_outputs 95 generator_python_outputs
89 args = [ 96 args = [
90 "{{source}}", 97 "{{source}}",
91 "--use_chromium_bundled_pylibs", 98 "--use_chromium_bundled_pylibs",
92 "-d", rebase_path("//", root_build_dir), 99 "-d", rebase_path("//", root_build_dir),
(...skipping 10 matching lines...) Expand all
103 data = process_file_template(invoker.sources, generator_js_outputs) 110 data = process_file_template(invoker.sources, generator_js_outputs)
104 deps = [ 111 deps = [
105 ":$generator_target_name", 112 ":$generator_target_name",
106 "//mojo/public/cpp/bindings", 113 "//mojo/public/cpp/bindings",
107 ] 114 ]
108 if (defined(invoker.deps)) { 115 if (defined(invoker.deps)) {
109 deps += invoker.deps 116 deps += invoker.deps
110 } 117 }
111 } 118 }
112 } 119 }
OLDNEW
« no previous file with comments | « mojo/environment/BUILD.gn ('k') | ppapi/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698