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 {!InspectorBackendClass.Connection} connection | 10 * @param {!InspectorBackendClass.Connection} connection |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 /** | 238 /** |
239 * @param {!InspectorBackendClass.Connection} connection | 239 * @param {!InspectorBackendClass.Connection} connection |
240 * @param {function(!WebInspector.Target)=} callback | 240 * @param {function(!WebInspector.Target)=} callback |
241 */ | 241 */ |
242 createTarget: function(connection, callback) | 242 createTarget: function(connection, callback) |
243 { | 243 { |
244 var target = new WebInspector.Target(connection, callbackWrapper.bind(th
is)); | 244 var target = new WebInspector.Target(connection, callbackWrapper.bind(th
is)); |
245 | 245 |
246 /** | 246 /** |
247 * @this {WebInspector.TargetManager} | 247 * @this {WebInspector.TargetManager} |
248 * @param newTarget | 248 * @param {!WebInspector.Target} newTarget |
249 */ | 249 */ |
250 function callbackWrapper(newTarget) | 250 function callbackWrapper(newTarget) |
251 { | 251 { |
252 this._targets.push(newTarget); | 252 this._targets.push(newTarget); |
253 var copy = this._observers; | 253 var copy = this._observers; |
254 for (var i = 0; i < copy.length; ++i) | 254 for (var i = 0; i < copy.length; ++i) |
255 copy[i].targetAdded(newTarget); | 255 copy[i].targetAdded(newTarget); |
256 | 256 |
257 if (callback) | 257 if (callback) |
258 callback(newTarget); | 258 callback(newTarget); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 /** | 292 /** |
293 * @param {!WebInspector.Target} target | 293 * @param {!WebInspector.Target} target |
294 */ | 294 */ |
295 targetRemoved: function(target) { }, | 295 targetRemoved: function(target) { }, |
296 } | 296 } |
297 | 297 |
298 /** | 298 /** |
299 * @type {!WebInspector.TargetManager} | 299 * @type {!WebInspector.TargetManager} |
300 */ | 300 */ |
301 WebInspector.targetManager; | 301 WebInspector.targetManager; |
OLD | NEW |