summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 00:39:50 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 00:39:50 +0000
commit1f43948cc3e6d925b268d77fdac3c873dd7bb23f (patch)
treecdabe50df446ad0be1e6fd7badc3b661d1a91572 /chrome
parent8ada5e06e95dd941314a0665da2948448fefa820 (diff)
downloadchromium_src-1f43948cc3e6d925b268d77fdac3c873dd7bb23f.zip
chromium_src-1f43948cc3e6d925b268d77fdac3c873dd7bb23f.tar.gz
chromium_src-1f43948cc3e6d925b268d77fdac3c873dd7bb23f.tar.bz2
Fix dock icon while downloading.
BUG=http://crbug.com/35791 TEST=paste on a new app icon, download something, switch between apps, app icon should always be right Review URL: http://codereview.chromium.org/646036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/cocoa/dock_icon.mm6
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/dock_icon.mm b/chrome/browser/cocoa/dock_icon.mm
index 56e432e..330b88a 100644
--- a/chrome/browser/cocoa/dock_icon.mm
+++ b/chrome/browser/cocoa/dock_icon.mm
@@ -41,10 +41,8 @@ static const float kBadgeIndent = 5.0f;
- (void)drawRect:(NSRect)dirtyRect {
// Not -[NSApplication applicationIconImage]; that fails to return a pasted
// custom icon.
- NSWorkspace* workspace = [NSWorkspace sharedWorkspace];
- NSString* appPath =
- [[workspace activeApplication] valueForKey:@"NSApplicationPath"];
- NSImage* appIcon = [workspace iconForFile:appPath];
+ NSString* appPath = [[NSBundle mainBundle] bundlePath];
+ NSImage* appIcon = [[NSWorkspace sharedWorkspace] iconForFile:appPath];
[appIcon drawInRect:[self bounds]
fromRect:NSZeroRect
operation:NSCompositeSourceOver