| OLD | NEW |
| 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 {string} name | 10 * @param {string} name |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 this.workerManager = !this.isDedicatedWorker() ? new WebInspector.Worker
Manager(this) : null; | 142 this.workerManager = !this.isDedicatedWorker() ? new WebInspector.Worker
Manager(this) : null; |
| 143 /** @type {!WebInspector.CPUProfilerModel} */ | 143 /** @type {!WebInspector.CPUProfilerModel} */ |
| 144 this.cpuProfilerModel = new WebInspector.CPUProfilerModel(this); | 144 this.cpuProfilerModel = new WebInspector.CPUProfilerModel(this); |
| 145 /** @type {!WebInspector.HeapProfilerModel} */ | 145 /** @type {!WebInspector.HeapProfilerModel} */ |
| 146 this.heapProfilerModel = new WebInspector.HeapProfilerModel(this); | 146 this.heapProfilerModel = new WebInspector.HeapProfilerModel(this); |
| 147 /** @type {!WebInspector.LayerTreeModel} */ | 147 /** @type {!WebInspector.LayerTreeModel} */ |
| 148 this.layerTreeModel = new WebInspector.LayerTreeModel(this); | 148 this.layerTreeModel = new WebInspector.LayerTreeModel(this); |
| 149 /** @type {!WebInspector.AnimationModel} */ | 149 /** @type {!WebInspector.AnimationModel} */ |
| 150 this.animationModel = new WebInspector.AnimationModel(this); | 150 this.animationModel = new WebInspector.AnimationModel(this); |
| 151 | 151 |
| 152 if (this._parentTarget && this._parentTarget.isServiceWorker()) { | |
| 153 /** @type {!WebInspector.ServiceWorkerCacheModel} */ | |
| 154 this.serviceWorkerCacheModel = new WebInspector.ServiceWorkerCacheMo
del(this); | |
| 155 } | |
| 156 | |
| 157 this.tracingManager = new WebInspector.TracingManager(this); | 152 this.tracingManager = new WebInspector.TracingManager(this); |
| 158 | 153 |
| 159 if (this.isPage() && (Runtime.experiments.isEnabled("serviceWorkersInPag
eFrontend") || Runtime.experiments.isEnabled("serviceWorkersInResources"))) | 154 if (this.isPage() && (Runtime.experiments.isEnabled("serviceWorkersInPag
eFrontend") || Runtime.experiments.isEnabled("serviceWorkersInResources"))) |
| 160 this.serviceWorkerManager = new WebInspector.ServiceWorkerManager(th
is); | 155 this.serviceWorkerManager = new WebInspector.ServiceWorkerManager(th
is); |
| 161 | 156 |
| 162 if (callback) | 157 if (callback) |
| 163 callback(this); | 158 callback(this); |
| 164 }, | 159 }, |
| 165 | 160 |
| 166 /** | 161 /** |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 { | 220 { |
| 226 WebInspector.targetManager.removeTarget(this); | 221 WebInspector.targetManager.removeTarget(this); |
| 227 this._dispose(); | 222 this._dispose(); |
| 228 }, | 223 }, |
| 229 | 224 |
| 230 _dispose: function() | 225 _dispose: function() |
| 231 { | 226 { |
| 232 this.debuggerModel.dispose(); | 227 this.debuggerModel.dispose(); |
| 233 this.networkManager.dispose(); | 228 this.networkManager.dispose(); |
| 234 this.cpuProfilerModel.dispose(); | 229 this.cpuProfilerModel.dispose(); |
| 235 if (this.serviceWorkerCacheModel) | 230 WebInspector.ServiceWorkerCacheModel.fromTarget(this).dispose(); |
| 236 this.serviceWorkerCacheModel.dispose(); | |
| 237 if (this.workerManager) | 231 if (this.workerManager) |
| 238 this.workerManager.dispose(); | 232 this.workerManager.dispose(); |
| 239 }, | 233 }, |
| 240 | 234 |
| 241 /** | 235 /** |
| 242 * @return {boolean} | 236 * @return {boolean} |
| 243 */ | 237 */ |
| 244 isDetached: function() | 238 isDetached: function() |
| 245 { | 239 { |
| 246 return this._connection.isClosed(); | 240 return this._connection.isClosed(); |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 /** | 574 /** |
| 581 * @param {!WebInspector.Target} target | 575 * @param {!WebInspector.Target} target |
| 582 */ | 576 */ |
| 583 targetRemoved: function(target) { }, | 577 targetRemoved: function(target) { }, |
| 584 } | 578 } |
| 585 | 579 |
| 586 /** | 580 /** |
| 587 * @type {!WebInspector.TargetManager} | 581 * @type {!WebInspector.TargetManager} |
| 588 */ | 582 */ |
| 589 WebInspector.targetManager = new WebInspector.TargetManager(); | 583 WebInspector.targetManager = new WebInspector.TargetManager(); |
| OLD | NEW |