diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 00:35:02 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-28 00:35:02 +0000 |
commit | bcef0dc01dad3fff84f0c64389a0ead525181e55 (patch) | |
tree | 1d08ea6a05a2adbb44050715acde79771e442f88 /chrome/browser/download/download_item_model.h | |
parent | df9d0aa2e3feea5b71e1b3979ba6057238591fe3 (diff) | |
download | chromium_src-bcef0dc01dad3fff84f0c64389a0ead525181e55.zip chromium_src-bcef0dc01dad3fff84f0c64389a0ead525181e55.tar.gz chromium_src-bcef0dc01dad3fff84f0c64389a0ead525181e55.tar.bz2 |
Refactor download shelf and prepare for porting.
Side effect of removing some views dependencies from places they don't belong.
Review URL: http://codereview.chromium.org/28252
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_item_model.h')
-rw-r--r-- | chrome/browser/download/download_item_model.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/download/download_item_model.h b/chrome/browser/download/download_item_model.h index 8c7fe83..2638ccd 100644 --- a/chrome/browser/download/download_item_model.h +++ b/chrome/browser/download/download_item_model.h @@ -16,11 +16,19 @@ class SavePackage; // depending on the type of download. class BaseDownloadItemModel { public: + BaseDownloadItemModel(DownloadItem* download) : download_(download) { } + virtual ~BaseDownloadItemModel() { } + // Cancel the task corresponding to the item. virtual void CancelTask() = 0; // Get the status text to display. virtual std::wstring GetStatusText() = 0; + + DownloadItem* download() { return download_; } + + protected: + DownloadItem* download_; }; // This class is a model class for DownloadItemView. It provides functionality @@ -38,9 +46,6 @@ class DownloadItemModel : public BaseDownloadItemModel { virtual std::wstring GetStatusText(); private: - // We query this item for status information. - DownloadItem* download_; - DISALLOW_COPY_AND_ASSIGN(DownloadItemModel); }; @@ -62,9 +67,6 @@ class SavePageModel : public BaseDownloadItemModel { // Saving page management. SavePackage* save_; - // A fake download item for saving page use. - DownloadItem* download_; - DISALLOW_COPY_AND_ASSIGN(SavePageModel); }; |