| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 /** | 199 /** |
| 200 * @constructor | 200 * @constructor |
| 201 * @extends {InspectorBackendClass.Connection} | 201 * @extends {InspectorBackendClass.Connection} |
| 202 * @param {!WebInspector.WorkerManager} workerManager | 202 * @param {!WebInspector.WorkerManager} workerManager |
| 203 * @param {string} workerId | 203 * @param {string} workerId |
| 204 */ | 204 */ |
| 205 WebInspector.WorkerConnection = function(workerManager, workerId) | 205 WebInspector.WorkerConnection = function(workerManager, workerId) |
| 206 { | 206 { |
| 207 InspectorBackendClass.Connection.call(this); | 207 InspectorBackendClass.Connection.call(this); |
| 208 //FIXME: remove resourceTreeModel and others from worker targets | 208 // FIXME: remove resourceTreeModel and others from worker targets |
| 209 this.suppressErrorsForDomains(["Worker", "Page", "CSS", "DOM", "DOMStorage",
"Database", "Network", "IndexedDB"]); | 209 this.suppressErrorsForDomains(["Worker", "Page", "CSS", "DOM", "DOMStorage",
"Database", "Network", "IndexedDB"]); |
| 210 this._agent = workerManager.target().workerAgent(); | 210 this._agent = workerManager.target().workerAgent(); |
| 211 this._workerId = workerId; | 211 this._workerId = workerId; |
| 212 } | 212 } |
| 213 | 213 |
| 214 WebInspector.WorkerConnection.prototype = { | 214 WebInspector.WorkerConnection.prototype = { |
| 215 /** | 215 /** |
| 216 * @override | 216 * @override |
| 217 * @param {!Object} messageObject | 217 * @param {!Object} messageObject |
| 218 */ | 218 */ |
| 219 sendMessage: function(messageObject) | 219 sendMessage: function(messageObject) |
| 220 { | 220 { |
| 221 this._agent.sendMessageToWorker(this._workerId, JSON.stringify(messageOb
ject)); | 221 this._agent.sendMessageToWorker(this._workerId, JSON.stringify(messageOb
ject)); |
| 222 }, | 222 }, |
| 223 | 223 |
| 224 _close: function() | 224 _close: function() |
| 225 { | 225 { |
| 226 this.connectionClosed("worker_terminated"); | 226 this.connectionClosed("worker_terminated"); |
| 227 }, | 227 }, |
| 228 | 228 |
| 229 __proto__: InspectorBackendClass.Connection.prototype | 229 __proto__: InspectorBackendClass.Connection.prototype |
| 230 } | 230 } |
| OLD | NEW |