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

Side by Side Diff: chrome/browser/ui/cocoa/translate/before_translate_infobar_controller.mm

Issue 7601028: [Mac] Polish the infobars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_controller.mm ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/cocoa/translate/before_translate_infobar_controller. h" 5 #include "chrome/browser/ui/cocoa/translate/before_translate_infobar_controller. h"
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 10
11 using TranslateInfoBarUtilities::MoveControl; 11 using TranslateInfoBarUtilities::MoveControl;
12 using TranslateInfoBarUtilities::VerifyControlOrderAndSpacing; 12 using TranslateInfoBarUtilities::VerifyControlOrderAndSpacing;
13 13
14 namespace { 14 namespace {
15 15
16 NSButton* CreateNSButtonWithResourceIDAndParameter( 16 NSButton* CreateNSButtonWithResourceIDAndParameter(
17 int resourceId, const string16& param) { 17 int resourceId, const string16& param) {
18 string16 title = l10n_util::GetStringFUTF16(resourceId, param); 18 string16 title = l10n_util::GetStringFUTF16(resourceId, param);
19 NSButton* button = [[NSButton alloc] init]; 19 NSButton* button = [[NSButton alloc] init];
20 [button setTitle:base::SysUTF16ToNSString(title)]; 20 [button setTitle:base::SysUTF16ToNSString(title)];
21 [button setBezelStyle:NSTexturedRoundedBezelStyle]; 21 [button setBezelStyle:NSTexturedRoundedBezelStyle];
22 // Round textured buttons have a different font size than the default button.
23 NSFont* font = [NSFont systemFontOfSize:
24 [NSFont systemFontSizeForControlSize:NSRegularControlSize]];
25 [[button cell] setFont:font];
22 return button; 26 return button;
23 } 27 }
24 28
25 } // namespace 29 } // namespace
26 30
27 @implementation BeforeTranslateInfobarController 31 @implementation BeforeTranslateInfobarController
28 32
29 - (id) initWithDelegate:(InfoBarDelegate *)delegate 33 - (id) initWithDelegate:(InfoBarDelegate *)delegate
30 owner:(TabContentsWrapper*)owner { 34 owner:(TabContentsWrapper*)owner {
31 if ((self = [super initWithDelegate:delegate owner:owner])) { 35 if ((self = [super initWithDelegate:delegate owner:owner])) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 @implementation BeforeTranslateInfobarController (TestingAPI) 119 @implementation BeforeTranslateInfobarController (TestingAPI)
116 120
117 - (NSButton*)alwaysTranslateButton { 121 - (NSButton*)alwaysTranslateButton {
118 return alwaysTranslateButton_.get(); 122 return alwaysTranslateButton_.get();
119 } 123 }
120 - (NSButton*)neverTranslateButton { 124 - (NSButton*)neverTranslateButton {
121 return neverTranslateButton_.get(); 125 return neverTranslateButton_.get();
122 } 126 }
123 127
124 @end 128 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698