Index: content/browser/renderer_host/resource_dispatcher_host.h |
=================================================================== |
--- content/browser/renderer_host/resource_dispatcher_host.h (revision 117096) |
+++ content/browser/renderer_host/resource_dispatcher_host.h (working copy) |
@@ -59,16 +59,21 @@ |
class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate { |
public: |
- explicit ResourceDispatcherHost( |
- const ResourceQueue::DelegateSet& resource_queue_delegates); |
+ ResourceDispatcherHost(); |
virtual ~ResourceDispatcherHost(); |
- void Initialize(); |
+ // Returns the current ResourceDispatcherHost. May return NULL if it hasn't |
+ // been created yet. |
+ static ResourceDispatcherHost* Get(); |
// Puts the resource dispatcher host in an inactive state (unable to begin |
// new requests). Cancels all pending requests. |
void Shutdown(); |
+ // Adds a delegate that can delay requests. This should be called early, i.e. |
+ // in the ContentBrowserClient::ResourceDispatcherHostCreated callback. |
+ void AddResourceQueueDelegate(ResourceQueueDelegate* delegate); |
+ |
// Returns true if the message was a resource message that was processed. |
// If it was, message_was_ok will be false iff the message was corrupt. |
bool OnMessageReceived(const IPC::Message& message, |
@@ -462,6 +467,9 @@ |
// Handles the resource requests from the moment we want to start them. |
ResourceQueue resource_queue_; |
+ // Used temporarily during construction. |
+ ResourceQueue::DelegateSet* temporarily_delegate_set_; |
+ |
// We own the download file writing thread and manager |
scoped_refptr<DownloadFileManager> download_file_manager_; |