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

Unified Diff: chrome/browser/instant/instant_loader.cc

Issue 7035015: Revert 85504 - Move download stuff to download tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/external_tab_container_win.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_loader.cc
===================================================================
--- chrome/browser/instant/instant_loader.cc (revision 85514)
+++ chrome/browser/instant/instant_loader.cc (working copy)
@@ -21,8 +21,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
-#include "chrome/browser/ui/download/download_tab_helper.h"
-#include "chrome/browser/ui/download/download_tab_helper_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
@@ -144,8 +142,7 @@
class InstantLoader::TabContentsDelegateImpl
: public TabContentsDelegate,
public NotificationObserver,
- public TabContentsObserver,
- public DownloadTabHelperDelegate {
+ public TabContentsObserver {
public:
explicit TabContentsDelegateImpl(InstantLoader* loader);
@@ -211,6 +208,7 @@
// instant result when the drag ends, so that during the drag the page won't
// move around.
virtual void DragEnded() OVERRIDE;
+ virtual bool CanDownload(int request_id) OVERRIDE;
virtual void HandleMouseUp() OVERRIDE;
virtual void HandleMouseActivate() OVERRIDE;
virtual bool OnGoToEntryOffset(int offset) OVERRIDE;
@@ -222,11 +220,6 @@
// TabContentsObserver:
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- // DownloadTabHelperDelegate:
- virtual bool CanDownload(int request_id) OVERRIDE;
- virtual void OnStartDownload(DownloadItem* download,
- TabContentsWrapper* tab) OVERRIDE;
-
private:
typedef std::vector<scoped_refptr<history::HistoryAddPageArgs> >
AddPageVector;
@@ -518,6 +511,11 @@
CommitFromMouseReleaseIfNecessary();
}
+bool InstantLoader::TabContentsDelegateImpl::CanDownload(int request_id) {
+ // Downloads are disabled.
+ return false;
+}
+
void InstantLoader::TabContentsDelegateImpl::HandleMouseUp() {
CommitFromMouseReleaseIfNecessary();
}
@@ -562,16 +560,6 @@
return handled;
}
-bool InstantLoader::TabContentsDelegateImpl::CanDownload(int request_id) {
- // Downloads are disabled.
- return false;
-}
-
-void InstantLoader::TabContentsDelegateImpl::OnStartDownload(
- DownloadItem* download, TabContentsWrapper* tab) {
- // Downloads are disabled.
-}
-
void InstantLoader::TabContentsDelegateImpl::OnSetSuggestions(
int32 page_id,
const std::vector<std::string>& suggestions,
@@ -822,7 +810,6 @@
#endif
}
preview_contents_->tab_contents()->set_delegate(NULL);
- preview_contents_->download_tab_helper()->set_delegate(NULL);
ready_ = false;
}
update_bounds_timer_.Stop();
@@ -985,7 +972,7 @@
if (preview_contents_.get() && is_showing_instant() &&
(force_if_waiting || !is_waiting_for_load())) {
last_omnibox_bounds_ = omnibox_bounds_;
- RenderViewHost* host = preview_contents_->render_view_host();
+ RenderViewHost*host = preview_contents_->render_view_host();
host->Send(new ViewMsg_SearchBoxResize(
host->routing_id(), GetOmniboxBoundsInTermsOfPreview()));
}
@@ -1006,8 +993,6 @@
preview_tab_contents_delegate_.reset(new TabContentsDelegateImpl(this));
new_contents->set_delegate(preview_tab_contents_delegate_.get());
- preview_contents_->download_tab_helper()->set_delegate(
- preview_tab_contents_delegate_.get());
gfx::Rect tab_bounds;
tab_contents->view()->GetContainerBounds(&tab_bounds);
« no previous file with comments | « chrome/browser/external_tab_container_win.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698