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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android compilation 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/chrome_renderer.gypi ('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 b74bdccdb90b0057d2d3354a001b716029ce0ef7..128129e98c1b3a2933203369adfacd722c14955b 100644
--- a/chrome/common/extensions/api/extension_api.h
+++ b/chrome/common/extensions/api/extension_api.h
@@ -88,9 +88,11 @@ class ExtensionAPI : public FeatureProvider {
// Gets the APIs available to |context| given an |extension| and |url|. The
// extension or URL may not be relevant to all contexts, and may be left
// NULL/empty.
- scoped_ptr<std::set<std::string> > GetAPIsForContext(
+ std::set<std::string> GetAPIsForContext(
Feature::Context context, const Extension* extension, const GURL& url);
+ 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.
@@ -158,7 +160,8 @@ class ExtensionAPI : public FeatureProvider {
// 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.
- std::map<std::string, base::StringPiece> unloaded_schemas_;
+ typedef std::map<std::string, base::StringPiece> UnloadedSchemaMap;
+ UnloadedSchemaMap unloaded_schemas_;
// Schemas for each namespace.
typedef std::map<std::string, linked_ptr<const DictionaryValue> > SchemaMap;
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/common/extensions/api/extension_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698