Currently, NetworkManager directly calls each client to notify it on resource start/update/finish. This should be done via generic event dispatch to decouple higher-level code from NetworkManager.
Created attachment 79204 [details] patch
Comment on attachment 79204 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=79204&action=review > Source/WebCore/ChangeLog:9 > + (WebInspector.AuditLauncherView): Do not expose public interface to resource count. Do not c reset resource count upon reset(). typo: Do not __c__ reset
Comment on attachment 79204 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=79204&action=review > Source/WebCore/inspector/front-end/NetworkManager.js:132 > + this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceUpdated, resource); nit: _fireResourceUpdated(resource); > Source/WebCore/inspector/front-end/NetworkManager.js:218 > + this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceContentUpdated, resource); We only need this to remove XHRs, so ResourceUpdated should be sufficient. > Source/WebCore/inspector/front-end/NetworkManager.js:229 > + this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.MainResourceChanged, mainResource); MainResourceChanged sounds weird. How about MainResourceCommitLoad? > Source/WebCore/inspector/front-end/NetworkPanel.js:84 > + WebInspector.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceContentUpdated, this._onResourceUpdated, this); No need to listen to content update. > Source/WebCore/inspector/front-end/NetworkPanel.js:1438 > + this._resource.populateImageSource(previewImage); This will get merged hopefully.
Manually committed r76022: http://trac.webkit.org/changeset/76022