| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 return !!this._capabilities[capability]; | 94 return !!this._capabilities[capability]; |
| 95 }, | 95 }, |
| 96 | 96 |
| 97 /** | 97 /** |
| 98 * @param {function(!WebInspector.Target)=} callback | 98 * @param {function(!WebInspector.Target)=} callback |
| 99 */ | 99 */ |
| 100 _loadedWithCapabilities: function(callback) | 100 _loadedWithCapabilities: function(callback) |
| 101 { | 101 { |
| 102 /** @type {!WebInspector.ConsoleModel} */ | 102 /** @type {!WebInspector.ConsoleModel} */ |
| 103 this.consoleModel = new WebInspector.ConsoleModel(this); | 103 this.consoleModel = new WebInspector.ConsoleModel(this); |
| 104 // This and similar lines are needed for compatibility. | |
| 105 if (!WebInspector.consoleModel) | |
| 106 WebInspector.consoleModel = this.consoleModel; | |
| 107 | 104 |
| 108 /** @type {!WebInspector.NetworkManager} */ | 105 /** @type {!WebInspector.NetworkManager} */ |
| 109 this.networkManager = new WebInspector.NetworkManager(this); | 106 this.networkManager = new WebInspector.NetworkManager(this); |
| 110 if (!WebInspector.networkManager) | 107 if (!WebInspector.networkManager) |
| 111 WebInspector.networkManager = this.networkManager; | 108 WebInspector.networkManager = this.networkManager; |
| 112 | 109 |
| 113 /** @type {!WebInspector.ResourceTreeModel} */ | 110 /** @type {!WebInspector.ResourceTreeModel} */ |
| 114 this.resourceTreeModel = new WebInspector.ResourceTreeModel(this); | 111 this.resourceTreeModel = new WebInspector.ResourceTreeModel(this); |
| 115 if (!WebInspector.resourceTreeModel) | 112 if (!WebInspector.resourceTreeModel) |
| 116 WebInspector.resourceTreeModel = this.resourceTreeModel; | 113 WebInspector.resourceTreeModel = this.resourceTreeModel; |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 * @return {!Array.<!WebInspector.Target>} | 314 * @return {!Array.<!WebInspector.Target>} |
| 318 */ | 315 */ |
| 319 targets: function() | 316 targets: function() |
| 320 { | 317 { |
| 321 return this._targets.slice(); | 318 return this._targets.slice(); |
| 322 }, | 319 }, |
| 323 | 320 |
| 324 /** | 321 /** |
| 325 * @return {?WebInspector.Target} | 322 * @return {?WebInspector.Target} |
| 326 */ | 323 */ |
| 327 activeTarget: function() | 324 mainTarget: function() |
| 328 { | 325 { |
| 329 return this._targets[0]; | 326 return this._targets[0]; |
| 330 } | 327 } |
| 331 } | 328 } |
| 332 | 329 |
| 333 /** | 330 /** |
| 334 * @interface | 331 * @interface |
| 335 */ | 332 */ |
| 336 WebInspector.TargetManager.Observer = function() | 333 WebInspector.TargetManager.Observer = function() |
| 337 { | 334 { |
| 338 } | 335 } |
| 339 | 336 |
| 340 WebInspector.TargetManager.Observer.prototype = { | 337 WebInspector.TargetManager.Observer.prototype = { |
| 341 /** | 338 /** |
| 342 * @param {!WebInspector.Target} target | 339 * @param {!WebInspector.Target} target |
| 343 */ | 340 */ |
| 344 targetAdded: function(target) { }, | 341 targetAdded: function(target) { }, |
| 345 | 342 |
| 346 /** | 343 /** |
| 347 * @param {!WebInspector.Target} target | 344 * @param {!WebInspector.Target} target |
| 348 */ | 345 */ |
| 349 targetRemoved: function(target) { }, | 346 targetRemoved: function(target) { }, |
| 350 } | 347 } |
| 351 | 348 |
| 352 /** | 349 /** |
| 353 * @type {!WebInspector.TargetManager} | 350 * @type {!WebInspector.TargetManager} |
| 354 */ | 351 */ |
| 355 WebInspector.targetManager = new WebInspector.TargetManager(); | 352 WebInspector.targetManager = new WebInspector.TargetManager(); |
| OLD | NEW |