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

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

Issue 9386001: Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile errors 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/event.js
diff --git a/chrome/renderer/resources/extensions/event.js b/chrome/renderer/resources/extensions/event.js
index 2cf78a8665a015092f4d457aef5d9c3ce067404c..a8f7d33536980fee6fa8ad8ac8e6d359d26b121d 100644
--- a/chrome/renderer/resources/extensions/event.js
+++ b/chrome/renderer/resources/extensions/event.js
@@ -2,14 +2,13 @@
// 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 AttachEvent(eventName);
- native function DetachEvent(eventName, manual);
- native function Print();
+ var eventBindingsNatives = requireNative('event_bindings');
+ var AttachEvent = eventBindingsNatives.AttachEvent;
+ var DetachEvent = eventBindingsNatives.DetachEvent;
+ var Print = eventBindingsNatives.Print;
- var chromeHidden = GetChromeHidden();
+ var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
// Local implementation of JSON.parse & JSON.stringify that protect us
// from being clobbered by an extension.

Powered by Google App Engine
This is Rietveld 408576698