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

Unified Diff: chrome/renderer/resources/extensions/app.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/app.js
diff --git a/chrome/renderer/resources/extensions/app.js b/chrome/renderer/resources/extensions/app.js
index 698e980911d6c8063e7640801904692045974e5c..7337d860bb985b33db39f059cc754e0e669c9fc9 100644
--- a/chrome/renderer/resources/extensions/app.js
+++ b/chrome/renderer/resources/extensions/app.js
@@ -2,16 +2,14 @@
// 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 GetIsInstalled();
- native function Install();
- native function GetDetails();
- native function GetDetailsForFrame();
- native function GetAppNotifyChannel();
+ var natives = requireNative('app');
+ var GetIsInstalled = natives.GetIsInstalled;
+ var Install = natives.Install;
+ var GetDetails = natives.GetDetails;
+ var GetDetailsForFrame = natives.GetDetailsForFrame;
+ var GetAppNotifyChannel = natives.GetAppNotifyChannel;
- var chromeHidden = GetChromeHidden();
+ var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
var callbacks = {};
var nextCallbackId = 1;
@@ -41,4 +39,3 @@ var chrome = chrome || {};
delete callbacks[callbackId];
}
};
-})();

Powered by Google App Engine
This is Rietveld 408576698