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

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

Issue 9386001: Implement a module system for the extension bindings JS. (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
Index: chrome/renderer/resources/extensions/webstore.js
diff --git a/chrome/renderer/resources/extensions/webstore.js b/chrome/renderer/resources/extensions/webstore.js
index b387c46f26d9297d903f90384f110ac6f40d2f00..14bacc531eb5aeb580c50ed9bda1275fdfcb5cac 100644
--- a/chrome/renderer/resources/extensions/webstore.js
+++ b/chrome/renderer/resources/extensions/webstore.js
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var chrome = chrome || {};
-(function() {
- native function GetChromeHidden();
- native function Install(preferredStoreUrl, onSuccess, onFailure);
+ var webstoreNatives = requireNative('webstore');
+ var Install = webstoreNatives.Install;
- var chromeHidden = GetChromeHidden();
+ var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
var pendingInstalls = {};
chrome.webstore = new function() {
this.install = function(
@@ -41,4 +39,3 @@ var chrome = chrome || {};
delete pendingInstall[installId];
}
}
-})();
« no previous file with comments | « chrome/renderer/resources/extensions/web_request_custom_bindings.js ('k') | chrome/renderer/resources/require.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698