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

Unified Diff: chrome/browser/prerender/prerender_contents.h

Issue 7004039: Cancel downloads earlier when prerendering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove outdated comment 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
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_contents.h
===================================================================
--- chrome/browser/prerender/prerender_contents.h (revision 86082)
+++ chrome/browser/prerender/prerender_contents.h (working copy)
@@ -15,6 +15,7 @@
#include "chrome/browser/prerender/prerender_render_view_host_observer.h"
#include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
#include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
+#include "chrome/browser/ui/download/download_tab_helper_delegate.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
#include "content/common/notification_registrar.h"
@@ -51,7 +52,8 @@
public RenderViewHostDelegate::View,
public NotificationObserver,
public TabContentsObserver,
- public JavaScriptAppModalDialogDelegate {
+ public JavaScriptAppModalDialogDelegate,
+ public DownloadTabHelperDelegate {
public:
// PrerenderContents::Create uses the currently registered Factory to create
// the PrerenderContents. Factory is intended for testing.
@@ -218,6 +220,11 @@
virtual void RendererUnresponsive(RenderViewHost* render_view_host,
bool is_during_unload) OVERRIDE;
+ // DownloadTabHelperDelegate implementation.
+ virtual bool CanDownload(int request_id) OVERRIDE;
+ virtual void OnStartDownload(DownloadItem* download,
+ TabContentsWrapper* tab) OVERRIDE;
+
// Adds an alias URL, for one of the many redirections. If the URL can not
// be prerendered - for example, it's an ftp URL - |this| will be destroyed
// and false is returned. Otherwise, true is returned and the alias is
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698