| 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 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 signed_in) { | 1360 signed_in) { |
| 1361 viewMode_ = profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; | 1361 viewMode_ = profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT; |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 [window accessibilitySetOverrideValue: | 1364 [window accessibilitySetOverrideValue: |
| 1365 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 1365 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |
| 1366 forAttribute:NSAccessibilityTitleAttribute]; | 1366 forAttribute:NSAccessibilityTitleAttribute]; |
| 1367 [window accessibilitySetOverrideValue: | 1367 [window accessibilitySetOverrideValue: |
| 1368 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) | 1368 l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME) |
| 1369 forAttribute:NSAccessibilityHelpAttribute]; | 1369 forAttribute:NSAccessibilityHelpAttribute]; |
| 1370 | 1370 BOOL shouldUseLeadingEdgeForBubble = |
| 1371 cocoa_l10n_util::ShouldDoExperimentalRTLLayout() && |
| 1372 !cocoa_l10n_util::ShouldFlipWindowControlsInRTL(); |
| 1371 [[self bubble] | 1373 [[self bubble] |
| 1372 setAlignment:cocoa_l10n_util::ShouldFlipWindowControlsInRTL() | 1374 setAlignment:shouldUseLeadingEdgeForBubble |
| 1373 ? info_bubble::kAlignTrailingEdgeToAnchorEdge | 1375 ? info_bubble::kAlignLeadingEdgeToAnchorEdge |
| 1374 : info_bubble::kAlignLeadingEdgeToAnchorEdge]; | 1376 : info_bubble::kAlignTrailingEdgeToAnchorEdge]; |
| 1375 [[self bubble] setArrowLocation:info_bubble::kNoArrow]; | 1377 [[self bubble] setArrowLocation:info_bubble::kNoArrow]; |
| 1376 [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; | 1378 [[self bubble] setBackgroundColor:GetDialogBackgroundColor()]; |
| 1377 [self initMenuContentsWithView:viewMode_]; | 1379 [self initMenuContentsWithView:viewMode_]; |
| 1378 } | 1380 } |
| 1379 | 1381 |
| 1380 return self; | 1382 return self; |
| 1381 } | 1383 } |
| 1382 | 1384 |
| 1383 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay { | 1385 - (void)initMenuContentsWithView:(profiles::BubbleViewMode)viewToDisplay { |
| 1384 if (browser_->profile()->IsSupervised() && | 1386 if (browser_->profile()->IsSupervised() && |
| (...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2936 } | 2938 } |
| 2937 | 2939 |
| 2938 - (bool)shouldShowGoIncognito { | 2940 - (bool)shouldShowGoIncognito { |
| 2939 bool incognitoAvailable = | 2941 bool incognitoAvailable = |
| 2940 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2942 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 2941 IncognitoModePrefs::DISABLED; | 2943 IncognitoModePrefs::DISABLED; |
| 2942 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2944 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
| 2943 } | 2945 } |
| 2944 | 2946 |
| 2945 @end | 2947 @end |
| OLD | NEW |