Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 3263007: Reland r57788 - Expose Extension Bindings to Component Applications (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: don't hide gallery url in omnibar Created 10 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/browser/extensions/extensions_service.h ('k') | chrome/browser/notifications/balloon_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 5ea1edef51dd2e20dea7d6ae2511f4b0dd7746b1..362ef2240c5350c61d4756971cda1b7c6ff313f1 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -1257,6 +1257,16 @@ Extension* ExtensionsService::GetExtensionByWebExtent(const GURL& url) {
return NULL;
}
+bool ExtensionsService::ExtensionBindingsAllowed(const GURL& url) {
+ // Allow bindings for all packaged extension.
+ if (GetExtensionByURL(url))
+ return true;
+
+ // Allow bindings for all component, hosted apps.
+ Extension* extension = GetExtensionByWebExtent(url);
+ return (extension && extension->location() == Extension::COMPONENT);
+}
+
Extension* ExtensionsService::GetExtensionByOverlappingWebExtent(
const ExtensionExtent& extent) {
for (size_t i = 0; i < extensions_.size(); ++i) {
« no previous file with comments | « chrome/browser/extensions/extensions_service.h ('k') | chrome/browser/notifications/balloon_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698