summaryrefslogtreecommitdiffstats
path: root/chrome/browser/save_page_model.h
blob: ce373b3b2f9b22f7f16dae5d86b8c5fc038344db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_SAVE_PAGE_MODEL_H__
#define CHROME_BROWSER_SAVE_PAGE_MODEL_H__

#include "chrome/browser/views/download_item_view.h"

class DownloadItem;
class SavePackage;

// This class is a model class for DownloadItemView. It provides cancel
// functionality for saving page, and also the text for displaying saving
// status.
class SavePageModel : public DownloadItemView::BaseDownloadItemModel {
 public:
  SavePageModel(SavePackage* save, DownloadItem* download);
  virtual ~SavePageModel() { }

  // Cancel the page saving.
  virtual void CancelTask();

  // Get page saving status text.
  virtual std::wstring GetStatusText();

 private:
  // Saving page management.
  SavePackage* save_;

  // A fake download item for saving page use.
  DownloadItem* download_;

  DISALLOW_EVIL_CONSTRUCTORS(SavePageModel);
};

#endif  // CHROME_BROWSER_SAVE_PAGE_MODEL_H__