diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 17:47:13 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 17:47:13 +0000 |
commit | f1d9428ecf3a598fb8bc86c9e1f8707dc6bd73cb (patch) | |
tree | 674b70edcb7ba1059d8a7d22d5d57fac501a850b /chrome/browser/download | |
parent | 03f57072cd19125c59fbc1d7c76f2856ca200850 (diff) | |
download | chromium_src-f1d9428ecf3a598fb8bc86c9e1f8707dc6bd73cb.zip chromium_src-f1d9428ecf3a598fb8bc86c9e1f8707dc6bd73cb.tar.gz chromium_src-f1d9428ecf3a598fb8bc86c9e1f8707dc6bd73cb.tar.bz2 |
Revert 52336 - More header cleanup:
- Some cleanup to url_request.h
- Remove task.h from headers that don't need it.
- Remove histogram.h from message_loop.h
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2986002
TBR=erg@chromium.org
Review URL: http://codereview.chromium.org/2969006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_util.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/download/download_util.h b/chrome/browser/download/download_util.h index 6ee8f89..dee3600 100644 --- a/chrome/browser/download/download_util.h +++ b/chrome/browser/download/download_util.h @@ -11,6 +11,7 @@ #include <string> #include "base/basictypes.h" +#include "base/task.h" #include "gfx/native_widget_types.h" #if defined(TOOLKIT_VIEWS) @@ -29,6 +30,23 @@ class SkBitmap; namespace download_util { +// DownloadProgressTask -------------------------------------------------------- + +// A class for managing the timed progress animations for a download view. The +// view must implement an UpdateDownloadProgress() method. +template<class DownloadView> +class DownloadProgressTask : public Task { + public: + explicit DownloadProgressTask(DownloadView* view) : view_(view) {} + virtual ~DownloadProgressTask() {} + virtual void Run() { + view_->UpdateDownloadProgress(); + } + private: + DownloadView* view_; + DISALLOW_COPY_AND_ASSIGN(DownloadProgressTask); +}; + // Download opening ------------------------------------------------------------ // Whether it is OK to open this download. |