summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_item_controller.mm
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 19:20:45 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-22 19:20:45 +0000
commit25ebbf4a2894b6b60350cf22740a0ba7ad9ee7c3 (patch)
tree49ff36ea57d4603ac6b77156150c942af162c6df /chrome/browser/cocoa/download_item_controller.mm
parent95fe32f45f41ffd496466bc938968cabae2bad59 (diff)
downloadchromium_src-25ebbf4a2894b6b60350cf22740a0ba7ad9ee7c3.zip
chromium_src-25ebbf4a2894b6b60350cf22740a0ba7ad9ee7c3.tar.gz
chromium_src-25ebbf4a2894b6b60350cf22740a0ba7ad9ee7c3.tar.bz2
Load Mac download shelf icons asynchronously.
BUG=16226 (http://crbug.com/16226) TEST=none. Review URL: http://codereview.chromium.org/155831 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r--chrome/browser/cocoa/download_item_controller.mm7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm
index f5d2836..d00fd58 100644
--- a/chrome/browser/cocoa/download_item_controller.mm
+++ b/chrome/browser/cocoa/download_item_controller.mm
@@ -51,6 +51,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
- (void)awakeFromNib {
[self setStateFromDownload:bridge_->download_model()];
+ bridge_->LoadIcon();
}
- (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel {
@@ -58,7 +59,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
// (gratituous use of animation, special handling of dangerous downloads)
// that we don't currently do.
- // Set correct popup menu.
+ // Set the correct popup menu.
if (downloadModel->download()->state() == DownloadItem::COMPLETE)
currentMenu_ = completeDownloadMenu_;
else
@@ -68,6 +69,10 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
[cell_ setStateFromDownload:downloadModel];
}
+- (void)setIcon:(NSImage*)icon {
+ [cell_ setImage:icon];
+}
+
- (void)remove {
// We are deleted after this!
[shelf_ remove:self];