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

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 and fix documentation 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
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(
28 const Settings* settings,
29 const BundleData& bundle_data,
30 const SourceFile& source_file) const;
31 OutputFile ApplyPatternToSourceAsOutputFile(
32 const Settings* settings,
33 const BundleData& bundle_data,
34 const SourceFile& source_file) const;
35
36 // Returns the list of SourceFiles.
37 const std::vector<SourceFile>& sources() const { return sources_; }
38
39 private:
40 std::vector<SourceFile> sources_;
41 SubstitutionPattern pattern_;
42 };
43
44 #endif // TOOLS_GN_BUNDLE_FILE_RULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698