OLD | NEW |
| (Empty) |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_DOWNLOAD_ITEM_MODEL_H__ | |
6 #define CHROME_BROWSER_DOWNLOAD_ITEM_MODEL_H__ | |
7 | |
8 #include "chrome/browser/views/download_item_view.h" | |
9 | |
10 class DownloadItem; | |
11 | |
12 // This class is a model class for DownloadItemView. It provides functionality | |
13 // for canceling the downloading, and also the text for displaying downloading | |
14 // status. | |
15 class DownloadItemModel : public DownloadItemView::BaseDownloadItemModel { | |
16 public: | |
17 DownloadItemModel(DownloadItem* download); | |
18 virtual ~DownloadItemModel() { } | |
19 | |
20 // Cancel the downloading. | |
21 virtual void CancelTask(); | |
22 | |
23 // Get downloading status text. | |
24 virtual std::wstring GetStatusText(); | |
25 | |
26 private: | |
27 // We query this item for status information. | |
28 DownloadItem* download_; | |
29 | |
30 DISALLOW_EVIL_CONSTRUCTORS(DownloadItemModel); | |
31 }; | |
32 | |
33 #endif // CHROME_BROWSER_DOWNLOAD_ITEM_MODEL_H__ | |
34 | |
OLD | NEW |