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

Unified Diff: extensions/common/extension_api.h

Issue 2266673002: [Extensions] Remove mechanism for non-generated schemas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lazyboys Created 4 years, 4 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/chrome_extensions_client.cc ('k') | extensions/common/extension_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_api.h
diff --git a/extensions/common/extension_api.h b/extensions/common/extension_api.h
index e876079b37858897adf6611bcfe679e5744fed8a..73fdc7f0fd5cbaf4c244612ee7b8320060e69d21 100644
--- a/extensions/common/extension_api.h
+++ b/extensions/common/extension_api.h
@@ -28,6 +28,7 @@ class GURL;
namespace extensions {
class Extension;
+class ExtensionsClient;
class Feature;
// C++ Wrapper for the JSON API definitions in chrome/common/extensions/api/.
@@ -65,14 +66,11 @@ class ExtensionAPI {
ExtensionAPI* original_api_;
};
- // Creates a completely clean instance. Configure using RegisterSchema() and
+ // Creates a completely clean instance. Configure using
// RegisterDependencyProvider before use.
ExtensionAPI();
virtual ~ExtensionAPI();
- // Add a (non-generated) API schema resource.
- void RegisterSchemaResource(const std::string& api_name, int resource_id);
-
// Add a FeatureProvider for APIs. The features are used to specify
// dependencies and constraints on the availability of APIs.
void RegisterDependencyProvider(const std::string& name,
@@ -133,16 +131,15 @@ class ExtensionAPI {
void InitDefaultConfiguration();
+ // Returns true if there exists an API with |name|. Declared virtual for
+ // testing purposes.
+ virtual bool IsKnownAPI(const std::string& name, ExtensionsClient* client);
+
bool default_configuration_initialized_;
// Loads a schema.
void LoadSchema(const std::string& name, const base::StringPiece& schema);
- // Map from each API that hasn't been loaded yet to the schema which defines
- // it. Note that there may be multiple APIs per schema.
- typedef std::map<std::string, int> UnloadedSchemaMap;
- UnloadedSchemaMap unloaded_schemas_;
-
// Schemas for each namespace.
using SchemaMap =
std::map<std::string, std::unique_ptr<const base::DictionaryValue>>;
« no previous file with comments | « chrome/common/extensions/chrome_extensions_client.cc ('k') | extensions/common/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698