Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(924)

Unified Diff: content/common/resource_dispatcher.h

Issue 7058041: Remove ResourceDispatcherHost dependency on Chrome's LoginHandler and ExternalProtocolHandler. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix deps Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/resource_dispatcher.h
===================================================================
--- content/common/resource_dispatcher.h (revision 87739)
+++ content/common/resource_dispatcher.h (working copy)
@@ -18,6 +18,7 @@
#include "ipc/ipc_channel.h"
#include "webkit/glue/resource_loader_bridge.h"
+class ResourceDispatcherDelegate;
struct ResourceResponseHead;
// This class serves as a communication interface between the
@@ -25,24 +26,6 @@
// the child process. It can be used from any child process.
class ResourceDispatcher : public IPC::Channel::Listener {
public:
- // Interface that allows observing request events and optionally replacing the
- // peer.
- class Observer {
- public:
- Observer();
- virtual ~Observer();
-
- virtual webkit_glue::ResourceLoaderBridge::Peer* OnRequestComplete(
- webkit_glue::ResourceLoaderBridge::Peer* current_peer,
- ResourceType::Type resource_type,
- const net::URLRequestStatus& status) = 0;
-
- virtual webkit_glue::ResourceLoaderBridge::Peer* OnReceivedResponse(
- webkit_glue::ResourceLoaderBridge::Peer* current_peer,
- const std::string& mime_type,
- const GURL& url) = 0;
- };
-
explicit ResourceDispatcher(IPC::Message::Sender* sender);
virtual ~ResourceDispatcher();
@@ -75,8 +58,11 @@
// Toggles the is_deferred attribute for the specified request.
void SetDefersLoading(int request_id, bool value);
- // Takes ownership of the object.
- void set_observer(Observer* observer) { observer_.reset(observer); }
+ // This does not take ownership of the delegate. It is expected that the
+ // delegate have a longer lifetime than the ResourceDispatcher.
+ void set_delegate(ResourceDispatcherDelegate* delegate) {
+ delegate_ = delegate;
+ }
private:
friend class ResourceDispatcherTest;
@@ -166,7 +152,7 @@
ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_;
- scoped_ptr<Observer> observer_;
+ ResourceDispatcherDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
};
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host_request_info.cc ('k') | content/common/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698