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

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

Issue 1752033002: Add "create_bundle" target in order to support bundle with gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-bundle-data
Patch Set: Add unit tests, address comments, update docs and format with clang-format Created 4 years, 9 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 | « tools/gn/bundle_data.cc ('k') | tools/gn/bundle_file_rule.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef TOOLS_GN_BUNDLE_FILE_RULE_H_
6 #define TOOLS_GN_BUNDLE_FILE_RULE_H_
7
8 #include <vector>
9
10 #include "tools/gn/source_file.h"
11 #include "tools/gn/substitution_pattern.h"
12
13 class BundleData;
14 class Settings;
15 class SourceFile;
16 class OutputFile;
17
18 // BundleFileRule contains the information found in a "bundle_data" target.
19 class BundleFileRule {
20 public:
21 BundleFileRule(const std::vector<SourceFile> sources,
22 const SubstitutionPattern& pattern);
23 ~BundleFileRule();
24
25 // Applies the substitution pattern to a source file, returning the result
26 // as either a SourceFile or an OutputFile.
27 SourceFile ApplyPatternToSource(const Settings* settings,
28 const BundleData& bundle_data,
29 const SourceFile& source_file) const;
30 OutputFile ApplyPatternToSourceAsOutputFile(
31 const Settings* settings,
32 const BundleData& bundle_data,
33 const SourceFile& source_file) const;
34
35 // Returns the list of SourceFiles.
36 const std::vector<SourceFile>& sources() const { return sources_; }
37
38 private:
39 std::vector<SourceFile> sources_;
40 SubstitutionPattern pattern_;
41 };
42
43 #endif // TOOLS_GN_BUNDLE_FILE_RULE_H_
OLDNEW
« no previous file with comments | « tools/gn/bundle_data.cc ('k') | tools/gn/bundle_file_rule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698