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

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

Issue 1842563006: DO NOT SUBMIT. Experimental Mac GN Framework support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Binary bundle data 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 | « tools/gn/bundle_data_target_generator.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
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_FILE_RULE_H_ 5 #ifndef TOOLS_GN_BUNDLE_FILE_RULE_H_
6 #define TOOLS_GN_BUNDLE_FILE_RULE_H_ 6 #define TOOLS_GN_BUNDLE_FILE_RULE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "tools/gn/source_file.h" 10 #include "tools/gn/source_file.h"
11 #include "tools/gn/substitution_pattern.h" 11 #include "tools/gn/substitution_pattern.h"
12 12
13 class BundleData; 13 class BundleData;
14 class Settings; 14 class Settings;
15 class SourceFile; 15 class SourceFile;
16 class OutputFile; 16 class OutputFile;
17 17
18 // BundleFileRule contains the information found in a "bundle_data" target. 18 // BundleFileRule contains the information found in a "bundle_data" target.
19 class BundleFileRule { 19 class BundleFileRule {
20 public: 20 public:
21 BundleFileRule(const std::vector<SourceFile> sources, 21 BundleFileRule(const std::vector<SourceFile> sources,
22 const SubstitutionPattern& pattern); 22 const SubstitutionPattern& pattern,
23 bool binary_compress);
23 BundleFileRule(const BundleFileRule& other); 24 BundleFileRule(const BundleFileRule& other);
24 ~BundleFileRule(); 25 ~BundleFileRule();
25 26
26 // Applies the substitution pattern to a source file, returning the result 27 // Applies the substitution pattern to a source file, returning the result
27 // as either a SourceFile or an OutputFile. 28 // as either a SourceFile or an OutputFile.
28 SourceFile ApplyPatternToSource(const Settings* settings, 29 SourceFile ApplyPatternToSource(const Settings* settings,
29 const BundleData& bundle_data, 30 const BundleData& bundle_data,
30 const SourceFile& source_file) const; 31 const SourceFile& source_file) const;
31 OutputFile ApplyPatternToSourceAsOutputFile( 32 OutputFile ApplyPatternToSourceAsOutputFile(
32 const Settings* settings, 33 const Settings* settings,
33 const BundleData& bundle_data, 34 const BundleData& bundle_data,
34 const SourceFile& source_file) const; 35 const SourceFile& source_file) const;
35 36
36 // Returns the list of SourceFiles. 37 // Returns the list of SourceFiles.
37 const std::vector<SourceFile>& sources() const { return sources_; } 38 const std::vector<SourceFile>& sources() const { return sources_; }
38 39
40 bool binary_compress() const { return binary_compress_; }
41
39 private: 42 private:
40 std::vector<SourceFile> sources_; 43 std::vector<SourceFile> sources_;
41 SubstitutionPattern pattern_; 44 SubstitutionPattern pattern_;
45 bool binary_compress_;
42 }; 46 };
43 47
44 #endif // TOOLS_GN_BUNDLE_FILE_RULE_H_ 48 #endif // TOOLS_GN_BUNDLE_FILE_RULE_H_
OLDNEW
« no previous file with comments | « tools/gn/bundle_data_target_generator.cc ('k') | tools/gn/bundle_file_rule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698