OLD | NEW |
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 Loading... |
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 |
OLD | NEW |