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

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

Issue 15297006: Translate (Linux): add after infobar UI for server side language detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renaming Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/strings/sys_string_conversions.h" 7 #include "base/strings/sys_string_conversions.h"
8 #import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h" 8 #import "chrome/browser/ui/cocoa/infobars/infobar_utilities.h"
9 9
10 using InfoBarUtilities::MoveControl; 10 using InfoBarUtilities::MoveControl;
11 using InfoBarUtilities::VerifyControlOrderAndSpacing; 11 using InfoBarUtilities::VerifyControlOrderAndSpacing;
12 12
13 @implementation AfterTranslateInfobarController 13 @implementation AfterTranslateInfobarController
14 14
15 - (void)loadLabelText { 15 - (void)loadLabelText {
16 std::vector<string16> strings; 16 std::vector<string16> strings;
17 TranslateInfoBarDelegate::GetAfterTranslateStrings( 17 TranslateInfoBarDelegate::GetAfterTranslateStrings(
18 &strings, &swappedLanugageButtons_); 18 &strings, &swappedLanugageButtons_, false);
19 DCHECK(strings.size() == 3U); 19 DCHECK(strings.size() == 3U);
20 NSString* string1 = base::SysUTF16ToNSString(strings[0]); 20 NSString* string1 = base::SysUTF16ToNSString(strings[0]);
21 NSString* string2 = base::SysUTF16ToNSString(strings[1]); 21 NSString* string2 = base::SysUTF16ToNSString(strings[1]);
22 NSString* string3 = base::SysUTF16ToNSString(strings[2]); 22 NSString* string3 = base::SysUTF16ToNSString(strings[2]);
23 23
24 [label1_ setStringValue:string1]; 24 [label1_ setStringValue:string1];
25 [label2_ setStringValue:string2]; 25 [label2_ setStringValue:string2];
26 [label3_ setStringValue:string3]; 26 [label3_ setStringValue:string3];
27 } 27 }
28 28
(...skipping 24 matching lines...) Expand all
53 showOriginalButton_.get(), nil]; 53 showOriginalButton_.get(), nil];
54 } 54 }
55 55
56 - (bool)verifyLayout { 56 - (bool)verifyLayout {
57 if ([optionsPopUp_ isHidden]) 57 if ([optionsPopUp_ isHidden])
58 return false; 58 return false;
59 return [super verifyLayout]; 59 return [super verifyLayout];
60 } 60 }
61 61
62 @end 62 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698