OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef TOOLS_GN_BUNDLE_DATA_H_ | 5 #ifndef TOOLS_GN_BUNDLE_DATA_H_ |
6 #define TOOLS_GN_BUNDLE_DATA_H_ | 6 #define TOOLS_GN_BUNDLE_DATA_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "tools/gn/action_values.h" | 11 #include "tools/gn/action_values.h" |
12 #include "tools/gn/bundle_file_rule.h" | 12 #include "tools/gn/bundle_file_rule.h" |
13 #include "tools/gn/source_dir.h" | 13 #include "tools/gn/source_dir.h" |
14 #include "tools/gn/source_file.h" | 14 #include "tools/gn/source_file.h" |
15 #include "tools/gn/substitution_list.h" | 15 #include "tools/gn/substitution_list.h" |
16 #include "tools/gn/unique_vector.h" | 16 #include "tools/gn/unique_vector.h" |
17 | 17 |
| 18 class LabelPattern; |
18 class OutputFile; | 19 class OutputFile; |
19 class Settings; | 20 class Settings; |
20 class Target; | 21 class Target; |
21 | 22 |
22 // BundleData holds the information required by "create_bundle" target. | 23 // BundleData holds the information required by "create_bundle" target. |
23 class BundleData { | 24 class BundleData { |
24 public: | 25 public: |
25 using UniqueTargets = UniqueVector<const Target*>; | 26 using UniqueTargets = UniqueVector<const Target*>; |
26 using SourceFiles = std::vector<SourceFile>; | 27 using SourceFiles = std::vector<SourceFile>; |
27 using OutputFiles = std::vector<OutputFile>; | 28 using OutputFiles = std::vector<OutputFile>; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 SubstitutionList& code_signing_outputs() { return code_signing_outputs_; } | 114 SubstitutionList& code_signing_outputs() { return code_signing_outputs_; } |
114 const SubstitutionList& code_signing_outputs() const { | 115 const SubstitutionList& code_signing_outputs() const { |
115 return code_signing_outputs_; | 116 return code_signing_outputs_; |
116 } | 117 } |
117 | 118 |
118 SubstitutionList& code_signing_args() { return code_signing_args_; } | 119 SubstitutionList& code_signing_args() { return code_signing_args_; } |
119 const SubstitutionList& code_signing_args() const { | 120 const SubstitutionList& code_signing_args() const { |
120 return code_signing_args_; | 121 return code_signing_args_; |
121 } | 122 } |
122 | 123 |
| 124 std::vector<LabelPattern>& bundle_deps_filter() { |
| 125 return bundle_deps_filter_; |
| 126 } |
| 127 const std::vector<LabelPattern>& bundle_deps_filter() const { |
| 128 return bundle_deps_filter_; |
| 129 } |
| 130 |
123 // Recursive collection of all bundle_data that the target depends on. | 131 // Recursive collection of all bundle_data that the target depends on. |
124 const UniqueTargets& bundle_deps() const { return bundle_deps_; } | 132 const UniqueTargets& bundle_deps() const { return bundle_deps_; } |
125 | 133 |
126 private: | 134 private: |
127 SourceFiles assets_catalog_sources_; | 135 SourceFiles assets_catalog_sources_; |
128 std::vector<const Target*> assets_catalog_deps_; | 136 std::vector<const Target*> assets_catalog_deps_; |
129 BundleFileRules file_rules_; | 137 BundleFileRules file_rules_; |
130 UniqueTargets bundle_deps_; | 138 UniqueTargets bundle_deps_; |
| 139 std::vector<LabelPattern> bundle_deps_filter_; |
131 | 140 |
132 // All those values are subdirectories relative to root_build_dir, and apart | 141 // All those values are subdirectories relative to root_build_dir, and apart |
133 // from root_dir, they are either equal to root_dir_ or subdirectories of it. | 142 // from root_dir, they are either equal to root_dir_ or subdirectories of it. |
134 SourceDir root_dir_; | 143 SourceDir root_dir_; |
135 SourceDir resources_dir_; | 144 SourceDir resources_dir_; |
136 SourceDir executable_dir_; | 145 SourceDir executable_dir_; |
137 SourceDir plugins_dir_; | 146 SourceDir plugins_dir_; |
138 | 147 |
139 // This is the target type as known to Xcode. This is only used to generate | 148 // This is the target type as known to Xcode. This is only used to generate |
140 // the Xcode project file when using --ide=xcode. | 149 // the Xcode project file when using --ide=xcode. |
141 std::string product_type_; | 150 std::string product_type_; |
142 | 151 |
143 // Holds the values (script name, sources, outputs, script arguments) for the | 152 // Holds the values (script name, sources, outputs, script arguments) for the |
144 // code signing step if defined. | 153 // code signing step if defined. |
145 SourceFile code_signing_script_; | 154 SourceFile code_signing_script_; |
146 std::vector<SourceFile> code_signing_sources_; | 155 std::vector<SourceFile> code_signing_sources_; |
147 SubstitutionList code_signing_outputs_; | 156 SubstitutionList code_signing_outputs_; |
148 SubstitutionList code_signing_args_; | 157 SubstitutionList code_signing_args_; |
149 | 158 |
150 DISALLOW_COPY_AND_ASSIGN(BundleData); | 159 DISALLOW_COPY_AND_ASSIGN(BundleData); |
151 }; | 160 }; |
152 | 161 |
153 #endif // TOOLS_GN_BUNDLE_DATA_H_ | 162 #endif // TOOLS_GN_BUNDLE_DATA_H_ |
OLD | NEW |