summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 21:34:15 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 21:34:15 +0000
commitfde4a4ec799a96f6bba91c07cae01c73964d8bf0 (patch)
treedaf20b1955e13e4e2a88520c8c80e8006f9fefd0 /chrome/browser/download
parent4ea809e23e15b81ac87933b600d330b5ea908a2e (diff)
downloadchromium_src-fde4a4ec799a96f6bba91c07cae01c73964d8bf0.zip
chromium_src-fde4a4ec799a96f6bba91c07cae01c73964d8bf0.tar.gz
chromium_src-fde4a4ec799a96f6bba91c07cae01c73964d8bf0.tar.bz2
Make DownloadShelf a pure interface.
http://crbug.com/15474 TEST=none Review URL: http://codereview.chromium.org/149594 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_shelf.cc11
-rw-r--r--chrome/browser/download/download_shelf.h19
2 files changed, 2 insertions, 28 deletions
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index 1db9173..d3d6ade 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -15,17 +15,6 @@
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
-
-// DownloadShelf ---------------------------------------------------------------
-
-void DownloadShelf::ShowAllDownloads() {
- Profile* profile = browser_->profile();
- if (profile)
- UserMetrics::RecordAction(L"ShowDownloads", profile);
- browser_->OpenURL(GURL(chrome::kChromeUIDownloadsURL), GURL(),
- NEW_FOREGROUND_TAB, PageTransition::AUTO_BOOKMARK);
-}
-
// DownloadShelfContextMenu ----------------------------------------------------
DownloadShelfContextMenu::DownloadShelfContextMenu(
diff --git a/chrome/browser/download/download_shelf.h b/chrome/browser/download/download_shelf.h
index c0d3c09..61cae0e 100644
--- a/chrome/browser/download/download_shelf.h
+++ b/chrome/browser/download/download_shelf.h
@@ -14,24 +14,15 @@ class BaseDownloadItemModel;
class Browser;
class DownloadItem;
-// DownloadShelf is an interface for platform-specific download shelves to
-// implement. It also contains some shared logic. This class should not be
-// instantiated directly, but rather created via a call to Create().
-// It is a view object.
+// DownloadShelf is an interface for platform-specific download shelf views.
class DownloadShelf {
public:
- explicit DownloadShelf(Browser* browser)
- : browser_(browser) { DCHECK(browser_); }
-
virtual ~DownloadShelf() { }
// A new download has started, so add it to our shelf. This object will
// take ownership of |download_model|. Also make the shelf visible.
virtual void AddDownload(BaseDownloadItemModel* download_model) = 0;
- // Invoked when the user clicks the 'show all downloads' link button.
- void ShowAllDownloads();
-
// The browser view needs to know when we are going away to properly return
// the resize corner size to WebKit so that we don't draw on top of it.
// This returns the showing state of our animation which is set to true at
@@ -47,13 +38,7 @@ class DownloadShelf {
// Closes the shelf.
virtual void Close() = 0;
- Browser* browser() { return browser_; }
-
- protected:
- Browser* browser_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DownloadShelf);
+ virtual Browser* browser() const = 0;
};
// Logic for the download shelf context menu. Platform specific subclasses are