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

Side by Side Diff: tools/gn/bundle_data.h

Issue 1911873002: Store BundleData paths as SourceDirs rather than strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-phony-bundle-target
Patch Set: Created 4 years, 8 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 | « no previous file | tools/gn/bundle_data.cc » ('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 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/bundle_file_rule.h" 11 #include "tools/gn/bundle_file_rule.h"
12 #include "tools/gn/source_dir.h"
12 #include "tools/gn/unique_vector.h" 13 #include "tools/gn/unique_vector.h"
13 14
14 class OutputFile; 15 class OutputFile;
15 class SourceFile; 16 class SourceFile;
16 class Settings; 17 class Settings;
17 class Target; 18 class Target;
18 19
19 // Returns true if |source| correspond to the path of a file in an asset 20 // Returns true if |source| correspond to the path of a file in an asset
20 // catalog. If defined |asset_catalog| is set to its path. 21 // catalog. If defined |asset_catalog| is set to its path.
21 // 22 //
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 // Returns the list of inputs for the compilation of the asset catalog. 80 // Returns the list of inputs for the compilation of the asset catalog.
80 SourceFiles& asset_catalog_sources() { return asset_catalog_sources_; } 81 SourceFiles& asset_catalog_sources() { return asset_catalog_sources_; }
81 const SourceFiles& asset_catalog_sources() const { 82 const SourceFiles& asset_catalog_sources() const {
82 return asset_catalog_sources_; 83 return asset_catalog_sources_;
83 } 84 }
84 85
85 BundleFileRules& file_rules() { return file_rules_; } 86 BundleFileRules& file_rules() { return file_rules_; }
86 const BundleFileRules& file_rules() const { return file_rules_; } 87 const BundleFileRules& file_rules() const { return file_rules_; }
87 88
88 std::string& root_dir() { return root_dir_; } 89 SourceDir& root_dir() { return root_dir_; }
89 const std::string& root_dir() const { return root_dir_; } 90 const SourceDir& root_dir() const { return root_dir_; }
90 91
91 std::string& resources_dir() { return resources_dir_; } 92 SourceDir& resources_dir() { return resources_dir_; }
92 const std::string& resources_dir() const { return resources_dir_; } 93 const SourceDir& resources_dir() const { return resources_dir_; }
93 94
94 std::string& executable_dir() { return executable_dir_; } 95 SourceDir& executable_dir() { return executable_dir_; }
95 const std::string& executable_dir() const { return executable_dir_; } 96 const SourceDir& executable_dir() const { return executable_dir_; }
96 97
97 std::string& plugins_dir() { return plugins_dir_; } 98 SourceDir& plugins_dir() { return plugins_dir_; }
98 const std::string& plugins_dir() const { return plugins_dir_; } 99 const SourceDir& plugins_dir() const { return plugins_dir_; }
99 100
100 // Recursive collection of all bundle_data that the target depends on. 101 // Recursive collection of all bundle_data that the target depends on.
101 const UniqueTargets& bundle_deps() const { return bundle_deps_; } 102 const UniqueTargets& bundle_deps() const { return bundle_deps_; }
102 103
103 private: 104 private:
104 SourceFiles asset_catalog_sources_; 105 SourceFiles asset_catalog_sources_;
105 BundleFileRules file_rules_; 106 BundleFileRules file_rules_;
106 UniqueTargets bundle_deps_; 107 UniqueTargets bundle_deps_;
107 108
108 // All those values are subdirectories relative to root_build_dir, and apart 109 // All those values are subdirectories relative to root_build_dir, and apart
109 // from root_dir, they are either equal to root_dir_ or subdirectories of it. 110 // from root_dir, they are either equal to root_dir_ or subdirectories of it.
110 std::string root_dir_; 111 SourceDir root_dir_;
111 std::string resources_dir_; 112 SourceDir resources_dir_;
112 std::string executable_dir_; 113 SourceDir executable_dir_;
113 std::string plugins_dir_; 114 SourceDir plugins_dir_;
114 }; 115 };
115 116
116 #endif // TOOLS_GN_BUNDLE_DATA_H_ 117 #endif // TOOLS_GN_BUNDLE_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | tools/gn/bundle_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698