Index: content/browser/renderer_host/resource_dispatcher_host.h |
diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h |
index f8643fed4056f0b05256172c29875ca7d7ad1927..b16896a33289f1566d913504386ddf991233a58c 100644 |
--- a/content/browser/renderer_host/resource_dispatcher_host.h |
+++ b/content/browser/renderer_host/resource_dispatcher_host.h |
@@ -59,6 +59,20 @@ class DeletableFileReference; |
class ResourceDispatcherHost : public net::URLRequest::Delegate { |
public: |
+ class Observer { |
+ public: |
+ virtual bool ShouldBeginRequest(int child_id, int route_id, |
cbentzel
2011/05/24 17:13:54
Please document these methods.
dominich
2011/05/24 18:01:47
Done.
|
+ const ResourceHostMsg_Request& request_data, |
+ const content::ResourceContext& resource_context, |
+ const GURL& referrer) = 0; |
+ |
+ virtual void MutateLoadFlags(int child_id, int route_id, |
+ int* load_flags) = 0; |
+ protected: |
+ Observer() {} |
+ virtual ~Observer() {} |
+ }; |
+ |
explicit ResourceDispatcherHost( |
const ResourceQueue::DelegateSet& resource_queue_delegates); |
~ResourceDispatcherHost(); |
@@ -244,6 +258,8 @@ class ResourceDispatcherHost : public net::URLRequest::Delegate { |
static bool is_prefetch_enabled(); |
static void set_is_prefetch_enabled(bool value); |
+ void set_observer(Observer* observer) { observer_ = observer; } |
cbentzel
2011/05/24 17:13:54
Please document lifetime expectations.
Also, woul
dominich
2011/05/24 18:01:47
Done.
|
+ |
private: |
FRIEND_TEST_ALL_PREFIXES(ResourceDispatcherHostTest, |
TestBlockedRequestsProcessDies); |
@@ -476,8 +492,9 @@ class ResourceDispatcherHost : public net::URLRequest::Delegate { |
// to the source of the message. |
ResourceMessageFilter* filter_; |
- static bool is_prefetch_enabled_; |
+ Observer* observer_; |
+ static bool is_prefetch_enabled_; |
DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); |
}; |