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

Unified Diff: chrome/renderer/resources/extensions/webstore_custom_bindings.js

Issue 9835039: Make app_custom_bindings.js lazily evaluated so it doesn't execute on every page load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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/renderer/resources/extensions/app_custom_bindings.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/webstore_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/webstore_custom_bindings.js b/chrome/renderer/resources/extensions/webstore_custom_bindings.js
index 695b2a2d2743a8a0f3ff9f0041240e8528d43ea6..9b8791d227dc5584be60ead6bf956230790d061c 100644
--- a/chrome/renderer/resources/extensions/webstore_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/webstore_custom_bindings.js
@@ -4,7 +4,6 @@
// Custom bindings for the webstore API.
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
var webstoreNatives = requireNative('webstore');
function Installer() {
@@ -42,15 +41,20 @@ Installer.prototype.onInstallResponse = function(installId, success, error) {
var installer = new Installer();
-chrome.webstore = {
+var chromeWebstore = {
install: function install(url, onSuccess, onFailure) {
installer.install(url, onSuccess, onFailure);
}
};
// Called by webstore_bindings.cc.
-chromeHidden.webstore = {
+var chromeHiddenWebstore = {
onInstallResponse: function(installId, success, error) {
installer.onInstallResponse(installId, success, error);
}
};
+
+// These must match the names in InstallWebstoreBindings in
+// extension_dispatcher.cc.
+exports.chromeWebstore = chromeWebstore;
+exports.chromeHiddenWebstore = chromeHiddenWebstore;
« no previous file with comments | « chrome/renderer/resources/extensions/app_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698