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

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

Issue 2749043005: [DevTools] Make NetworkLog a singleton, and not an SDKModel (Closed)
Patch Set: review comments addressed Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js ('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 SDK.TargetManager = class extends Common.Object { 7 SDK.TargetManager = class extends Common.Object {
8 constructor() { 8 constructor() {
9 super(); 9 super();
10 /** @type {!Array.<!SDK.Target>} */ 10 /** @type {!Array.<!SDK.Target>} */
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 * @param {string} name 237 * @param {string} name
238 * @param {number} capabilitiesMask 238 * @param {number} capabilitiesMask
239 * @param {!Protocol.InspectorBackend.Connection.Factory} connectionFactory 239 * @param {!Protocol.InspectorBackend.Connection.Factory} connectionFactory
240 * @param {?SDK.Target} parentTarget 240 * @param {?SDK.Target} parentTarget
241 * @return {!SDK.Target} 241 * @return {!SDK.Target}
242 */ 242 */
243 createTarget(id, name, capabilitiesMask, connectionFactory, parentTarget) { 243 createTarget(id, name, capabilitiesMask, connectionFactory, parentTarget) {
244 var target = new SDK.Target(this, id, name, capabilitiesMask, connectionFact ory, parentTarget); 244 var target = new SDK.Target(this, id, name, capabilitiesMask, connectionFact ory, parentTarget);
245 this._pendingTargets.add(target); 245 this._pendingTargets.add(target);
246 246
247 var networkManager = target.model(SDK.NetworkManager); 247 target.model(SDK.NetworkManager);
248 var resourceTreeModel = target.model(SDK.ResourceTreeModel); 248 var resourceTreeModel = target.model(SDK.ResourceTreeModel);
249 if (networkManager && resourceTreeModel)
250 new SDK.NetworkLog(target, resourceTreeModel, networkManager);
251
252 /** @type {!SDK.RuntimeModel} */ 249 /** @type {!SDK.RuntimeModel} */
253 target.runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.Run timeModel)); 250 target.runtimeModel = /** @type {!SDK.RuntimeModel} */ (target.model(SDK.Run timeModel));
254 target.model(SDK.DebuggerModel); 251 target.model(SDK.DebuggerModel);
255 target.model(SDK.LogModel); 252 target.model(SDK.LogModel);
256 target.model(SDK.DOMModel); 253 target.model(SDK.DOMModel);
257 target.model(SDK.CSSModel); 254 target.model(SDK.CSSModel);
258 target.model(SDK.CPUProfilerModel); 255 target.model(SDK.CPUProfilerModel);
259 target.model(SDK.ServiceWorkerManager); 256 target.model(SDK.ServiceWorkerManager);
260 257
261 if (target.hasTargetCapability()) 258 if (target.hasTargetCapability())
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 /** 683 /**
687 * @param {!T} model 684 * @param {!T} model
688 */ 685 */
689 modelRemoved(model) {}, 686 modelRemoved(model) {},
690 }; 687 };
691 688
692 /** 689 /**
693 * @type {!SDK.TargetManager} 690 * @type {!SDK.TargetManager}
694 */ 691 */
695 SDK.targetManager = new SDK.TargetManager(); 692 SDK.targetManager = new SDK.TargetManager();
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698