Chromium Code Reviews| Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
| index cbdbc703cd1c1592f58d667de3fac489f5371169..036c82d0d47bffa626bcc08196a7c186ff5e6fea 100644 |
| --- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
| +++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm |
| @@ -1198,6 +1198,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
| subView = [self buildSwitchUserView]; |
| break; |
| case profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER: |
| + case profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER: |
| case profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT: |
| subView = [self buildProfileChooserView]; |
| break; |
| @@ -1265,19 +1266,22 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
| // overlap the bubble's rounded corners. |
| CGFloat yOffset = 1; |
| - // Option buttons. |
| - NSRect rect = NSMakeRect(0, yOffset, kFixedMenuWidth, 0); |
| - NSView* optionsView = [self createOptionsViewWithRect:rect |
| - displayLock:displayLock]; |
| - [container addSubview:optionsView]; |
| - rect.origin.y = NSMaxY([optionsView frame]); |
| + if(viewMode_ != profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER) { |
|
Alexei Svitkine (slow)
2015/02/02 17:22:31
Space after if
anthonyvd
2015/02/03 21:53:20
Done.
|
| + // Option buttons. |
| + NSRect rect = NSMakeRect(0, yOffset, kFixedMenuWidth, 0); |
| + NSView* optionsView = [self createOptionsViewWithRect:rect |
| + displayLock:displayLock]; |
| + [container addSubview:optionsView]; |
| + rect.origin.y = NSMaxY([optionsView frame]); |
| - NSBox* separator = [self horizontalSeparatorWithFrame:rect]; |
| - [container addSubview:separator]; |
| - yOffset = NSMaxY([separator frame]); |
| + NSBox* separator = [self horizontalSeparatorWithFrame:rect]; |
| + [container addSubview:separator]; |
| + yOffset = NSMaxY([separator frame]); |
| + } |
| - if (viewMode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER && |
| - switches::IsFastUserSwitching()) { |
| + if ((viewMode_ == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER && |
| + switches::IsFastUserSwitching()) || |
|
Alexei Svitkine (slow)
2015/02/02 17:22:30
Nit: Align with viewMode_ above.
anthonyvd
2015/02/03 21:53:20
Done.
|
| + viewMode_ == profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER) { |
| // Other profiles switcher. The profiles have already been sorted |
| // by their y-coordinate, so they can be added in the existing order. |
| for (NSView *otherProfileView in otherProfiles.get()) { |
| @@ -1320,14 +1324,16 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver, |
| } |
| // Active profile card. |
| - if (currentProfileView) { |
| + if (viewMode_ != profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER && |
|
Alexei Svitkine (slow)
2015/02/02 17:22:31
Nit: Maybe make a BOOL local variable isFastProfil
anthonyvd
2015/02/03 21:53:20
Done.
|
| + currentProfileView) { |
| yOffset += kVerticalSpacing; |
| [currentProfileView setFrameOrigin:NSMakePoint(0, yOffset)]; |
| [container addSubview:currentProfileView]; |
| yOffset = NSMaxY([currentProfileView frame]) + kVerticalSpacing; |
| } |
| - if (tutorialView) { |
| + if (viewMode_ != profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER && |
| + tutorialView) { |
| [tutorialView setFrameOrigin:NSMakePoint(0, yOffset)]; |
| [container addSubview:tutorialView]; |
| yOffset = NSMaxY([tutorialView frame]); |