summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 01:10:15 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 01:10:15 +0000
commit359dfa3e661f583b6f564b6a14025fd0e2a6b669 (patch)
tree97e6c0f60069c2a1ad51cd950972fa023301c82f /content/common
parentbd868f4a83aa3b69e699a195edd92a55af5b8f6a (diff)
downloadchromium_src-359dfa3e661f583b6f564b6a14025fd0e2a6b669.zip
chromium_src-359dfa3e661f583b6f564b6a14025fd0e2a6b669.tar.gz
chromium_src-359dfa3e661f583b6f564b6a14025fd0e2a6b669.tar.bz2
Move ResourceDispatcherHostDelegate to content\public\common. I've added a set delegate function on ChildThread (which will soon be on content::ChildThread interface) so that we don't have to expose ResourceDispatcher to embedders.
BUG=98716 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=104832 Review URL: http://codereview.chromium.org/8224019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/resource_dispatcher.cc2
-rw-r--r--content/common/resource_dispatcher.h9
-rw-r--r--content/common/resource_dispatcher_delegate.cc27
-rw-r--r--content/common/resource_dispatcher_delegate.h30
4 files changed, 7 insertions, 61 deletions
diff --git a/content/common/resource_dispatcher.cc b/content/common/resource_dispatcher.cc
index d3f5185..29e3c05d 100644
--- a/content/common/resource_dispatcher.cc
+++ b/content/common/resource_dispatcher.cc
@@ -13,9 +13,9 @@
#include "base/shared_memory.h"
#include "base/string_util.h"
#include "content/common/request_extra_data.h"
-#include "content/common/resource_dispatcher_delegate.h"
#include "content/common/resource_messages.h"
#include "content/common/resource_response.h"
+#include "content/public/common/resource_dispatcher_delegate.h"
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/base/upload_data.h"
diff --git a/content/common/resource_dispatcher.h b/content/common/resource_dispatcher.h
index fd400fe..2200282 100644
--- a/content/common/resource_dispatcher.h
+++ b/content/common/resource_dispatcher.h
@@ -19,9 +19,12 @@
#include "ipc/ipc_channel.h"
#include "webkit/glue/resource_loader_bridge.h"
-class ResourceDispatcherDelegate;
struct ResourceResponseHead;
+namespace content {
+class ResourceDispatcherDelegate;
+}
+
// This class serves as a communication interface between the
// ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in
// the child process. It can be used from any child process.
@@ -61,7 +64,7 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Channel::Listener {
// 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) {
+ void set_delegate(content::ResourceDispatcherDelegate* delegate) {
delegate_ = delegate;
}
@@ -153,7 +156,7 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Channel::Listener {
ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_;
- ResourceDispatcherDelegate* delegate_;
+ content::ResourceDispatcherDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
};
diff --git a/content/common/resource_dispatcher_delegate.cc b/content/common/resource_dispatcher_delegate.cc
deleted file mode 100644
index 75776d5..0000000
--- a/content/common/resource_dispatcher_delegate.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/common/resource_dispatcher_delegate.h"
-
-ResourceDispatcherDelegate::ResourceDispatcherDelegate() {
-}
-
-ResourceDispatcherDelegate::~ResourceDispatcherDelegate() {
-}
-
-webkit_glue::ResourceLoaderBridge::Peer*
- ResourceDispatcherDelegate::OnRequestComplete(
- webkit_glue::ResourceLoaderBridge::Peer* current_peer,
- ResourceType::Type resource_type,
- const net::URLRequestStatus& status) {
- return NULL;
-}
-
-webkit_glue::ResourceLoaderBridge::Peer*
- ResourceDispatcherDelegate::OnReceivedResponse(
- webkit_glue::ResourceLoaderBridge::Peer* current_peer,
- const std::string& mime_type,
- const GURL& url) {
- return NULL;
-}
diff --git a/content/common/resource_dispatcher_delegate.h b/content/common/resource_dispatcher_delegate.h
deleted file mode 100644
index c19ed57..0000000
--- a/content/common/resource_dispatcher_delegate.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_COMMON_RESOURCE_DISPATCHER_DELEGATE_H_
-#define CONTENT_COMMON_RESOURCE_DISPATCHER_DELEGATE_H_
-#pragma once
-
-#include "content/common/content_export.h"
-#include "webkit/glue/resource_loader_bridge.h"
-
-// Interface that allows observing request events and optionally replacing the
-// peer.
-class CONTENT_EXPORT ResourceDispatcherDelegate {
- public:
- ResourceDispatcherDelegate();
- virtual ~ResourceDispatcherDelegate();
-
- virtual webkit_glue::ResourceLoaderBridge::Peer* OnRequestComplete(
- webkit_glue::ResourceLoaderBridge::Peer* current_peer,
- ResourceType::Type resource_type,
- const net::URLRequestStatus& status);
-
- virtual webkit_glue::ResourceLoaderBridge::Peer* OnReceivedResponse(
- webkit_glue::ResourceLoaderBridge::Peer* current_peer,
- const std::string& mime_type,
- const GURL& url);
-};
-
-#endif // CONTENT_COMMON_RESOURCE_DISPATCHER_DELEGATE_H_