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

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

Issue 2451363002: [DevTools] Move main target/connection to TargetManager. (Closed)
Patch Set: Created 4 years, 1 month 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 /** 326 /**
327 * @constructor 327 * @constructor
328 * @param {!TargetAgent.TargetInfo} payload 328 * @param {!TargetAgent.TargetInfo} payload
329 */ 329 */
330 WebInspector.TargetInfo = function(payload) 330 WebInspector.TargetInfo = function(payload)
331 { 331 {
332 this.id = payload.targetId; 332 this.id = payload.targetId;
333 this.url = payload.url; 333 this.url = payload.url;
334 this.type = payload.type; 334 this.type = payload.type;
335 if (this.type !== "page" && this.type !== "iframe") { 335 this.canActivate = this.type === "page" || this.type === "iframe";
336 if (this.type === "node")
337 this.title = WebInspector.UIString("Node: %s", this.url);
338 else if (this.type === "page" || this.type === "iframe")
339 this.title = payload.title;
340 else
336 this.title = WebInspector.UIString("Worker: %s", this.url); 341 this.title = WebInspector.UIString("Worker: %s", this.url);
337 this.canActivate = false;
338 } else {
339 this.title = payload.title;
340 this.canActivate = true;
341 }
342 }; 342 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698