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

Side by Side Diff: chrome/browser/ui/cocoa/infobars/translate_message_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 | « chrome/browser/ui/cocoa/infobars/translate_infobar_base.mm ('k') | chrome/chrome_browser.gypi » ('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/translate_message_infobar_controller. h" 5 #include "chrome/browser/ui/cocoa/infobars/translate_message_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 11
11 @implementation TranslateMessageInfobarController 12 @implementation TranslateMessageInfobarController
12 13
13 - (void)layout { 14 - (void)layout {
14 [self removeOkCancelButtons]; 15 [self removeOkCancelButtons];
15 MoveControl( 16 MoveControl(
16 label1_, translateMessageButton_, spaceBetweenControls_ * 2, true); 17 label1_, translateMessageButton_, spaceBetweenControls_ * 2, true);
17 TranslateInfoBarDelegate* delegate = [self delegate]; 18 TranslateInfoBarDelegate* delegate = [self delegate];
18 if ([self delegate]->ShouldShowMessageInfoBarButton()) { 19 if ([self delegate]->ShouldShowMessageInfoBarButton()) {
19 string16 buttonText = delegate->GetMessageInfoBarButtonText(); 20 string16 buttonText = delegate->GetMessageInfoBarButtonText();
(...skipping 25 matching lines...) Expand all
45 if (![optionsPopUp_ isHidden]) 46 if (![optionsPopUp_ isHidden])
46 return false; 47 return false;
47 return [super verifyLayout]; 48 return [super verifyLayout];
48 } 49 }
49 50
50 - (BOOL)shouldShowOptionsPopUp { 51 - (BOOL)shouldShowOptionsPopUp {
51 return NO; 52 return NO;
52 } 53 }
53 54
54 @end 55 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/translate_infobar_base.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698