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

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

Issue 2217783002: DevTools: use view locations in the elements and sources sidebars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 4 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 */ 507 */
508 function eventListeners(fulfill, reject) 508 function eventListeners(fulfill, reject)
509 { 509 {
510 if (!this.target().hasDOMCapability()) { 510 if (!this.target().hasDOMCapability()) {
511 // TODO(kozyatinskiy): figure out how this should work for |wind ow| when there is no DOMDebugger. 511 // TODO(kozyatinskiy): figure out how this should work for |wind ow| when there is no DOMDebugger.
512 fulfill([]); 512 fulfill([]);
513 return; 513 return;
514 } 514 }
515 515
516 if (!this._objectId) { 516 if (!this._objectId) {
517 reject(null); 517 reject(new Error("No object id specified"));
518 return; 518 return;
519 } 519 }
520 520
521 this.target().domdebuggerAgent().getEventListeners(this._objectId, m ycallback.bind(this)); 521 this.target().domdebuggerAgent().getEventListeners(this._objectId, m ycallback.bind(this));
522 522
523 /** 523 /**
524 * @this {WebInspector.RemoteObjectImpl} 524 * @this {WebInspector.RemoteObjectImpl}
525 * @param {?Protocol.Error} error 525 * @param {?Protocol.Error} error
526 * @param {!Array<!DOMDebuggerAgent.EventListener>} payloads 526 * @param {!Array<!DOMDebuggerAgent.EventListener>} payloads
527 */ 527 */
528 function mycallback(error, payloads) 528 function mycallback(error, payloads)
529 { 529 {
530 if (error) { 530 if (error) {
531 reject(null); 531 reject(new Error(error));
532 return; 532 return;
533 } 533 }
534 fulfill(payloads.map(createEventListener.bind(this))); 534 fulfill(payloads.map(createEventListener.bind(this)));
535 } 535 }
536 536
537 /** 537 /**
538 * @this {WebInspector.RemoteObjectImpl} 538 * @this {WebInspector.RemoteObjectImpl}
539 * @param {!DOMDebuggerAgent.EventListener} payload 539 * @param {!DOMDebuggerAgent.EventListener} payload
540 */ 540 */
541 function createEventListener(payload) 541 function createEventListener(payload)
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 }, 1510 },
1511 1511
1512 /** 1512 /**
1513 * @return {!WebInspector.RemoteObject} 1513 * @return {!WebInspector.RemoteObject}
1514 */ 1514 */
1515 object: function() 1515 object: function()
1516 { 1516 {
1517 return this._object; 1517 return this._object;
1518 } 1518 }
1519 } 1519 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698