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

Unified Diff: chrome/browser/download/download_shelf.cc

Issue 115740: Move download shelf from per-tab to per-window (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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/download/download_shelf.h ('k') | chrome/browser/download/download_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_shelf.cc
===================================================================
--- chrome/browser/download/download_shelf.cc (revision 17483)
+++ chrome/browser/download/download_shelf.cc (working copy)
@@ -6,11 +6,11 @@
#include "app/l10n_util.h"
#include "base/file_util.h"
+#include "chrome/browser/browser.h"
#include "chrome/browser/dom_ui/downloads_ui.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/metrics/user_metrics.h"
-#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
@@ -22,19 +22,13 @@
// DownloadShelf ---------------------------------------------------------------
void DownloadShelf::ShowAllDownloads() {
- Profile* profile = tab_contents_->profile();
+ Profile* profile = browser_->profile();
if (profile)
UserMetrics::RecordAction(L"ShowDownloads", profile);
- tab_contents_->OpenURL(GURL(chrome::kChromeUIDownloadsURL), GURL(),
- SINGLETON_TAB, PageTransition::AUTO_BOOKMARK);
+ browser_->OpenURL(GURL(chrome::kChromeUIDownloadsURL), GURL(),
+ NEW_FOREGROUND_TAB, PageTransition::AUTO_BOOKMARK);
}
-void DownloadShelf::ChangeTabContents(TabContents* old_contents,
- TabContents* new_contents) {
- DCHECK(old_contents == tab_contents_);
- tab_contents_ = new_contents;
-}
-
// DownloadShelfContextMenu ----------------------------------------------------
DownloadShelfContextMenu::DownloadShelfContextMenu(
« no previous file with comments | « chrome/browser/download/download_shelf.h ('k') | chrome/browser/download/download_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698