Chromium Code Reviews| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 428 this._agent = manager.target().serviceWorkerAgent(); | 428 this._agent = manager.target().serviceWorkerAgent(); |
| 429 this._workerId = workerId; | 429 this._workerId = workerId; |
| 430 this._connection = new WebInspector.ServiceWorkerConnection(this._agent, wor kerId); | 430 this._connection = new WebInspector.ServiceWorkerConnection(this._agent, wor kerId); |
| 431 this._url = url; | 431 this._url = url; |
| 432 this._versionId = versionId; | 432 this._versionId = versionId; |
| 433 var parsedURL = url.asParsedURL(); | 433 var parsedURL = url.asParsedURL(); |
| 434 this._name = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + (++WebInspector.ServiceWorker._lastAnonymousTargetId); | 434 this._name = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + (++WebInspector.ServiceWorker._lastAnonymousTargetId); |
| 435 this._scope = parsedURL.host + parsedURL.folderPathComponents; | 435 this._scope = parsedURL.host + parsedURL.folderPathComponents; |
| 436 | 436 |
| 437 this._manager._workers.set(workerId, this); | 437 this._manager._workers.set(workerId, this); |
| 438 this._target = WebInspector.targetManager.createTarget(this._name, WebInspec tor.Target.Type.ServiceWorker, this._connection, manager.target()); | 438 var caps = WebInspector.Target.Capabilities.NETWORK_DOMAINS | WebInspector.T arget.Capabilities.WORKER_DOMAINS; |
|
dgozman
2016/07/12 00:34:11
No abbreviations.
eostroukhov-old
2016/07/12 21:46:15
Done.
| |
| 439 this._target = WebInspector.targetManager.createTarget(this._name, caps, thi s._connection, manager.target()); | |
| 439 this._target[WebInspector.ServiceWorker.Symbol] = this; | 440 this._target[WebInspector.ServiceWorker.Symbol] = this; |
| 440 this._manager.dispatchEventToListeners(WebInspector.ServiceWorkerManager.Eve nts.WorkersUpdated); | 441 this._manager.dispatchEventToListeners(WebInspector.ServiceWorkerManager.Eve nts.WorkersUpdated); |
| 441 this._target.runtimeAgent().run(); | 442 this._target.runtimeAgent().run(); |
| 442 } | 443 } |
| 443 | 444 |
| 444 WebInspector.ServiceWorker.Symbol = Symbol("serviceWorker"); | 445 WebInspector.ServiceWorker.Symbol = Symbol("serviceWorker"); |
| 445 | 446 |
| 446 WebInspector.ServiceWorker._lastAnonymousTargetId = 0; | 447 WebInspector.ServiceWorker._lastAnonymousTargetId = 0; |
| 447 | 448 |
| 448 WebInspector.ServiceWorker.prototype = { | 449 WebInspector.ServiceWorker.prototype = { |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 883 { | 884 { |
| 884 return this._isRedundant() && (!this.errors.length || this._deleting); | 885 return this._isRedundant() && (!this.errors.length || this._deleting); |
| 885 }, | 886 }, |
| 886 | 887 |
| 887 clearErrors: function() | 888 clearErrors: function() |
| 888 { | 889 { |
| 889 this._fingerprint = Symbol("fingerprint"); | 890 this._fingerprint = Symbol("fingerprint"); |
| 890 this.errors = []; | 891 this.errors = []; |
| 891 } | 892 } |
| 892 } | 893 } |
| OLD | NEW |