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

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: rebased 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 /** 346 /**
347 * @constructor 347 * @constructor
348 * @param {!TargetAgent.TargetInfo} payload 348 * @param {!TargetAgent.TargetInfo} payload
349 */ 349 */
350 WebInspector.TargetInfo = function(payload) 350 WebInspector.TargetInfo = function(payload)
351 { 351 {
352 this.id = payload.targetId; 352 this.id = payload.targetId;
353 this.url = payload.url; 353 this.url = payload.url;
354 this.type = payload.type; 354 this.type = payload.type;
355 if (this.type !== "page" && this.type !== "iframe") { 355 this.canActivate = this.type === "page" || this.type === "iframe";
356 if (this.type === "node")
357 this.title = WebInspector.UIString("Node: %s", this.url);
358 else if (this.type === "page" || this.type === "iframe")
359 this.title = payload.title;
360 else
356 this.title = WebInspector.UIString("Worker: %s", this.url); 361 this.title = WebInspector.UIString("Worker: %s", this.url);
357 this.canActivate = false;
358 } else {
359 this.title = payload.title;
360 this.canActivate = true;
361 }
362 }; 362 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698