| Index: chrome/browser/ui/views/download/download_item_view.h
|
| diff --git a/chrome/browser/ui/views/download/download_item_view.h b/chrome/browser/ui/views/download/download_item_view.h
|
| index e454ce7f9dc83c874fdf1ad76ef97caeeb6494bb..b14dddcbc1dbc0546bf47a9e54f69e8d2f2445d2 100644
|
| --- a/chrome/browser/ui/views/download/download_item_view.h
|
| +++ b/chrome/browser/ui/views/download/download_item_view.h
|
| @@ -25,6 +25,7 @@
|
| #include "base/time.h"
|
| #include "base/timer.h"
|
| #include "chrome/browser/common/cancelable_request.h"
|
| +#include "chrome/browser/download/download_item_model.h"
|
| #include "chrome/browser/icon_manager.h"
|
| #include "content/public/browser/download_item.h"
|
| #include "content/public/browser/download_manager.h"
|
| @@ -34,7 +35,6 @@
|
| #include "ui/views/controls/button/button.h"
|
| #include "ui/views/view.h"
|
|
|
| -class DownloadItemModel;
|
| class DownloadShelfView;
|
| class DownloadShelfContextMenuView;
|
|
|
| @@ -59,8 +59,7 @@ class DownloadItemView : public views::ButtonListener,
|
| public ui::AnimationDelegate {
|
| public:
|
| DownloadItemView(content::DownloadItem* download,
|
| - DownloadShelfView* parent,
|
| - DownloadItemModel* model);
|
| + DownloadShelfView* parent);
|
| virtual ~DownloadItemView();
|
|
|
| // Timer callback for handling animations
|
| @@ -72,7 +71,7 @@ class DownloadItemView : public views::ButtonListener,
|
| void OnExtractIconComplete(gfx::Image* icon);
|
|
|
| // Returns the DownloadItem model object belonging to this item.
|
| - content::DownloadItem* download() const { return download_; }
|
| + content::DownloadItem* download() { return model_.download(); }
|
|
|
| // DownloadItem::Observer methods
|
| virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE;
|
| @@ -233,9 +232,6 @@ class DownloadItemView : public views::ButtonListener,
|
| // The warning icon showns for dangerous downloads.
|
| const gfx::ImageSkia* warning_icon_;
|
|
|
| - // The model we query for display information
|
| - content::DownloadItem* download_;
|
| -
|
| // The download shelf that owns us.
|
| DownloadShelfView* shelf_;
|
|
|
| @@ -283,10 +279,8 @@ class DownloadItemView : public views::ButtonListener,
|
| // For canceling an in progress icon request.
|
| CancelableTaskTracker cancelable_task_tracker_;
|
|
|
| - // A model class to control the status text we display and the cancel
|
| - // behavior.
|
| - // This class owns the pointer.
|
| - scoped_ptr<DownloadItemModel> model_;
|
| + // A model class to control the status text we display.
|
| + DownloadItemModel model_;
|
|
|
| // Hover animations for our body and drop buttons.
|
| scoped_ptr<ui::SlideAnimation> body_hover_animation_;
|
|
|