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

Side by Side Diff: chrome/common/extensions/features/feature.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: optimize and "parent" property Created 7 years, 7 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_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_
6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_ 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 static Platform GetCurrentPlatform(); 131 static Platform GetCurrentPlatform();
132 132
133 // Gets the Feature::Location value for the specified Manifest::Location. 133 // Gets the Feature::Location value for the specified Manifest::Location.
134 static Location ConvertLocation(Manifest::Location extension_location); 134 static Location ConvertLocation(Manifest::Location extension_location);
135 135
136 virtual std::set<Context>* GetContexts() = 0; 136 virtual std::set<Context>* GetContexts() = 0;
137 137
138 // Tests whether this is an internal API or not. 138 // Tests whether this is an internal API or not.
139 virtual bool IsInternal() const = 0; 139 virtual bool IsInternal() const = 0;
140 140
141 // Tests whether this Feature has a parent Feature.
142 virtual bool HasParent() const = 0;
143
141 // Returns true if the feature is available to be parsed into a new extension 144 // Returns true if the feature is available to be parsed into a new extension
142 // manifest. 145 // manifest.
143 Availability IsAvailableToManifest(const std::string& extension_id, 146 Availability IsAvailableToManifest(const std::string& extension_id,
144 Manifest::Type type, 147 Manifest::Type type,
145 Location location, 148 Location location,
146 int manifest_version) const { 149 int manifest_version) const {
147 return IsAvailableToManifest(extension_id, type, location, manifest_version, 150 return IsAvailableToManifest(extension_id, type, location, manifest_version,
148 GetCurrentPlatform()); 151 GetCurrentPlatform());
149 } 152 }
150 virtual Availability IsAvailableToManifest(const std::string& extension_id, 153 virtual Availability IsAvailableToManifest(const std::string& extension_id,
(...skipping 21 matching lines...) Expand all
172 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; 175 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0;
173 176
174 protected: 177 protected:
175 std::string name_; 178 std::string name_;
176 std::set<std::string> dependencies_; 179 std::set<std::string> dependencies_;
177 }; 180 };
178 181
179 } // namespace extensions 182 } // namespace extensions
180 183
181 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_ 184 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_FEATURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698