Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2232)

Unified Diff: chrome/browser/cocoa/sad_tab_view.mm

Issue 194101: Update the sadtab and throbbers to use the helpers for fetching strings/image... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/sad_tab_view.mm
===================================================================
--- chrome/browser/cocoa/sad_tab_view.mm (revision 26101)
+++ chrome/browser/cocoa/sad_tab_view.mm (working copy)
@@ -4,10 +4,11 @@
#include "chrome/browser/cocoa/sad_tab_view.h"
-#include "app/l10n_util.h"
+#include "app/l10n_util_mac.h"
+#include "app/resource_bundle.h"
#include "base/sys_string_conversions.h"
-#include "chrome/browser/cocoa/nsimage_cache.h"
#include "grit/generated_resources.h"
+#include "grit/theme_resources.h"
static const int kSadTabOffset = -64;
static const int kIconTitleSpacing = 20;
@@ -16,11 +17,11 @@
@implementation SadTabView
- (void)drawRect:(NSRect)dirtyRect {
- NSImage* sadTabImage = nsimage_cache::ImageNamed(@"sadtab.png");
- NSString* title =
- base::SysWideToNSString(l10n_util::GetString(IDS_SAD_TAB_TITLE));
- NSString* message =
- base::SysWideToNSString(l10n_util::GetString(IDS_SAD_TAB_MESSAGE));
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ NSImage* sadTabImage = rb.GetNSImageNamed(IDR_SAD_TAB);
+ DCHECK(sadTabImage);
+ NSString* title = l10n_util::GetNSStringWithFixup(IDS_SAD_TAB_TITLE);
+ NSString* message = l10n_util::GetNSStringWithFixup(IDS_SAD_TAB_MESSAGE);
NSColor* textColor = [NSColor whiteColor];
NSColor* backgroundColor = [NSColor colorWithCalibratedRed:(35.0f/255.0f)
« no previous file with comments | « no previous file | chrome/browser/cocoa/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698