Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_DATA_H_ | |
| 6 #define TOOLS_GN_BUNDLE_DATA_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "tools/gn/bundle_file_rule.h" | |
| 12 | |
| 13 class OutputFile; | |
| 14 class SourceFile; | |
| 15 class Settings; | |
| 16 class Target; | |
| 17 | |
| 18 bool IsSourceFileFromAssetCatalog(const SourceFile& source, | |
| 19 SourceFile* asset_catalog); | |
| 20 | |
| 21 class BundleData { | |
| 22 public: | |
| 23 BundleData(); | |
| 24 ~BundleData(); | |
| 25 | |
| 26 void AddFileRuleFromTarget(const Target* target); | |
| 27 | |
| 28 void GetSourceFiles(std::vector<SourceFile>* sources) const; | |
| 29 | |
| 30 void GetOutputFiles(const Settings* settings, | |
| 31 std::vector<OutputFile>* outputs) const; | |
| 32 | |
| 33 void GetOutputsAsSourceFiles( | |
| 34 const Settings* settings, | |
| 35 std::vector<SourceFile>* outputs_as_source) const; | |
| 36 | |
| 37 SourceFile GetCompiledAssetCatalogPath() const; | |
| 38 | |
| 39 std::vector<SourceFile>& asset_catalog_sources() { | |
| 40 return asset_catalog_sources_; | |
| 41 } | |
| 42 const std::vector<SourceFile>& asset_catalog_sources() const { | |
| 43 return asset_catalog_sources_; | |
| 44 } | |
| 45 | |
| 46 std::vector<BundleFileRule>& file_rules() { return file_rules_; } | |
| 47 const std::vector<BundleFileRule>& file_rules() const { return file_rules_; } | |
| 48 | |
| 49 std::string& root_dir() { return root_dir_; } | |
| 50 const std::string& root_dir() const { return root_dir_; } | |
| 51 | |
| 52 std::string& resources_dir() { return resources_dir_; } | |
| 53 const std::string& resources_dir() const { return resources_dir_; } | |
| 54 | |
| 55 std::string& executable_dir() { return executable_dir_; } | |
| 56 const std::string& executable_dir() const { return executable_dir_; } | |
| 57 | |
| 58 std::string& plugins_dir() { return plugins_dir_; } | |
| 59 const std::string& plugins_dir() const { return plugins_dir_; } | |
| 60 | |
| 61 private: | |
| 62 std::vector<SourceFile> asset_catalog_sources_; | |
| 63 std::vector<BundleFileRule> file_rules_; | |
| 64 | |
| 65 std::string root_dir_; | |
|
brettw
2016/03/02 21:12:42
Can this have a comment that these values are subd
sdefresne
2016/03/07 20:47:35
Done.
| |
| 66 std::string resources_dir_; | |
| 67 std::string executable_dir_; | |
| 68 std::string plugins_dir_; | |
| 69 }; | |
| 70 | |
| 71 #endif // TOOLS_GN_BUNDLE_DATA_H_ | |
| OLD | NEW |