summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/sad_tab_view.mm
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 20:59:32 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-09 20:59:32 +0000
commit655345e0991a974109e0f2656f6e00afbe8d9e59 (patch)
tree7fcca7714b4957f9efed3496e863c4f15b48941a /chrome/browser/cocoa/sad_tab_view.mm
parent5ce8cbcbf65f801bc7f52cc035027d0eb907add5 (diff)
downloadchromium_src-655345e0991a974109e0f2656f6e00afbe8d9e59.zip
chromium_src-655345e0991a974109e0f2656f6e00afbe8d9e59.tar.gz
chromium_src-655345e0991a974109e0f2656f6e00afbe8d9e59.tar.bz2
Added an helper namespace that provides fetches images from the app bundle and caches them, line NSImage imageNamed: but lets us control the bundle that's checked.
Unittest for the helper. Updated the current places that use +[NSImage imageNamed:] to use our cache helper. BUG=none TEST=All the ui images still load. Review URL: http://codereview.chromium.org/149393 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/sad_tab_view.mm')
-rw-r--r--chrome/browser/cocoa/sad_tab_view.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/sad_tab_view.mm b/chrome/browser/cocoa/sad_tab_view.mm
index 78d4793..a6ae4a9 100644
--- a/chrome/browser/cocoa/sad_tab_view.mm
+++ b/chrome/browser/cocoa/sad_tab_view.mm
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/sys_string_conversions.h"
+#include "chrome/browser/cocoa/nsimage_cache.h"
#include "grit/generated_resources.h"
static const int kSadTabOffset = -64;
@@ -15,7 +16,7 @@ static const int kTitleMessageSpacing = 15;
@implementation SadTabView
- (void)drawRect:(NSRect)dirtyRect {
- NSImage* sadTabImage = [NSImage imageNamed:@"sadtab"];
+ NSImage* sadTabImage = nsimage_cache::ImageNamed(@"sadtab.png");
NSString* title =
base::SysWideToNSString(l10n_util::GetString(IDS_SAD_TAB_TITLE));
NSString* message =