diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-13 03:26:13 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-13 03:26:13 +0000 |
commit | 15be81387f3ab40242d28f3ee53adc3d6a1fac1c (patch) | |
tree | 85ec956d20e07971d630aa1920eacdf73401347b /skia | |
parent | 969a7b97029963ba6c6dd1456132d844160b5ad0 (diff) | |
download | chromium_src-15be81387f3ab40242d28f3ee53adc3d6a1fac1c.zip chromium_src-15be81387f3ab40242d28f3ee53adc3d6a1fac1c.tar.gz chromium_src-15be81387f3ab40242d28f3ee53adc3d6a1fac1c.tar.bz2 |
Mac: Add favicons to task manager.
Pull NSImage cache out of search engine dialog into its own class, reuse that.
Implement browser icon code in task_manager_resource_provider's browser resource provider.
BUG=13156
TEST=Open task manager. You should see icons. Open search engine manager, should still show icons.
Review URL: http://codereview.chromium.org/549021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36087 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/skia_utils_mac.h | 3 | ||||
-rw-r--r-- | skia/ext/skia_utils_mac.mm | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/skia/ext/skia_utils_mac.h b/skia/ext/skia_utils_mac.h index 06cb151..5ecd451 100644 --- a/skia/ext/skia_utils_mac.h +++ b/skia/ext/skia_utils_mac.h @@ -62,6 +62,9 @@ SkBitmap NSImageToSkBitmap(NSImage* image, NSSize size, bool is_opaque); NSImage* SkBitmapToNSImage(const SkBitmap& icon); #endif +// Returns |[NSImage imageNamed:@"NSApplicationIcon"]| as SkBitmap. +SkBitmap AppplicationIconAtSize(int size); + } // namespace gfx #endif // SKIA_EXT_SKIA_UTILS_MAC_H_ diff --git a/skia/ext/skia_utils_mac.mm b/skia/ext/skia_utils_mac.mm index 0a08c75..3568d88 100644 --- a/skia/ext/skia_utils_mac.mm +++ b/skia/ext/skia_utils_mac.mm @@ -181,4 +181,9 @@ NSImage* SkBitmapToNSImage(const SkBitmap& skiaBitmap) { return image; } +SkBitmap AppplicationIconAtSize(int size) { + NSImage* image = [NSImage imageNamed:@"NSApplicationIcon"]; + return NSImageToSkBitmap(image, NSMakeSize(size, size), /* is_opaque=*/true); +} + } // namespace gfx |