| 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_SAVE_PAGE_MODEL_H__ | |
| 6 #define CHROME_BROWSER_SAVE_PAGE_MODEL_H__ | |
| 7 | |
| 8 #include "chrome/browser/views/download_item_view.h" | |
| 9 | |
| 10 class DownloadItem; | |
| 11 class SavePackage; | |
| 12 | |
| 13 // This class is a model class for DownloadItemView. It provides cancel | |
| 14 // functionality for saving page, and also the text for displaying saving | |
| 15 // status. | |
| 16 class SavePageModel : public DownloadItemView::BaseDownloadItemModel { | |
| 17 public: | |
| 18 SavePageModel(SavePackage* save, DownloadItem* download); | |
| 19 virtual ~SavePageModel() { } | |
| 20 | |
| 21 // Cancel the page saving. | |
| 22 virtual void CancelTask(); | |
| 23 | |
| 24 // Get page saving status text. | |
| 25 virtual std::wstring GetStatusText(); | |
| 26 | |
| 27 private: | |
| 28 // Saving page management. | |
| 29 SavePackage* save_; | |
| 30 | |
| 31 // A fake download item for saving page use. | |
| 32 DownloadItem* download_; | |
| 33 | |
| 34 DISALLOW_EVIL_CONSTRUCTORS(SavePageModel); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_SAVE_PAGE_MODEL_H__ | |
| 38 | |
| OLD | NEW |