Chromium Code Reviews| Index: tools/gn/bundle_data.h |
| diff --git a/tools/gn/bundle_data.h b/tools/gn/bundle_data.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f84f794a3f20d5147f0bc9b57639dfec7269bf70 |
| --- /dev/null |
| +++ b/tools/gn/bundle_data.h |
| @@ -0,0 +1,71 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef TOOLS_GN_BUNDLE_DATA_H_ |
| +#define TOOLS_GN_BUNDLE_DATA_H_ |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "tools/gn/bundle_file_rule.h" |
| + |
| +class OutputFile; |
| +class SourceFile; |
| +class Settings; |
| +class Target; |
| + |
| +bool IsSourceFileFromAssetCatalog(const SourceFile& source, |
| + SourceFile* asset_catalog); |
| + |
| +class BundleData { |
| + public: |
| + BundleData(); |
| + ~BundleData(); |
| + |
| + void AddFileRuleFromTarget(const Target* target); |
| + |
| + void GetSourceFiles(std::vector<SourceFile>* sources) const; |
| + |
| + void GetOutputFiles(const Settings* settings, |
| + std::vector<OutputFile>* outputs) const; |
| + |
| + void GetOutputsAsSourceFiles( |
| + const Settings* settings, |
| + std::vector<SourceFile>* outputs_as_source) const; |
| + |
| + SourceFile GetCompiledAssetCatalogPath() const; |
| + |
| + std::vector<SourceFile>& asset_catalog_sources() { |
| + return asset_catalog_sources_; |
| + } |
| + const std::vector<SourceFile>& asset_catalog_sources() const { |
| + return asset_catalog_sources_; |
| + } |
| + |
| + std::vector<BundleFileRule>& file_rules() { return file_rules_; } |
| + const std::vector<BundleFileRule>& file_rules() const { return file_rules_; } |
| + |
| + std::string& root_dir() { return root_dir_; } |
| + const std::string& root_dir() const { return root_dir_; } |
| + |
| + std::string& resources_dir() { return resources_dir_; } |
| + const std::string& resources_dir() const { return resources_dir_; } |
| + |
| + std::string& executable_dir() { return executable_dir_; } |
| + const std::string& executable_dir() const { return executable_dir_; } |
| + |
| + std::string& plugins_dir() { return plugins_dir_; } |
| + const std::string& plugins_dir() const { return plugins_dir_; } |
| + |
| + private: |
| + std::vector<SourceFile> asset_catalog_sources_; |
| + std::vector<BundleFileRule> file_rules_; |
| + |
| + 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.
|
| + std::string resources_dir_; |
| + std::string executable_dir_; |
| + std::string plugins_dir_; |
| +}; |
| + |
| +#endif // TOOLS_GN_BUNDLE_DATA_H_ |