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

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: Rebase 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 eventListeners: function() 500 eventListeners: function()
501 { 501 {
502 return new Promise(eventListeners.bind(this)); 502 return new Promise(eventListeners.bind(this));
503 /** 503 /**
504 * @param {function(?)} fulfill 504 * @param {function(?)} fulfill
505 * @param {function(*)} reject 505 * @param {function(*)} reject
506 * @this {WebInspector.RemoteObject} 506 * @this {WebInspector.RemoteObject}
507 */ 507 */
508 function eventListeners(fulfill, reject) 508 function eventListeners(fulfill, reject)
509 { 509 {
510 if (!this.target().isPage()) { 510 if (!this.target().hasBrowserCapability()) {
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(null);
518 return; 518 return;
519 } 519 }
520 520
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 }, 1509 },
1510 1510
1511 /** 1511 /**
1512 * @return {!WebInspector.RemoteObject} 1512 * @return {!WebInspector.RemoteObject}
1513 */ 1513 */
1514 object: function() 1514 object: function()
1515 { 1515 {
1516 return this._object; 1516 return this._object;
1517 } 1517 }
1518 } 1518 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698