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

Side by Side Diff: chrome/browser/cocoa/theme_install_bubble_view.mm

Issue 361006: Switch theme loading to use its own string.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/gtk/theme_install_bubble_view_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/cocoa/theme_install_bubble_view.h" 7 #import "chrome/browser/cocoa/theme_install_bubble_view.h"
8 8
9 #include "app/l10n_util_mac.h" 9 #include "app/l10n_util_mac.h"
10 #include "base/scoped_nsobject.h" 10 #include "base/scoped_nsobject.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 ++view_->num_loads_extant_; 123 ++view_->num_loads_extant_;
124 else 124 else
125 view_ = new ThemeInstallBubbleView(window); 125 view_ = new ThemeInstallBubbleView(window);
126 } 126 }
127 127
128 @implementation ThemeInstallBubbleViewCocoa 128 @implementation ThemeInstallBubbleViewCocoa
129 129
130 - (id)init { 130 - (id)init {
131 self = [super initWithFrame:NSZeroRect]; 131 self = [super initWithFrame:NSZeroRect];
132 if (self) { 132 if (self) {
133 // Need our own copy of the "Loading..." string: http://crbug.com/24177
134 NSString* loadingString = 133 NSString* loadingString =
135 l10n_util::GetNSStringWithFixup(IDS_TAB_LOADING_TITLE); 134 l10n_util::GetNSStringWithFixup(IDS_THEME_LOADING_TITLE);
136 NSFont* loadingFont = [NSFont systemFontOfSize:kLoadingTextSize]; 135 NSFont* loadingFont = [NSFont systemFontOfSize:kLoadingTextSize];
137 NSColor* textColor = [NSColor whiteColor]; 136 NSColor* textColor = [NSColor whiteColor];
138 NSDictionary* loadingAttrs = [NSDictionary dictionaryWithObjectsAndKeys: 137 NSDictionary* loadingAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
139 loadingFont, NSFontAttributeName, 138 loadingFont, NSFontAttributeName,
140 textColor, NSForegroundColorAttributeName, 139 textColor, NSForegroundColorAttributeName,
141 nil]; 140 nil];
142 message_.reset([[NSAttributedString alloc] initWithString:loadingString 141 message_.reset([[NSAttributedString alloc] initWithString:loadingString
143 attributes:loadingAttrs]); 142 attributes:loadingAttrs]);
144 143
145 // TODO(avi): find a white-on-black spinner 144 // TODO(avi): find a white-on-black spinner
(...skipping 26 matching lines...) Expand all
172 171
173 [[[NSColor blackColor] colorWithAlphaComponent:kBubbleAlpha] set]; 172 [[[NSColor blackColor] colorWithAlphaComponent:kBubbleAlpha] set];
174 [[NSBezierPath bezierPathWithRoundedRect:grayRect_ 173 [[NSBezierPath bezierPathWithRoundedRect:grayRect_
175 xRadius:kBubbleCornerRadius 174 xRadius:kBubbleCornerRadius
176 yRadius:kBubbleCornerRadius] fill]; 175 yRadius:kBubbleCornerRadius] fill];
177 176
178 [message_.get() drawInRect:textRect_]; 177 [message_.get() drawInRect:textRect_];
179 } 178 }
180 179
181 @end 180 @end
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/gtk/theme_install_bubble_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698