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

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: re-jigged to use ModuleSystem Created 8 years, 10 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 8fbce65bcddb8ad35ee79d8ee06ed6c23cee34f2..6abb289084de07e79f5d9c3c5169493dc1395116 100644
--- a/chrome/renderer/resources/extensions/app.js
+++ b/chrome/renderer/resources/extensions/app.js
@@ -2,16 +2,15 @@
// 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;

Powered by Google App Engine
This is Rietveld 408576698