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

Unified Diff: chrome/common/extensions/api/extension_api.h

Issue 12846011: Implement API features for the Extension API feature system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed memory leak Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/bookmarks.json ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api.h
diff --git a/chrome/common/extensions/api/extension_api.h b/chrome/common/extensions/api/extension_api.h
index 924ee8cb52abd76914f8ef9d7fccbeb4463f0b3c..2e1f7ef84a29d79c67d927b16285254ad72ef628 100644
--- a/chrome/common/extensions/api/extension_api.h
+++ b/chrome/common/extensions/api/extension_api.h
@@ -37,7 +37,7 @@ class Feature;
// WARNING: This class is accessed on multiple threads in the browser process
// (see ExtensionFunctionDispatcher). No state should be modified after
// construction.
-class ExtensionAPI : public FeatureProvider {
+class ExtensionAPI {
public:
// Returns a single shared instance of this class. This is the typical use
// case in Chrome.
@@ -88,11 +88,6 @@ class ExtensionAPI : public FeatureProvider {
std::set<std::string> GetAllAPINames();
- // Gets a Feature object describing the API with the specified |full_name|.
- // This can be either an API namespace (like history, or
- // experimental.bookmarks), or it can be an individual function or event.
- virtual Feature* GetFeature(const std::string& full_name) OVERRIDE;
-
// Splits a full name from the extension API into its API and child name
// parts. Some examples:
//
@@ -107,6 +102,10 @@ class ExtensionAPI : public FeatureProvider {
void InitDefaultConfiguration();
+ // Gets a feature from any dependency provider registered with ExtensionAPI.
+ // Returns NULL if the feature could not be found.
+ Feature* GetFeatureDependency(const std::string& dependency_name);
+
private:
friend struct DefaultSingletonTraits<ExtensionAPI>;
@@ -134,24 +133,6 @@ class ExtensionAPI : public FeatureProvider {
const Extension* extension,
const GURL& url);
- // Returns true if the API uses the feature system.
- bool UsesFeatureSystem(const std::string& full_name);
-
- // Gets a feature from any dependency provider.
- Feature* GetFeatureDependency(const std::string& dependency_name);
-
- // Adds dependent schemas to |out| as determined by the "dependencies"
- // property.
- // TODO(aa): Consider making public and adding tests.
- void ResolveDependencies(std::set<std::string>* out);
-
- // Adds any APIs listed in "dependencies" found in the schema for |api_name|
- // but not in |excluding| to |out|.
- void GetMissingDependencies(
- const std::string& api_name,
- const std::set<std::string>& excluding,
- std::set<std::string>* out);
-
// Checks if an API is *entirely* privileged. This won't include APIs such as
// "storage" which is entirely unprivileged, nor "extension" which has
// unprivileged components.
« no previous file with comments | « chrome/common/extensions/api/bookmarks.json ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698