OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/common/extensions/feature.h" |
| 10 |
| 11 #include <map> |
| 12 #include <set> |
| 13 #include "base/memory/linked_ptr.h" |
| 14 |
| 15 namespace extensions { |
| 16 |
| 17 class ExtensionAPIFeature : public Feature { |
| 18 public: |
| 19 ExtensionAPIFeature(); |
| 20 virtual ~ExtensionAPIFeature(); |
| 21 |
| 22 std::set<std::string>* dependencies(); |
| 23 |
| 24 virtual void Parse(const DictionaryValue* value) OVERRIDE; |
| 25 |
| 26 // TODO(aa): Have this return linked_ptr so that we can generate features |
| 27 // on demand for child feature that lack their own spec. |
| 28 Feature* GetChild(const std::string& name) const; |
| 29 |
| 30 private: |
| 31 std::set<std::string> dependencies_; |
| 32 |
| 33 typedef std::map<std::string, |
| 34 linked_ptr<ExtensionAPIFeature> > ChildFeatureMap; |
| 35 ChildFeatureMap child_features_; |
| 36 }; |
| 37 |
| 38 } // namespace extensions |
| 39 |
| 40 #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_API_FEATURE_H_ |
OLD | NEW |