diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 19:58:03 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-07 19:58:03 +0000 |
commit | 45e3c12431d29fc90143a03b0b318f4cf2021b4e (patch) | |
tree | e1b4009b34c64f0d2d6d60200928241910e651e3 /chrome/browser/download/download_manager.cc | |
parent | d3278a9a559f409e717c70fa926bdd3f9f39e486 (diff) | |
download | chromium_src-45e3c12431d29fc90143a03b0b318f4cf2021b4e.zip chromium_src-45e3c12431d29fc90143a03b0b318f4cf2021b4e.tar.gz chromium_src-45e3c12431d29fc90143a03b0b318f4cf2021b4e.tar.bz2 |
Disables the download item on the download-shelf when the file is opened.
This is to mitigate against multiple clicks when a file takes some time to show anything to the user when opened (typically a setup.exe).
By changing the title and disabling the button, we indicate to the user that an action was taken.
BUG=7264
TEST=Download a file (image for example). In the download shelf, press the download item. The download item text should change to "Opening..." and it should be disabled (not responsive to clicks/drag and drops).
Review URL: http://codereview.chromium.org/58014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_manager.cc')
-rw-r--r-- | chrome/browser/download/download_manager.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index 34fe0cf..04c6aeb 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -187,6 +187,10 @@ void DownloadItem::UpdateObservers() { FOR_EACH_OBSERVER(Observer, observers_, OnDownloadUpdated(this)); } +void DownloadItem::NotifyObserversDownloadOpened() { + FOR_EACH_OBSERVER(Observer, observers_, OnDownloadOpened(this)); +} + // If we've received more data than we were expecting (bad server info?), revert // to 'unknown size mode'. void DownloadItem::UpdateSize(int64 bytes_so_far) { |