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

Side by Side Diff: chrome/renderer/resources/event_bindings.js

Issue 6480033: Implement experimental.contentSettings.misc.blockThirdPartyCookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix stuff Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 chrome = chrome || {}; 5 var chrome = chrome || {};
6 (function () { 6 (function () {
7 native function GetChromeHidden(); 7 native function GetChromeHidden();
8 native function AttachEvent(eventName); 8 native function AttachEvent(eventName);
9 native function DetachEvent(eventName); 9 native function DetachEvent(eventName);
10 10
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (this.validate_) { 158 if (this.validate_) {
159 var validationErrors = this.validate_(args); 159 var validationErrors = this.validate_(args);
160 if (validationErrors) { 160 if (validationErrors) {
161 return validationErrors; 161 return validationErrors;
162 } 162 }
163 } 163 }
164 for (var i = 0; i < this.listeners_.length; i++) { 164 for (var i = 0; i < this.listeners_.length; i++) {
165 try { 165 try {
166 this.listeners_[i].apply(null, args); 166 this.listeners_[i].apply(null, args);
167 } catch (e) { 167 } catch (e) {
168 console.log(e.stack);
168 console.error(e); 169 console.error(e);
169 } 170 }
170 } 171 }
171 }; 172 };
172 173
173 // Attaches this event object to its name. Only one object can have a given 174 // Attaches this event object to its name. Only one object can have a given
174 // name. 175 // name.
175 chrome.Event.prototype.attach_ = function() { 176 chrome.Event.prototype.attach_ = function() {
176 AttachEvent(this.eventName_); 177 AttachEvent(this.eventName_);
177 allAttachedEvents[allAttachedEvents.length] = this; 178 allAttachedEvents[allAttachedEvents.length] = this;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 var event = allAttachedEvents[i]; 220 var event = allAttachedEvents[i];
220 if (event) 221 if (event)
221 event.detach_(); 222 event.detach_();
222 } 223 }
223 } 224 }
224 225
225 chromeHidden.dispatchError = function(msg) { 226 chromeHidden.dispatchError = function(msg) {
226 console.error(msg); 227 console.error(msg);
227 } 228 }
228 })(); 229 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698