diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-13 02:48:59 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-13 02:48:59 +0000 |
commit | cdaa86594dcdd5fc4ccac5dbf63a5e4dbfcdb8ea (patch) | |
tree | c9e3f5a89a3d9733ea75b97153ef2be4e8425aa3 /chrome/browser/download/download_item_model.h | |
parent | 431838df78d6e3cd06794a45cf0243be32149c7c (diff) | |
download | chromium_src-cdaa86594dcdd5fc4ccac5dbf63a5e4dbfcdb8ea.zip chromium_src-cdaa86594dcdd5fc4ccac5dbf63a5e4dbfcdb8ea.tar.gz chromium_src-cdaa86594dcdd5fc4ccac5dbf63a5e4dbfcdb8ea.tar.bz2 |
Move the download code to new directories:
browser/download/
browser/views/
Review URL: http://codereview.chromium.org/2826
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_item_model.h')
-rw-r--r-- | chrome/browser/download/download_item_model.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/browser/download/download_item_model.h b/chrome/browser/download/download_item_model.h new file mode 100644 index 0000000..edeac1c --- /dev/null +++ b/chrome/browser/download/download_item_model.h @@ -0,0 +1,34 @@ +// 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_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H__ +#define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H__ + +#include "chrome/browser/views/download_item_view.h" + +class DownloadItem; + +// This class is a model class for DownloadItemView. It provides functionality +// for canceling the downloading, and also the text for displaying downloading +// status. +class DownloadItemModel : public DownloadItemView::BaseDownloadItemModel { + public: + DownloadItemModel(DownloadItem* download); + virtual ~DownloadItemModel() { } + + // Cancel the downloading. + virtual void CancelTask(); + + // Get downloading status text. + virtual std::wstring GetStatusText(); + + private: + // We query this item for status information. + DownloadItem* download_; + + DISALLOW_EVIL_CONSTRUCTORS(DownloadItemModel); +}; + +#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_MODEL_H__ + |