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