| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_ | 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace extensions { | 10 namespace extensions { |
| 11 | 11 |
| 12 class Feature; | 12 class Feature; |
| 13 | 13 |
| 14 // Implemented by classes that can vend features. | 14 // Implemented by classes that can vend features. |
| 15 class FeatureProvider { | 15 class FeatureProvider { |
| 16 public: | 16 public: |
| 17 FeatureProvider() {} | 17 FeatureProvider() {} |
| 18 virtual ~FeatureProvider() {} | 18 virtual ~FeatureProvider() {} |
| 19 | 19 |
| 20 // Returns the feature with the specified name. | 20 // Returns the feature with the specified name. |
| 21 virtual Feature* GetFeature(const std::string& name) = 0; | 21 virtual Feature* GetFeature(const std::string& name) = 0; |
| 22 | 22 |
| 23 // Returns all features described by this instance. | 23 // Returns all features described by this instance. |
| 24 virtual std::set<std::string> GetAllFeatureNames() = 0; | 24 virtual const std::vector<std::string>& GetAllFeatureNames() = 0; |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 } // namespace extensions | 27 } // namespace extensions |
| 28 | 28 |
| 29 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_ | 29 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_ |
| OLD | NEW |