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 "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
6 | 6 |
7 #import <Carbon/Carbon.h> // kVK_Return. | 7 #import <Carbon/Carbon.h> // kVK_Return. |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 } | 1224 } |
1225 | 1225 |
1226 [window accessibilitySetOverrideValue: | 1226 [window accessibilitySetOverrideValue: |
1227 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 1227 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |
1228 forAttribute:NSAccessibilityTitleAttribute]; | 1228 forAttribute:NSAccessibilityTitleAttribute]; |
1229 [window accessibilitySetOverrideValue: | 1229 [window accessibilitySetOverrideValue: |
1230 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 1230 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |
1231 forAttribute:NSAccessibilityHelpAttribute]; | 1231 forAttribute:NSAccessibilityHelpAttribute]; |
1232 | 1232 |
1233 [[self bubble] setAlignment:info_bubble::kAlignRightEdgeToAnchorEdge]; | 1233 [[self bubble] setAlignment:info_bubble::kAlignRightEdgeToAnchorEdge]; |
1234 [[self bubble] setArrowLocation:info_bubble::kNoArrow]; | 1234 [[self bubble] setArrowLocation:views::BubbleBorder::NONE]; |
1235 [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; | 1235 [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; |
1236 [self initMenuContentsWithView:viewMode_]; | 1236 [self initMenuContentsWithView:viewMode_]; |
1237 } | 1237 } |
1238 | 1238 |
1239 return self; | 1239 return self; |
1240 } | 1240 } |
1241 | 1241 |
1242 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay { | 1242 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay { |
1243 if (browser_->profile()->IsSupervised() && | 1243 if (browser_->profile()->IsSupervised() && |
1244 (viewToDisplay == profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT || | 1244 (viewToDisplay == profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT || |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 } | 2399 } |
2400 | 2400 |
2401 - (bool)shouldShowGoIncognito { | 2401 - (bool)shouldShowGoIncognito { |
2402 bool incognitoAvailable = | 2402 bool incognitoAvailable = |
2403 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2403 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
2404 IncognitoModePrefs::DISABLED; | 2404 IncognitoModePrefs::DISABLED; |
2405 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2405 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
2406 } | 2406 } |
2407 | 2407 |
2408 @end | 2408 @end |
OLD | NEW |