| Index: chrome/common/extensions/api/extension_api_feature.h
|
| diff --git a/chrome/common/extensions/api/extension_api_feature.h b/chrome/common/extensions/api/extension_api_feature.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e0343cfa3385c5d09133eb352722e119c745d61e
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/api/extension_api_feature.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright (c) 2012 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 CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_
|
| +#define CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_
|
| +#pragma once
|
| +
|
| +#include "chrome/common/extensions/feature.h"
|
| +
|
| +#include <map>
|
| +#include <set>
|
| +#include "base/memory/linked_ptr.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +class ExtensionAPIFeature : public Feature {
|
| + public:
|
| + ExtensionAPIFeature();
|
| + virtual ~ExtensionAPIFeature();
|
| +
|
| + std::set<std::string>* dependencies();
|
| +
|
| + virtual void Parse(const DictionaryValue* value) OVERRIDE;
|
| +
|
| + // TODO(aa): Have this return linked_ptr so that we can generate features
|
| + // on demand for child feature that lack their own spec.
|
| + Feature* GetChild(const std::string& name) const;
|
| +
|
| + private:
|
| + std::set<std::string> dependencies_;
|
| +
|
| + typedef std::map<std::string,
|
| + linked_ptr<ExtensionAPIFeature> > ChildFeatureMap;
|
| + ChildFeatureMap child_features_;
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_
|
|
|