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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 638133004: [Mac] The profile name field shouldn't be multi line because that's silly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" 7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h"
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 [[NSTextField alloc] initWithFrame:frameRect]); 635 [[NSTextField alloc] initWithFrame:frameRect]);
636 [profileNameTextField_ setStringValue:profileName]; 636 [profileNameTextField_ setStringValue:profileName];
637 [profileNameTextField_ setFont:[NSFont labelFontOfSize:kTitleFontSize]]; 637 [profileNameTextField_ setFont:[NSFont labelFontOfSize:kTitleFontSize]];
638 [profileNameTextField_ setEditable:YES]; 638 [profileNameTextField_ setEditable:YES];
639 [profileNameTextField_ setDrawsBackground:YES]; 639 [profileNameTextField_ setDrawsBackground:YES];
640 [profileNameTextField_ setBezeled:YES]; 640 [profileNameTextField_ setBezeled:YES];
641 [profileNameTextField_ setAlignment:NSCenterTextAlignment]; 641 [profileNameTextField_ setAlignment:NSCenterTextAlignment];
642 [[profileNameTextField_ cell] setWraps:NO]; 642 [[profileNameTextField_ cell] setWraps:NO];
643 [[profileNameTextField_ cell] setLineBreakMode: 643 [[profileNameTextField_ cell] setLineBreakMode:
644 NSLineBreakByTruncatingTail]; 644 NSLineBreakByTruncatingTail];
645 [[profileNameTextField_ cell] setUsesSingleLineMode:YES];
645 [self addSubview:profileNameTextField_]; 646 [self addSubview:profileNameTextField_];
646 [profileNameTextField_ setTarget:self]; 647 [profileNameTextField_ setTarget:self];
647 [profileNameTextField_ setAction:@selector(saveProfileName:)]; 648 [profileNameTextField_ setAction:@selector(saveProfileName:)];
648 649
649 // Hide the textfield until the user clicks on the button. 650 // Hide the textfield until the user clicks on the button.
650 [profileNameTextField_ setHidden:YES]; 651 [profileNameTextField_ setHidden:YES];
651 652
652 [[self cell] accessibilitySetOverrideValue:l10n_util::GetNSStringF( 653 [[self cell] accessibilitySetOverrideValue:l10n_util::GetNSStringF(
653 IDS_PROFILES_NEW_AVATAR_MENU_EDIT_NAME_ACCESSIBLE_NAME, 654 IDS_PROFILES_NEW_AVATAR_MENU_EDIT_NAME_ACCESSIBLE_NAME,
654 base::SysNSStringToUTF16(profileName)) 655 base::SysNSStringToUTF16(profileName))
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2204 } 2205 }
2205 2206
2206 - (bool)shouldShowGoIncognito { 2207 - (bool)shouldShowGoIncognito {
2207 bool incognitoAvailable = 2208 bool incognitoAvailable =
2208 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2209 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2209 IncognitoModePrefs::DISABLED; 2210 IncognitoModePrefs::DISABLED;
2210 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 2211 return incognitoAvailable && !browser_->profile()->IsGuestSession();
2211 } 2212 }
2212 2213
2213 @end 2214 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698