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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js

Issue 2408133004: [DevTools] Implement Target.setDiscoverTargets method. (Closed)
Patch Set: new fancy range-based iteration in observer list! Created 4 years, 2 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.SDKModel} 7 * @extends {WebInspector.SDKModel}
8 * @param {!WebInspector.Target} target 8 * @param {!WebInspector.Target} target
9 */ 9 */
10 WebInspector.SubTargetsManager = function(target) 10 WebInspector.SubTargetsManager = function(target)
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 _targetCreated: function(targetInfo) 144 _targetCreated: function(targetInfo)
145 { 145 {
146 console.assert(!this._allTargets.has(targetInfo.id)); 146 console.assert(!this._allTargets.has(targetInfo.id));
147 console.assert(!this._attachedTargets.has(targetInfo.id)); 147 console.assert(!this._attachedTargets.has(targetInfo.id));
148 this._allTargets.set(targetInfo.id, targetInfo); 148 this._allTargets.set(targetInfo.id, targetInfo);
149 }, 149 },
150 150
151 /** 151 /**
152 * @param {string} targetId 152 * @param {string} targetId
153 */ 153 */
154 _targetRemoved: function(targetId) 154 _targetDestroyed: function(targetId)
155 { 155 {
156 console.assert(this._allTargets.has(targetId)); 156 console.assert(this._allTargets.has(targetId));
157 console.assert(!this._attachedTargets.has(targetId)); 157 console.assert(!this._attachedTargets.has(targetId));
158 this._allTargets.delete(targetId); 158 this._allTargets.delete(targetId);
159 }, 159 },
160 160
161 /** 161 /**
162 * @param {string} targetId 162 * @param {string} targetId
163 * @param {boolean} waitingForDebugger 163 * @param {boolean} waitingForDebugger
164 */ 164 */
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 */ 232 */
233 targetCreated: function(targetInfo) 233 targetCreated: function(targetInfo)
234 { 234 {
235 this._manager._targetCreated(new WebInspector.TargetInfo(targetInfo)); 235 this._manager._targetCreated(new WebInspector.TargetInfo(targetInfo));
236 }, 236 },
237 237
238 /** 238 /**
239 * @override 239 * @override
240 * @param {string} targetId 240 * @param {string} targetId
241 */ 241 */
242 targetRemoved: function(targetId) 242 targetDestroyed: function(targetId)
243 { 243 {
244 this._manager._targetRemoved(targetId); 244 this._manager._targetDestroyed(targetId);
245 }, 245 },
246 246
247 /** 247 /**
248 * @override 248 * @override
249 * @param {string} targetId 249 * @param {string} targetId
250 * @param {boolean} waitingForDebugger 250 * @param {boolean} waitingForDebugger
251 */ 251 */
252 attachedToTarget: function(targetId, waitingForDebugger) 252 attachedToTarget: function(targetId, waitingForDebugger)
253 { 253 {
254 this._manager._attachedToTarget(targetId, waitingForDebugger); 254 this._manager._attachedToTarget(targetId, waitingForDebugger);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 this.url = payload.url; 315 this.url = payload.url;
316 this.type = payload.type; 316 this.type = payload.type;
317 if (this.type !== "page" && this.type !== "iframe") { 317 if (this.type !== "page" && this.type !== "iframe") {
318 this.title = WebInspector.UIString("Worker: %s", this.url); 318 this.title = WebInspector.UIString("Worker: %s", this.url);
319 this.canActivate = false; 319 this.canActivate = false;
320 } else { 320 } else {
321 this.title = payload.title; 321 this.title = payload.title;
322 this.canActivate = true; 322 this.canActivate = true;
323 } 323 }
324 } 324 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698