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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

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: convert all APIs to features 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index eb8796329d70e0b96f0c59e7e2e29d0d0dfd6dcf..445610478770d58b9bb8f801ca643381d55158a6 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -718,10 +718,17 @@ void Dispatcher::RegisterSchemaGeneratedBindings(
ModuleSystem* module_system,
ChromeV8Context* context) {
std::set<std::string> apis =
- ExtensionAPI::GetSharedInstance()->GetAllAPINames();
+ BaseFeatureProvider::GetByName("api")->GetAllFeatureNames();
for (std::set<std::string>::iterator it = apis.begin();
it != apis.end(); ++it) {
const std::string& api_name = *it;
+
+ std::string child_name;
+ ExtensionAPI::GetSharedInstance()->GetAPINameFromFullName(api_name,
+ &child_name);
+ if (!child_name.empty())
+ continue;
+
if (!context->IsAnyFeatureAvailableToContext(api_name))
continue;

Powered by Google App Engine
This is Rietveld 408576698