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

Side by Side Diff: Source/devtools/front_end/sdk/RemoteObject.js

Issue 1268353005: [DevTools] Support JQuery event listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added UI Created 5 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 /** 88 /**
89 * @param {boolean} accessorPropertiesOnly 89 * @param {boolean} accessorPropertiesOnly
90 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We bInspector.RemoteObjectProperty>)} callback 90 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We bInspector.RemoteObjectProperty>)} callback
91 */ 91 */
92 getAllProperties: function(accessorPropertiesOnly, callback) 92 getAllProperties: function(accessorPropertiesOnly, callback)
93 { 93 {
94 throw "Not implemented"; 94 throw "Not implemented";
95 }, 95 },
96 96
97 /** 97 /**
98 * @param {boolean} resolveFrameworkHandlers
98 * @return {!Promise<?Array<!WebInspector.EventListener>>} 99 * @return {!Promise<?Array<!WebInspector.EventListener>>}
99 */ 100 */
100 eventListeners: function() 101 eventListeners: function(resolveFrameworkHandlers)
101 { 102 {
102 throw "Not implemented"; 103 throw "Not implemented";
103 }, 104 },
104 105
105 /** 106 /**
106 * @param {!RuntimeAgent.CallArgument} name 107 * @param {!RuntimeAgent.CallArgument} name
107 * @param {function(string=)} callback 108 * @param {function(string=)} callback
108 */ 109 */
109 deleteProperty: function(name, callback) 110 deleteProperty: function(name, callback)
110 { 111 {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 * @param {boolean} accessorPropertiesOnly 385 * @param {boolean} accessorPropertiesOnly
385 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We bInspector.RemoteObjectProperty>)} callback 386 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We bInspector.RemoteObjectProperty>)} callback
386 */ 387 */
387 getAllProperties: function(accessorPropertiesOnly, callback) 388 getAllProperties: function(accessorPropertiesOnly, callback)
388 { 389 {
389 this.doGetProperties(false, accessorPropertiesOnly, false, callback); 390 this.doGetProperties(false, accessorPropertiesOnly, false, callback);
390 }, 391 },
391 392
392 /** 393 /**
393 * @override 394 * @override
395 * @param {boolean} resolveFrameworkHandlers
394 * @return {!Promise<?Array<!WebInspector.EventListener>>} 396 * @return {!Promise<?Array<!WebInspector.EventListener>>}
395 */ 397 */
396 eventListeners: function() 398 eventListeners: function(resolveFrameworkHandlers)
397 { 399 {
398 return new Promise(eventListeners.bind(this)); 400 return new Promise(eventListeners.bind(this));
399 /** 401 /**
400 * @param {function(?)} fulfill 402 * @param {function(?)} fulfill
401 * @param {function(*)} reject 403 * @param {function(*)} reject
402 * @this {WebInspector.RemoteObject} 404 * @this {WebInspector.RemoteObject}
403 */ 405 */
404 function eventListeners(fulfill, reject) 406 function eventListeners(fulfill, reject)
405 { 407 {
406 if (!this._objectId) { 408 if (!this._objectId) {
407 reject(null); 409 reject(null);
408 return; 410 return;
409 } 411 }
410 this.target().domdebuggerAgent().getEventListeners(this._objectId, m ycallback.bind(this)); 412 this.target().domdebuggerAgent().getEventListeners(this._objectId, r esolveFrameworkHandlers, mycallback.bind(this));
411 /** 413 /**
412 * @this {!WebInspector.RemoteObject} 414 * @this {!WebInspector.RemoteObject}
413 * @param {?Protocol.Error} error 415 * @param {?Protocol.Error} error
414 * @param {!Array<!DOMDebuggerAgent.EventListener>} payloads 416 * @param {!Array<!DOMDebuggerAgent.EventListener>} payloads
415 */ 417 */
416 function mycallback(error, payloads) 418 function mycallback(error, payloads)
417 { 419 {
418 if (error) { 420 if (error) {
419 reject(null); 421 reject(null);
420 return; 422 return;
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 { 1225 {
1224 if (!this._cachedDescription) { 1226 if (!this._cachedDescription) {
1225 var children = this._children(); 1227 var children = this._children();
1226 this._cachedDescription = "{" + this._formatValue(children[0].value) + " => " + this._formatValue(children[1].value) + "}"; 1228 this._cachedDescription = "{" + this._formatValue(children[0].value) + " => " + this._formatValue(children[1].value) + "}";
1227 } 1229 }
1228 return this._cachedDescription; 1230 return this._cachedDescription;
1229 }, 1231 },
1230 1232
1231 __proto__: WebInspector.LocalJSONObject.prototype 1233 __proto__: WebInspector.LocalJSONObject.prototype
1232 } 1234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698