| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 6 /** |
| 7 * @constructor | 7 * @constructor |
| 8 * @param {!WebInspector.Target} mainTarget | 8 * @param {!WebInspector.Target} mainTarget |
| 9 * @param {!WebInspector.TargetManager} targetManager | 9 * @param {!WebInspector.TargetManager} targetManager |
| 10 */ | 10 */ |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 * @extends {InspectorBackendClass.Connection} | 138 * @extends {InspectorBackendClass.Connection} |
| 139 * @param {!WebInspector.Target} target | 139 * @param {!WebInspector.Target} target |
| 140 * @param {number} workerId | 140 * @param {number} workerId |
| 141 * @param {boolean} inspectorConnected | 141 * @param {boolean} inspectorConnected |
| 142 * @param {function(!InspectorBackendClass.Connection)} onConnectionReady | 142 * @param {function(!InspectorBackendClass.Connection)} onConnectionReady |
| 143 */ | 143 */ |
| 144 WebInspector.WorkerConnection = function(target, workerId, inspectorConnected, o
nConnectionReady) | 144 WebInspector.WorkerConnection = function(target, workerId, inspectorConnected, o
nConnectionReady) |
| 145 { | 145 { |
| 146 InspectorBackendClass.Connection.call(this); | 146 InspectorBackendClass.Connection.call(this); |
| 147 //FIXME: remove resourceTreeModel and others from worker targets | 147 //FIXME: remove resourceTreeModel and others from worker targets |
| 148 this.suppressErrorsForDomains(["Worker", "Page", "CSS", "DOM", "DOMStorage",
"Database", "Network", "IndexedDB"]); | 148 this.suppressErrorsForDomains(["Worker", "Page", "CSS", "DOM", "DOMStorage",
"Database", "Network", "IndexedDB", "ServiceWorkerCache"]); |
| 149 this._target = target; | 149 this._target = target; |
| 150 this._workerId = workerId; | 150 this._workerId = workerId; |
| 151 this._workerAgent = target.workerAgent(); | 151 this._workerAgent = target.workerAgent(); |
| 152 target.workerManager.addEventListener(WebInspector.WorkerManager.Events.Mess
ageFromWorker, this._dispatchMessageFromWorker, this); | 152 target.workerManager.addEventListener(WebInspector.WorkerManager.Events.Mess
ageFromWorker, this._dispatchMessageFromWorker, this); |
| 153 target.workerManager.addEventListener(WebInspector.WorkerManager.Events.Work
erRemoved, this._onWorkerRemoved, this); | 153 target.workerManager.addEventListener(WebInspector.WorkerManager.Events.Work
erRemoved, this._onWorkerRemoved, this); |
| 154 target.workerManager.addEventListener(WebInspector.WorkerManager.Events.Work
ersCleared, this._close, this); | 154 target.workerManager.addEventListener(WebInspector.WorkerManager.Events.Work
ersCleared, this._close, this); |
| 155 if (!inspectorConnected) | 155 if (!inspectorConnected) |
| 156 this._workerAgent.connectToWorker(workerId, onConnectionReady.bind(null,
this)); | 156 this._workerAgent.connectToWorker(workerId, onConnectionReady.bind(null,
this)); |
| 157 else | 157 else |
| 158 onConnectionReady.call(null, this); | 158 onConnectionReady.call(null, this); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 this.connectionClosed("worker_terminated"); | 197 this.connectionClosed("worker_terminated"); |
| 198 }, | 198 }, |
| 199 | 199 |
| 200 __proto__: InspectorBackendClass.Connection.prototype | 200 __proto__: InspectorBackendClass.Connection.prototype |
| 201 } | 201 } |
| 202 | 202 |
| 203 /** | 203 /** |
| 204 * @type {?WebInspector.WorkerTargetManager} | 204 * @type {?WebInspector.WorkerTargetManager} |
| 205 */ | 205 */ |
| 206 WebInspector.workerTargetManager; | 206 WebInspector.workerTargetManager; |
| OLD | NEW |