| Index: extensions/common/features/json_feature_provider.h
|
| diff --git a/extensions/common/features/json_feature_provider.h b/extensions/common/features/json_feature_provider.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..37a571ad6c56398bd178cfebadb2b41409b8f817
|
| --- /dev/null
|
| +++ b/extensions/common/features/json_feature_provider.h
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2014 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 EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_H_
|
| +#define EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_H_
|
| +
|
| +#include "extensions/common/features/base_feature_provider.h"
|
| +
|
| +namespace base {
|
| +class DictionaryValue;
|
| +}
|
| +
|
| +namespace extensions {
|
| +class SimpleFeature;
|
| +
|
| +// Reads Features out of a simple JSON file description.
|
| +class JSONFeatureProvider : public BaseFeatureProvider {
|
| + public:
|
| + typedef SimpleFeature* (*FeatureFactory)();
|
| +
|
| + // Creates a new JSONFeatureProvider. Pass null to |factory| to have the
|
| + // provider create plain old Feature instances.
|
| + JSONFeatureProvider(const base::DictionaryValue& root,
|
| + FeatureFactory factory);
|
| + ~JSONFeatureProvider() override;
|
| +
|
| + private:
|
| + FeatureFactory factory_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(JSONFeatureProvider);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_H_
|
|
|