Index: Source/WebCore/inspector/front-end/NetworkManager.js |
=================================================================== |
--- Source/WebCore/inspector/front-end/NetworkManager.js (revision 130858) |
+++ Source/WebCore/inspector/front-end/NetworkManager.js (working copy) |
@@ -49,6 +49,8 @@ |
} |
WebInspector.NetworkManager.EventTypes = { |
+ ResourceTrackingEnabled: "ResourceTrackingEnabled", |
+ ResourceTrackingDisabled: "ResourceTrackingDisabled", |
RequestStarted: "RequestStarted", |
RequestUpdated: "RequestUpdated", |
RequestFinished: "RequestFinished", |
@@ -92,6 +94,24 @@ |
} |
WebInspector.NetworkManager.prototype = { |
+ enableResourceTracking: function() |
+ { |
+ function callback(error) |
+ { |
+ this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceTrackingEnabled); |
+ } |
+ NetworkAgent.enable(callback.bind(this)); |
+ }, |
+ |
+ disableResourceTracking: function() |
+ { |
+ function callback(error) |
+ { |
+ this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceTrackingDisabled); |
+ } |
+ NetworkAgent.disable(callback.bind(this)); |
+ }, |
+ |
/** |
* @param {string} url |
* @return {WebInspector.NetworkRequest} |