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

Side by Side Diff: chrome/renderer/resources/extensions/event.js

Issue 9657026: Revert 125801 - Implement a module system for the extension bindings JS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Deleted: svn:mime-type
- text/javascript
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var eventBindingsNatives = requireNative('event_bindings'); 5 var chrome = chrome || {};
6 var AttachEvent = eventBindingsNatives.AttachEvent; 6 (function () {
7 var DetachEvent = eventBindingsNatives.DetachEvent; 7 native function GetChromeHidden();
8 var Print = eventBindingsNatives.Print; 8 native function AttachEvent(eventName);
9 native function DetachEvent(eventName, manual);
10 native function Print();
9 11
10 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 12 var chromeHidden = GetChromeHidden();
11 13
12 // Local implementation of JSON.parse & JSON.stringify that protect us 14 // Local implementation of JSON.parse & JSON.stringify that protect us
13 // from being clobbered by an extension. 15 // from being clobbered by an extension.
14 // 16 //
15 // TODO(aa): This makes me so sad. We shouldn't need it, as we can just pass 17 // TODO(aa): This makes me so sad. We shouldn't need it, as we can just pass
16 // Values directly over IPC without serializing to strings and use 18 // Values directly over IPC without serializing to strings and use
17 // JSONValueConverter. 19 // JSONValueConverter.
18 chromeHidden.JSON = new (function() { 20 chromeHidden.JSON = new (function() {
19 var $Object = Object; 21 var $Object = Object;
20 var $Array = Array; 22 var $Array = Array;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 for (var i = 0; i < allAttachedEvents.length; ++i) { 304 for (var i = 0; i < allAttachedEvents.length; ++i) {
303 var event = allAttachedEvents[i]; 305 var event = allAttachedEvents[i];
304 if (event) 306 if (event)
305 event.detach_(false); 307 event.detach_(false);
306 } 308 }
307 }; 309 };
308 310
309 chromeHidden.dispatchError = function(msg) { 311 chromeHidden.dispatchError = function(msg) {
310 console.error(msg); 312 console.error(msg);
311 }; 313 };
314 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698