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