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

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: 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/event.js
diff --git a/chrome/renderer/resources/extensions/event.js b/chrome/renderer/resources/extensions/event.js
index 2cf78a8665a015092f4d457aef5d9c3ce067404c..0546a1fa3fe7e41b6220d883da9f05bb901e3563 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 natives = requireNative('event_bindings');
Aaron Boodman 2012/02/28 02:42:59 eventBindingsNatives?
koz (OOO until 15th September) 2012/03/01 03:41:56 Done, here and elsewhere.
+ var AttachEvent = natives.AttachEvent;
+ var DetachEvent = natives.DetachEvent;
+ var Print = natives.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