| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 /** | 164 /** |
| 165 * @param {string} versionId | 165 * @param {string} versionId |
| 166 */ | 166 */ |
| 167 inspectWorker: function(versionId) | 167 inspectWorker: function(versionId) |
| 168 { | 168 { |
| 169 this._agent.inspectWorker(versionId); | 169 this._agent.inspectWorker(versionId); |
| 170 }, | 170 }, |
| 171 | 171 |
| 172 /** | 172 /** |
| 173 * @param {string} workerId | 173 * @param {string} workerId |
| 174 */ |
| 175 detachWorker: function(workerId) |
| 176 { |
| 177 this._agent.detachWorker(workerId); |
| 178 }, |
| 179 |
| 180 /** |
| 181 * @param {string} workerId |
| 174 * @param {string} url | 182 * @param {string} url |
| 175 */ | 183 */ |
| 176 _workerCreated: function(workerId, url) | 184 _workerCreated: function(workerId, url) |
| 177 { | 185 { |
| 178 new WebInspector.ServiceWorker(this, workerId, url); | 186 new WebInspector.ServiceWorker(this, workerId, url); |
| 179 }, | 187 }, |
| 180 | 188 |
| 181 /** | 189 /** |
| 182 * @param {string} workerId | 190 * @param {string} workerId |
| 183 */ | 191 */ |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 * @param {!ServiceWorkerAgent.ServiceWorkerVersion} payload | 506 * @param {!ServiceWorkerAgent.ServiceWorkerVersion} payload |
| 499 */ | 507 */ |
| 500 _update: function(payload) | 508 _update: function(payload) |
| 501 { | 509 { |
| 502 this.id = payload.versionId; | 510 this.id = payload.versionId; |
| 503 this.scriptURL = payload.scriptURL; | 511 this.scriptURL = payload.scriptURL; |
| 504 this.runningStatus = payload.runningStatus; | 512 this.runningStatus = payload.runningStatus; |
| 505 this.status = payload.status; | 513 this.status = payload.status; |
| 506 this.scriptLastModified = payload.scriptLastModified; | 514 this.scriptLastModified = payload.scriptLastModified; |
| 507 this.scriptResponseTime = payload.scriptResponseTime; | 515 this.scriptResponseTime = payload.scriptResponseTime; |
| 516 this.workerId = payload.workerId; |
| 508 }, | 517 }, |
| 509 | 518 |
| 510 /** | 519 /** |
| 511 * @return {boolean} | 520 * @return {boolean} |
| 512 */ | 521 */ |
| 513 isStartable: function() | 522 isStartable: function() |
| 514 { | 523 { |
| 515 return !this._registration.isDeleted && this.isActivated() && this.isSto
pped(); | 524 return !this._registration.isDeleted && this.isActivated() && this.isSto
pped(); |
| 516 }, | 525 }, |
| 517 | 526 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 }, | 695 }, |
| 687 | 696 |
| 688 /** | 697 /** |
| 689 * @return {boolean} | 698 * @return {boolean} |
| 690 */ | 699 */ |
| 691 _shouldBeRemoved: function() | 700 _shouldBeRemoved: function() |
| 692 { | 701 { |
| 693 return this._isRedundant() && (!this._hasErrorLog() || this._deleting); | 702 return this._isRedundant() && (!this._hasErrorLog() || this._deleting); |
| 694 } | 703 } |
| 695 } | 704 } |
| OLD | NEW |