16d528ed9Sopenharmony_ci// Copyright 2016 The Chromium Authors. All rights reserved. 26d528ed9Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 36d528ed9Sopenharmony_ci// found in the LICENSE file. 46d528ed9Sopenharmony_ci 56d528ed9Sopenharmony_ci#ifndef TOOLS_GN_BUNDLE_DATA_TARGET_GENERATOR_H_ 66d528ed9Sopenharmony_ci#define TOOLS_GN_BUNDLE_DATA_TARGET_GENERATOR_H_ 76d528ed9Sopenharmony_ci 86d528ed9Sopenharmony_ci#include "gn/target_generator.h" 96d528ed9Sopenharmony_ci 106d528ed9Sopenharmony_ci// Populates a Target with the values from a bundle_data rule. 116d528ed9Sopenharmony_ciclass BundleDataTargetGenerator : public TargetGenerator { 126d528ed9Sopenharmony_ci public: 136d528ed9Sopenharmony_ci BundleDataTargetGenerator(Target* target, 146d528ed9Sopenharmony_ci Scope* scope, 156d528ed9Sopenharmony_ci const FunctionCallNode* function_call, 166d528ed9Sopenharmony_ci Err* err); 176d528ed9Sopenharmony_ci ~BundleDataTargetGenerator() override; 186d528ed9Sopenharmony_ci 196d528ed9Sopenharmony_ci protected: 206d528ed9Sopenharmony_ci void DoRun() override; 216d528ed9Sopenharmony_ci 226d528ed9Sopenharmony_ci private: 236d528ed9Sopenharmony_ci bool FillOutputs(); 246d528ed9Sopenharmony_ci bool FillProductType(); 256d528ed9Sopenharmony_ci 266d528ed9Sopenharmony_ci bool EnsureSubstitutionIsInBundleDir(const SubstitutionPattern& pattern, 276d528ed9Sopenharmony_ci const Value& original_value); 286d528ed9Sopenharmony_ci 296d528ed9Sopenharmony_ci BundleDataTargetGenerator(const BundleDataTargetGenerator&) = delete; 306d528ed9Sopenharmony_ci BundleDataTargetGenerator& operator=(const BundleDataTargetGenerator&) = 316d528ed9Sopenharmony_ci delete; 326d528ed9Sopenharmony_ci}; 336d528ed9Sopenharmony_ci 346d528ed9Sopenharmony_ci#endif // TOOLS_GN_BUNDLE_DATA_TARGET_GENERATOR_H_ 35