summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 05:24:17 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 05:24:17 +0000
commit1bd0ef17d0ab01a5d4e9fd83fca7c1a70de2a1e7 (patch)
tree18712227a51950ce85727d24302201b7aa130acb
parent19e77fd71c503b4476b773f1ecd5e4c85da744c4 (diff)
downloadchromium_src-1bd0ef17d0ab01a5d4e9fd83fca7c1a70de2a1e7.zip
chromium_src-1bd0ef17d0ab01a5d4e9fd83fca7c1a70de2a1e7.tar.gz
chromium_src-1bd0ef17d0ab01a5d4e9fd83fca7c1a70de2a1e7.tar.bz2
Move ResourceDispatcherHostDelegate and DownloadManagerDelegate to /public/.
To avoid proliferation of folders, drop the /download/ and /render_host/ bits of those files' original paths when moving to /public/. BUG=98716 TEST=it builds Review URL: http://codereview.chromium.org/8352023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106456 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/download/chrome_download_manager_delegate.h4
-rw-r--r--chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h4
-rw-r--r--content/browser/download/download_file_manager.cc2
-rw-r--r--content/browser/download/download_item.cc2
-rw-r--r--content/browser/download/download_manager.cc6
-rw-r--r--content/browser/download/download_manager.h10
-rw-r--r--content/browser/download/mock_download_manager.h2
-rw-r--r--content/browser/download/mock_download_manager_delegate.h4
-rw-r--r--content/browser/download/save_package.cc2
-rw-r--r--content/browser/renderer_host/async_resource_handler.cc2
-rw-r--r--content/browser/renderer_host/buffered_resource_handler.cc2
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.cc2
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.h8
-rw-r--r--content/browser/renderer_host/sync_resource_handler.cc2
-rw-r--r--content/content_browser.gypi4
-rw-r--r--content/public/browser/download_manager_delegate.h (renamed from content/browser/download/download_manager_delegate.h)10
-rw-r--r--content/public/browser/resource_dispatcher_host_delegate.h (renamed from content/browser/renderer_host/resource_dispatcher_host_delegate.h)10
-rw-r--r--content/shell/shell_browser_context.h2
-rw-r--r--content/shell/shell_download_manager_delegate.h2
19 files changed, 44 insertions, 36 deletions
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
index 9d21fe6..0f87fa2 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.h
+++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -11,7 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/task.h"
-#include "content/browser/download/download_manager_delegate.h"
+#include "content/public/browser/download_manager_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -39,7 +39,7 @@ struct hash<CrxInstaller*> {
// This is the Chrome side helper for the download system.
class ChromeDownloadManagerDelegate
: public base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>,
- public DownloadManagerDelegate,
+ public content::DownloadManagerDelegate,
public content::NotificationObserver {
public:
explicit ChromeDownloadManagerDelegate(Profile* profile);
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h
index e2ab211..7a796a2 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h
@@ -8,7 +8,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "content/browser/renderer_host/resource_dispatcher_host_delegate.h"
+#include "content/public/browser/resource_dispatcher_host_delegate.h"
class DownloadRequestLimiter;
class ResourceDispatcherHost;
@@ -21,7 +21,7 @@ class PrerenderTracker;
// Implements ResourceDispatcherHostDelegate. Currently used by the Prerender
// system to abort requests and add to the load flags when a request begins.
class ChromeResourceDispatcherHostDelegate
- : public ResourceDispatcherHostDelegate {
+ : public content::ResourceDispatcherHostDelegate {
public:
// This class does not take ownership of the tracker but merely holds a
// reference to it to avoid accessing g_browser_process.
diff --git a/content/browser/download/download_file_manager.cc b/content/browser/download/download_file_manager.cc
index 9cab271..1444db3 100644
--- a/content/browser/download/download_file_manager.cc
+++ b/content/browser/download/download_file_manager.cc
@@ -13,10 +13,10 @@
#include "content/browser/download/download_file.h"
#include "content/browser/download/download_create_info.h"
#include "content/browser/download/download_manager.h"
-#include "content/browser/download/download_manager_delegate.h"
#include "content/browser/download/interrupt_reasons.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/download_manager_delegate.h"
#include "googleurl/src/gurl.h"
#include "net/base/io_buffer.h"
diff --git a/content/browser/download/download_item.cc b/content/browser/download/download_item.cc
index 2b048c4..249a1af 100644
--- a/content/browser/download/download_item.cc
+++ b/content/browser/download/download_item.cc
@@ -21,12 +21,12 @@
#include "content/browser/download/download_file_manager.h"
#include "content/browser/download/download_id.h"
#include "content/browser/download/download_manager.h"
-#include "content/browser/download/download_manager_delegate.h"
#include "content/browser/download/download_persistent_store_info.h"
#include "content/browser/download/download_request_handle.h"
#include "content/browser/download/download_stats.h"
#include "content/browser/download/interrupt_reasons.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/download_manager_delegate.h"
// A DownloadItem normally goes through the following states:
// * Created (when download starts)
diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc
index 7f31385..7797935 100644
--- a/content/browser/download/download_manager.cc
+++ b/content/browser/download/download_manager.cc
@@ -22,7 +22,6 @@
#include "content/browser/download/download_create_info.h"
#include "content/browser/download/download_file_manager.h"
#include "content/browser/download/download_item.h"
-#include "content/browser/download/download_manager_delegate.h"
#include "content/browser/download/download_persistent_store_info.h"
#include "content/browser/download/download_stats.h"
#include "content/browser/download/download_status_updater.h"
@@ -32,6 +31,7 @@
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/download_manager_delegate.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
@@ -59,7 +59,7 @@ void BeginDownload(
} // namespace
-DownloadManager::DownloadManager(DownloadManagerDelegate* delegate,
+DownloadManager::DownloadManager(content::DownloadManagerDelegate* delegate,
DownloadStatusUpdater* status_updater)
: shutdown_needed_(false),
browser_context_(NULL),
@@ -617,7 +617,7 @@ void DownloadManager::RemoveFromActiveList(DownloadItem* download) {
}
void DownloadManager::SetDownloadManagerDelegate(
- DownloadManagerDelegate* delegate) {
+ content::DownloadManagerDelegate* delegate) {
delegate_ = delegate;
}
diff --git a/content/browser/download/download_manager.h b/content/browser/download/download_manager.h
index 8d1a161..d746fa6 100644
--- a/content/browser/download/download_manager.h
+++ b/content/browser/download/download_manager.h
@@ -53,7 +53,6 @@
#include "net/base/net_errors.h"
class DownloadFileManager;
-class DownloadManagerDelegate;
class DownloadStatusUpdater;
class GURL;
class ResourceDispatcherHost;
@@ -63,6 +62,7 @@ struct DownloadSaveInfo;
namespace content {
class BrowserContext;
+class DownloadManagerDelegate;
}
// Browser's download manager: manages all downloads and destination view.
@@ -71,7 +71,7 @@ class CONTENT_EXPORT DownloadManager
BrowserThread::DeleteOnUIThread>,
public DownloadStatusUpdaterDelegate {
public:
- DownloadManager(DownloadManagerDelegate* delegate,
+ DownloadManager(content::DownloadManagerDelegate* delegate,
DownloadStatusUpdater* status_updater);
// Shutdown the download manager. Must be called before destruction.
@@ -297,11 +297,11 @@ class CONTENT_EXPORT DownloadManager
// yet in the history map.
DownloadItem* GetActiveDownloadItem(int id);
- DownloadManagerDelegate* delegate() const { return delegate_; }
+ content::DownloadManagerDelegate* delegate() const { return delegate_; }
// For testing only. May be called from tests indirectly (through
// other for testing only methods).
- void SetDownloadManagerDelegate(DownloadManagerDelegate* delegate);
+ void SetDownloadManagerDelegate(content::DownloadManagerDelegate* delegate);
private:
typedef std::set<DownloadItem*> DownloadSet;
@@ -431,7 +431,7 @@ class CONTENT_EXPORT DownloadManager
FilePath last_download_path_;
// Allows an embedder to control behavior. Guaranteed to outlive this object.
- DownloadManagerDelegate* delegate_;
+ content::DownloadManagerDelegate* delegate_;
// TODO(rdsmith): Remove when http://crbug.com/85408 is fixed.
// For debugging only.
diff --git a/content/browser/download/mock_download_manager.h b/content/browser/download/mock_download_manager.h
index 48689b5..b9d1e30b 100644
--- a/content/browser/download/mock_download_manager.h
+++ b/content/browser/download/mock_download_manager.h
@@ -13,7 +13,7 @@ class DownloadItem;
class MockDownloadManager : public DownloadManager {
public:
- explicit MockDownloadManager(DownloadManagerDelegate* delegate,
+ explicit MockDownloadManager(content::DownloadManagerDelegate* delegate,
DownloadStatusUpdater* updater)
: DownloadManager(delegate, updater) {
}
diff --git a/content/browser/download/mock_download_manager_delegate.h b/content/browser/download/mock_download_manager_delegate.h
index fc3f8f2..b2fbfc2 100644
--- a/content/browser/download/mock_download_manager_delegate.h
+++ b/content/browser/download/mock_download_manager_delegate.h
@@ -7,9 +7,9 @@
#pragma once
#include "base/compiler_specific.h"
-#include "content/browser/download/download_manager_delegate.h"
+#include "content/public/browser/download_manager_delegate.h"
-class MockDownloadManagerDelegate : public DownloadManagerDelegate {
+class MockDownloadManagerDelegate : public content::DownloadManagerDelegate {
public:
virtual ~MockDownloadManagerDelegate();
virtual void Shutdown() OVERRIDE;
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 6dc99bd..c36334c 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -23,7 +23,6 @@
#include "content/browser/download/download_file_manager.h"
#include "content/browser/download/download_item.h"
#include "content/browser/download/download_manager.h"
-#include "content/browser/download/download_manager_delegate.h"
#include "content/browser/download/save_file.h"
#include "content/browser/download/save_file_manager.h"
#include "content/browser/download/save_item.h"
@@ -34,6 +33,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/download_manager_delegate.h"
#include "content/public/common/url_constants.h"
#include "net/base/io_buffer.h"
#include "net/base/mime_util.h"
diff --git a/content/browser/renderer_host/async_resource_handler.cc b/content/browser/renderer_host/async_resource_handler.cc
index e74b3b2..235a569 100644
--- a/content/browser/renderer_host/async_resource_handler.cc
+++ b/content/browser/renderer_host/async_resource_handler.cc
@@ -14,13 +14,13 @@
#include "content/browser/host_zoom_map.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/renderer_host/resource_dispatcher_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/resource_message_filter.h"
#include "content/browser/resource_context.h"
#include "content/common/resource_response.h"
#include "content/common/resource_messages.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/base/net_log.h"
diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
index bda2a4c..590f9b32 100644
--- a/content/browser/renderer_host/buffered_resource_handler.cc
+++ b/content/browser/renderer_host/buffered_resource_handler.cc
@@ -14,12 +14,12 @@
#include "content/browser/download/download_resource_handler.h"
#include "content/browser/plugin_service.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/renderer_host/resource_dispatcher_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/x509_user_cert_resource_handler.h"
#include "content/browser/resource_context.h"
#include "content/common/resource_response.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "net/base/io_buffer.h"
#include "net/base/mime_sniffer.h"
#include "net/base/mime_util.h"
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index 626d310..4a6a057 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -40,7 +40,6 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_view_host_notification_task.h"
-#include "content/browser/renderer_host/resource_dispatcher_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/renderer_host/resource_message_filter.h"
@@ -55,6 +54,7 @@
#include "content/common/resource_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "net/base/auth.h"
diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h
index 86566ce..5f78c64 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.h
+++ b/content/browser/renderer_host/resource_dispatcher_host.h
@@ -35,7 +35,6 @@ class CrossSiteResourceHandler;
class DownloadFileManager;
class LoginHandler;
class PluginService;
-class ResourceDispatcherHostDelegate;
class ResourceDispatcherHostRequestInfo;
class ResourceHandler;
class ResourceMessageFilter;
@@ -50,6 +49,7 @@ struct ViewMsg_SwapOut_Params;
namespace content {
class ResourceContext;
+class ResourceDispatcherHostDelegate;
}
namespace net {
class CookieList;
@@ -265,10 +265,10 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate {
// This does not take ownership of the delegate. It is expected that the
// delegate have a longer lifetime than the ResourceDispatcherHost.
- void set_delegate(ResourceDispatcherHostDelegate* delegate) {
+ void set_delegate(content::ResourceDispatcherHostDelegate* delegate) {
delegate_ = delegate;
}
- ResourceDispatcherHostDelegate* delegate() {
+ content::ResourceDispatcherHostDelegate* delegate() {
return delegate_;
}
@@ -506,7 +506,7 @@ class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate {
// to the source of the message.
ResourceMessageFilter* filter_;
- ResourceDispatcherHostDelegate* delegate_;
+ content::ResourceDispatcherHostDelegate* delegate_;
static bool is_prefetch_enabled_;
bool allow_cross_origin_auth_prompt_;
diff --git a/content/browser/renderer_host/sync_resource_handler.cc b/content/browser/renderer_host/sync_resource_handler.cc
index 685bde3..e4a53fd 100644
--- a/content/browser/renderer_host/sync_resource_handler.cc
+++ b/content/browser/renderer_host/sync_resource_handler.cc
@@ -8,9 +8,9 @@
#include "content/browser/debugger/devtools_netlog_observer.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/renderer_host/resource_dispatcher_host_delegate.h"
#include "content/browser/renderer_host/resource_message_filter.h"
#include "content/common/resource_messages.h"
+#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "net/base/io_buffer.h"
#include "net/http/http_response_headers.h"
diff --git a/content/content_browser.gypi b/content/content_browser.gypi
index c90f834..771b0c7 100644
--- a/content/content_browser.gypi
+++ b/content/content_browser.gypi
@@ -119,7 +119,6 @@
'browser/download/download_item.h',
'browser/download/download_manager.cc',
'browser/download/download_manager.h',
- 'browser/download/download_manager_delegate.h',
'browser/download/download_persistent_store_info.cc',
'browser/download/download_persistent_store_info.h',
'browser/download/download_request_handle.cc',
@@ -424,7 +423,6 @@
'browser/renderer_host/render_widget_host_view_win.h',
'browser/renderer_host/resource_dispatcher_host.cc',
'browser/renderer_host/resource_dispatcher_host.h',
- 'browser/renderer_host/resource_dispatcher_host_delegate.h',
'browser/renderer_host/resource_dispatcher_host_login_delegate.cc',
'browser/renderer_host/resource_dispatcher_host_login_delegate.h',
'browser/renderer_host/resource_dispatcher_host_request_info.cc',
@@ -565,6 +563,7 @@
'browser/zygote_host_linux.h',
'browser/zygote_main_linux.cc',
'public/browser/content_browser_client.h',
+ 'public/browser/download_manager_delegate.h',
'public/browser/native_web_keyboard_event.h',
'public/browser/navigation_types.h',
'public/browser/notification_details.h',
@@ -574,6 +573,7 @@
'public/browser/notification_service.h',
'public/browser/notification_source.h',
'public/browser/notification_types.h',
+ 'public/browser/resource_dispatcher_host_delegate.h',
],
'conditions': [
['p2p_apis==1', {
diff --git a/content/browser/download/download_manager_delegate.h b/content/public/browser/download_manager_delegate.h
index 1f7c173..fbc9bd3 100644
--- a/content/browser/download/download_manager_delegate.h
+++ b/content/public/browser/download_manager_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_
-#define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_
+#ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
#pragma once
#include "base/basictypes.h"
@@ -15,6 +15,8 @@ class FilePath;
class TabContents;
class SavePackage;
+namespace content {
+
// Browser's download manager: manages all downloads and destination view.
class DownloadManagerDelegate {
public:
@@ -113,4 +115,6 @@ class DownloadManagerDelegate {
DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegate);
};
-#endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_DELEGATE_H_
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_DELEGATE_H_
diff --git a/content/browser/renderer_host/resource_dispatcher_host_delegate.h b/content/public/browser/resource_dispatcher_host_delegate.h
index 16440fd..232ae0f 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_delegate.h
+++ b/content/public/browser/resource_dispatcher_host_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
-#define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
+#ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
#pragma once
#include <string>
@@ -28,6 +28,8 @@ class SSLCertRequestInfo;
class URLRequest;
}
+namespace content {
+
// Interface that the embedder provides to ResourceDispatcherHost to allow
// observing and modifying requests.
class ResourceDispatcherHostDelegate {
@@ -120,4 +122,6 @@ class ResourceDispatcherHostDelegate {
virtual ~ResourceDispatcherHostDelegate() {}
};
-#endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
diff --git a/content/shell/shell_browser_context.h b/content/shell/shell_browser_context.h
index 595392e..c6471ee 100644
--- a/content/shell/shell_browser_context.h
+++ b/content/shell/shell_browser_context.h
@@ -13,7 +13,6 @@
#include "content/browser/browser_context.h"
class DownloadManager;
-class DownloadManagerDelegate;
class DownloadStatusUpdater;
class GeolocationPermissionContext;
class HostZoomMap;
@@ -21,6 +20,7 @@ class SSLHostState;
namespace content {
+class DownloadManagerDelegate;
class ResourceContext;
class ShellBrowserMainParts;
class ShellDownloadManagerDelegate;
diff --git a/content/shell/shell_download_manager_delegate.h b/content/shell/shell_download_manager_delegate.h
index 7d13cce..d49dd35 100644
--- a/content/shell/shell_download_manager_delegate.h
+++ b/content/shell/shell_download_manager_delegate.h
@@ -8,7 +8,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "content/browser/download/download_manager_delegate.h"
+#include "content/public/browser/download_manager_delegate.h"
class DownloadManager;
struct DownloadStateInfo;