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

Side by Side Diff: Source/devtools/front_end/sdk/Target.js

Issue 332173002: DevTools: Add test multi-target-breakpoint-manager.html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 createTarget: function(connection, callback) 250 createTarget: function(connection, callback)
251 { 251 {
252 var target = new WebInspector.Target(connection, callbackWrapper.bind(th is)); 252 var target = new WebInspector.Target(connection, callbackWrapper.bind(th is));
253 253
254 /** 254 /**
255 * @this {WebInspector.TargetManager} 255 * @this {WebInspector.TargetManager}
256 * @param {!WebInspector.Target} newTarget 256 * @param {!WebInspector.Target} newTarget
257 */ 257 */
258 function callbackWrapper(newTarget) 258 function callbackWrapper(newTarget)
259 { 259 {
260 this._targets.push(newTarget); 260 this.addTarget(newTarget);
261 var copy = this._observers;
262 for (var i = 0; i < copy.length; ++i)
263 copy[i].targetAdded(newTarget);
264
265 if (callback) 261 if (callback)
266 callback(newTarget); 262 callback(newTarget);
267 } 263 }
268 }, 264 },
269 265
270 /** 266 /**
267 * @param {!WebInspector.Target} newTarget
268 */
269 addTarget: function(newTarget)
270 {
271 this._targets.push(newTarget);
272 var copy = this._observers;
273 for (var i = 0; i < copy.length; ++i)
274 copy[i].targetAdded(newTarget);
275 },
276
277 /**
278 * @param {!WebInspector.Target} target
279 */
280 removeTarget: function(target)
281 {
282 this._targets.remove(target);
283 var copy = this._observers;
284 for (var i = 0; i < copy.length; ++i)
285 copy[i].targetRemoved(target);
286 },
287
288 /**
271 * @return {!Array.<!WebInspector.Target>} 289 * @return {!Array.<!WebInspector.Target>}
272 */ 290 */
273 targets: function() 291 targets: function()
274 { 292 {
275 return this._targets; 293 return this._targets;
276 }, 294 },
277 295
278 /** 296 /**
279 * @return {?WebInspector.Target} 297 * @return {?WebInspector.Target}
280 */ 298 */
(...skipping 19 matching lines...) Expand all
300 /** 318 /**
301 * @param {!WebInspector.Target} target 319 * @param {!WebInspector.Target} target
302 */ 320 */
303 targetRemoved: function(target) { }, 321 targetRemoved: function(target) { },
304 } 322 }
305 323
306 /** 324 /**
307 * @type {!WebInspector.TargetManager} 325 * @type {!WebInspector.TargetManager}
308 */ 326 */
309 WebInspector.targetManager; 327 WebInspector.targetManager;
OLDNEW
« no previous file with comments | « LayoutTests/inspector/sources/debugger/multi-target-breakpoint-manager-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698