| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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 EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_H_ | |
| 6 #define EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_H_ | |
| 7 | |
| 8 #include "extensions/common/features/base_feature_provider.h" | |
| 9 | |
| 10 namespace base { | |
| 11 class DictionaryValue; | |
| 12 } | |
| 13 | |
| 14 namespace extensions { | |
| 15 class SimpleFeature; | |
| 16 | |
| 17 // Reads Features out of a simple JSON file description. | |
| 18 class JSONFeatureProvider : public BaseFeatureProvider { | |
| 19 public: | |
| 20 typedef SimpleFeature* (*FeatureFactory)(); | |
| 21 | |
| 22 // Creates a new JSONFeatureProvider. Pass null to |factory| to have the | |
| 23 // provider create plain old Feature instances. | |
| 24 JSONFeatureProvider(const base::DictionaryValue& root, | |
| 25 FeatureFactory factory); | |
| 26 ~JSONFeatureProvider() override; | |
| 27 | |
| 28 private: | |
| 29 FeatureFactory factory_; | |
| 30 | |
| 31 DISALLOW_COPY_AND_ASSIGN(JSONFeatureProvider); | |
| 32 }; | |
| 33 | |
| 34 } // namespace extensions | |
| 35 | |
| 36 #endif // EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_H_ | |
| OLD | NEW |