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

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

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing the code review comments Created 4 years, 5 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 eventListeners: function() 525 eventListeners: function()
526 { 526 {
527 return new Promise(eventListeners.bind(this)); 527 return new Promise(eventListeners.bind(this));
528 /** 528 /**
529 * @param {function(?)} fulfill 529 * @param {function(?)} fulfill
530 * @param {function(*)} reject 530 * @param {function(*)} reject
531 * @this {WebInspector.RemoteObject} 531 * @this {WebInspector.RemoteObject}
532 */ 532 */
533 function eventListeners(fulfill, reject) 533 function eventListeners(fulfill, reject)
534 { 534 {
535 if (!this.target().isPage()) { 535 if (!this.target().hasBrowserCapability()) {
536 // TODO(kozyatinskiy): figure out how this should work for |wind ow| when there is no DOMDebugger. 536 // TODO(kozyatinskiy): figure out how this should work for |wind ow| when there is no DOMDebugger.
537 fulfill([]); 537 fulfill([]);
538 return; 538 return;
539 } 539 }
540 540
541 if (!this._objectId) { 541 if (!this._objectId) {
542 reject(null); 542 reject(null);
543 return; 543 return;
544 } 544 }
545 545
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 }, 1543 },
1544 1544
1545 /** 1545 /**
1546 * @return {!WebInspector.RemoteObject} 1546 * @return {!WebInspector.RemoteObject}
1547 */ 1547 */
1548 object: function() 1548 object: function()
1549 { 1549 {
1550 return this._object; 1550 return this._object;
1551 } 1551 }
1552 } 1552 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698