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

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

Issue 10206024: Move TranslateInfoBarUtilities to a common place so that other infobars may reuse these helpers (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed avi's comments Created 8 years, 7 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
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/infobars/before_translate_infobar_controller.h " 5 #include "chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h "
6 6
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h"
8 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
10 11
11 using TranslateInfoBarUtilities::MoveControl; 12 using InfoBarUtilities::MoveControl;
12 using TranslateInfoBarUtilities::VerifyControlOrderAndSpacing; 13 using InfoBarUtilities::VerifyControlOrderAndSpacing;
13 14
14 namespace { 15 namespace {
15 16
16 NSButton* CreateNSButtonWithResourceIDAndParameter( 17 NSButton* CreateNSButtonWithResourceIDAndParameter(
17 int resourceId, const string16& param) { 18 int resourceId, const string16& param) {
18 string16 title = l10n_util::GetStringFUTF16(resourceId, param); 19 string16 title = l10n_util::GetStringFUTF16(resourceId, param);
19 NSButton* button = [[NSButton alloc] init]; 20 NSButton* button = [[NSButton alloc] init];
20 [button setTitle:base::SysUTF16ToNSString(title)]; 21 [button setTitle:base::SysUTF16ToNSString(title)];
21 [button setBezelStyle:NSTexturedRoundedBezelStyle]; 22 [button setBezelStyle:NSTexturedRoundedBezelStyle];
22 // Round textured buttons have a different font size than the default button. 23 // Round textured buttons have a different font size than the default button.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 @implementation BeforeTranslateInfobarController (TestingAPI) 130 @implementation BeforeTranslateInfobarController (TestingAPI)
130 131
131 - (NSButton*)alwaysTranslateButton { 132 - (NSButton*)alwaysTranslateButton {
132 return alwaysTranslateButton_.get(); 133 return alwaysTranslateButton_.get();
133 } 134 }
134 - (NSButton*)neverTranslateButton { 135 - (NSButton*)neverTranslateButton {
135 return neverTranslateButton_.get(); 136 return neverTranslateButton_.get();
136 } 137 }
137 138
138 @end 139 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698