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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/after_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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm » ('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) 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/after_translate_infobar_controller.h" 5 #include "chrome/browser/ui/cocoa/infobars/after_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 9
9 using TranslateInfoBarUtilities::MoveControl; 10 using InfoBarUtilities::MoveControl;
10 using TranslateInfoBarUtilities::VerifyControlOrderAndSpacing; 11 using InfoBarUtilities::VerifyControlOrderAndSpacing;
11 12
12 @implementation AfterTranslateInfobarController 13 @implementation AfterTranslateInfobarController
13 14
14 - (void)loadLabelText { 15 - (void)loadLabelText {
15 std::vector<string16> strings; 16 std::vector<string16> strings;
16 TranslateInfoBarDelegate::GetAfterTranslateStrings( 17 TranslateInfoBarDelegate::GetAfterTranslateStrings(
17 &strings, &swappedLanugageButtons_); 18 &strings, &swappedLanugageButtons_);
18 DCHECK(strings.size() == 3U); 19 DCHECK(strings.size() == 3U);
19 NSString* string1 = base::SysUTF16ToNSString(strings[0]); 20 NSString* string1 = base::SysUTF16ToNSString(strings[0]);
20 NSString* string2 = base::SysUTF16ToNSString(strings[1]); 21 NSString* string2 = base::SysUTF16ToNSString(strings[1]);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 showOriginalButton_.get(), nil]; 53 showOriginalButton_.get(), nil];
53 } 54 }
54 55
55 - (bool)verifyLayout { 56 - (bool)verifyLayout {
56 if ([optionsPopUp_ isHidden]) 57 if ([optionsPopUp_ isHidden])
57 return false; 58 return false;
58 return [super verifyLayout]; 59 return [super verifyLayout];
59 } 60 }
60 61
61 @end 62 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698