| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @constructor | 8 * @constructor |
| 9 * @extends {Protocol.Agents} | 9 * @extends {Protocol.Agents} |
| 10 * @param {string} name | 10 * @param {string} name |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 { | 560 { |
| 561 var result = []; | 561 var result = []; |
| 562 for (var target of this._targets) { | 562 for (var target of this._targets) { |
| 563 if (target.hasJSContext()) | 563 if (target.hasJSContext()) |
| 564 result.push(target); | 564 result.push(target); |
| 565 } | 565 } |
| 566 return result; | 566 return result; |
| 567 }, | 567 }, |
| 568 | 568 |
| 569 /** | 569 /** |
| 570 * |
| 571 * @param {number} id |
| 572 * @return {?WebInspector.Target} |
| 573 */ |
| 574 targetById: function(id) |
| 575 { |
| 576 for (var i = 0; i < this._targets.length; ++i) { |
| 577 if (this._targets[i].id() === id) |
| 578 return this._targets[i]; |
| 579 } |
| 580 return null; |
| 581 }, |
| 582 |
| 583 /** |
| 570 * @return {?WebInspector.Target} | 584 * @return {?WebInspector.Target} |
| 571 */ | 585 */ |
| 572 mainTarget: function() | 586 mainTarget: function() |
| 573 { | 587 { |
| 574 return this._targets[0] || null; | 588 return this._targets[0] || null; |
| 575 }, | 589 }, |
| 576 | 590 |
| 577 __proto__: WebInspector.Object.prototype | 591 __proto__: WebInspector.Object.prototype |
| 578 } | 592 } |
| 579 | 593 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 593 /** | 607 /** |
| 594 * @param {!WebInspector.Target} target | 608 * @param {!WebInspector.Target} target |
| 595 */ | 609 */ |
| 596 targetRemoved: function(target) { }, | 610 targetRemoved: function(target) { }, |
| 597 } | 611 } |
| 598 | 612 |
| 599 /** | 613 /** |
| 600 * @type {!WebInspector.TargetManager} | 614 * @type {!WebInspector.TargetManager} |
| 601 */ | 615 */ |
| 602 WebInspector.targetManager = new WebInspector.TargetManager(); | 616 WebInspector.targetManager = new WebInspector.TargetManager(); |
| OLD | NEW |