diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 19:20:45 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 19:20:45 +0000 |
commit | 25ebbf4a2894b6b60350cf22740a0ba7ad9ee7c3 (patch) | |
tree | 49ff36ea57d4603ac6b77156150c942af162c6df /chrome/browser/cocoa/download_item_cell.mm | |
parent | 95fe32f45f41ffd496466bc938968cabae2bad59 (diff) | |
download | chromium_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_cell.mm')
-rw-r--r-- | chrome/browser/cocoa/download_item_cell.mm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/chrome/browser/cocoa/download_item_cell.mm b/chrome/browser/cocoa/download_item_cell.mm index 1d1793e..11179fd 100644 --- a/chrome/browser/cocoa/download_item_cell.mm +++ b/chrome/browser/cocoa/download_item_cell.mm @@ -102,7 +102,7 @@ NSTimeInterval kHideStatusDuration = 0.3; return self; } -// For programmatic instantiations +// For programmatic instantiations. - (id)initTextCell:(NSString *)string { if ((self = [super initTextCell:string])) { [self setInitialState]; @@ -118,15 +118,9 @@ NSTimeInterval kHideStatusDuration = 0.3; } - (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel { - // Set name and icon of download. + // Set the name of the download. downloadPath_ = downloadModel->download()->GetFileName(); - // TODO(paulg): Use IconManager for loading icons on the file thread - // (crbug.com/16226). - NSString* extension = base::SysUTF8ToNSString(downloadPath_.Extension()); - NSImage* icon = [[NSWorkspace sharedWorkspace] iconForFileType:extension]; - [self setImage:icon]; - std::wstring statusText = downloadModel->GetStatusText(); if (statusText.empty()) { // Remove the status text label. |