Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Side by Side Diff: chrome/common/extensions/features/feature_provider.h

Issue 15091002: Lazily load API schemas from resource files and convert all APIs to features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos tests Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 the parent feature of |feature|, or NULL if there isn't one.
24 virtual Feature* GetParent(Feature* feature) = 0;
25
23 // Returns all features described by this instance. 26 // Returns all features described by this instance.
24 virtual std::set<std::string> GetAllFeatureNames() = 0; 27 virtual const std::vector<std::string>& GetAllFeatureNames() = 0;
25 }; 28 };
26 29
27 } // namespace extensions 30 } // namespace extensions
28 31
29 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_ 32 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/features/feature.cc ('k') | chrome/common/extensions/features/simple_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698