| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 _resetResourceCount: function() | 74 _resetResourceCount: function() |
| 75 { | 75 { |
| 76 this._loadedResources = 0; | 76 this._loadedResources = 0; |
| 77 this._totalResources = 0; | 77 this._totalResources = 0; |
| 78 }, | 78 }, |
| 79 | 79 |
| 80 _onRequestStarted: function(event) | 80 _onRequestStarted: function(event) |
| 81 { | 81 { |
| 82 var request = /** @type {!WebInspector.NetworkRequest} */ (event.data); | 82 var request = /** @type {!WebInspector.NetworkRequest} */ (event.data); |
| 83 // Ignore long-living WebSockets for the sake of progress indicator, as
we won't be waiting them anyway. | 83 // Ignore long-living WebSockets for the sake of progress indicator, as
we won't be waiting them anyway. |
| 84 if (request.type === WebInspector.resourceTypes.WebSocket) | 84 if (request.resourceType() === WebInspector.resourceTypes.WebSocket) |
| 85 return; | 85 return; |
| 86 ++this._totalResources; | 86 ++this._totalResources; |
| 87 this._updateResourceProgress(); | 87 this._updateResourceProgress(); |
| 88 }, | 88 }, |
| 89 | 89 |
| 90 _onRequestFinished: function(event) | 90 _onRequestFinished: function(event) |
| 91 { | 91 { |
| 92 var request = /** @type {!WebInspector.NetworkRequest} */ (event.data); | 92 var request = /** @type {!WebInspector.NetworkRequest} */ (event.data); |
| 93 // See resorceStarted for details. | 93 // See resorceStarted for details. |
| 94 if (request.type === WebInspector.resourceTypes.WebSocket) | 94 if (request.resourceType() === WebInspector.resourceTypes.WebSocket) |
| 95 return; | 95 return; |
| 96 ++this._loadedResources; | 96 ++this._loadedResources; |
| 97 this._updateResourceProgress(); | 97 this._updateResourceProgress(); |
| 98 }, | 98 }, |
| 99 | 99 |
| 100 /** | 100 /** |
| 101 * @param {!WebInspector.AuditCategory} category | 101 * @param {!WebInspector.AuditCategory} category |
| 102 */ | 102 */ |
| 103 addCategory: function(category) | 103 addCategory: function(category) |
| 104 { | 104 { |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 }, | 319 }, |
| 320 | 320 |
| 321 _updateButton: function() | 321 _updateButton: function() |
| 322 { | 322 { |
| 323 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr
ing("Stop") : WebInspector.UIString("Run"); | 323 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr
ing("Stop") : WebInspector.UIString("Run"); |
| 324 this._launchButton.disabled = !this._currentCategoriesCount; | 324 this._launchButton.disabled = !this._currentCategoriesCount; |
| 325 }, | 325 }, |
| 326 | 326 |
| 327 __proto__: WebInspector.VBox.prototype | 327 __proto__: WebInspector.VBox.prototype |
| 328 } | 328 } |
| OLD | NEW |