Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser/avatar_base_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/browser/avatar_base_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_base_controller.mm |
| index 85fa8b4faf5569fe713ffb3e3d1a8254d0c6890b..9d8b6eff77f3c85b113386e316c92eeea60d1f1c 100644 |
| --- a/chrome/browser/ui/cocoa/browser/avatar_base_controller.mm |
| +++ b/chrome/browser/ui/cocoa/browser/avatar_base_controller.mm |
| @@ -97,7 +97,8 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver { |
| return button_.get(); |
| } |
| -- (void)showAvatarBubble:(NSView*)anchor { |
| +- (void)showAvatarBubble:(NSView*)anchor |
| + mode:(BrowserWindow::AvatarBubbleMode)mode { |
| if (menuController_) |
| return; |
| @@ -117,9 +118,14 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver { |
| // |menuController_| will automatically release itself on close. |
| if (switches::IsNewProfileManagement()) { |
| + BubbleViewMode viewMode = |
| + mode == BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT ? |
| + PROFILE_CHOOSER_VIEW : |
| + ACCOUNT_MANAGEMENT_VIEW; |
| menuController_ = |
| - [[ProfileChooserController alloc] initWithBrowser:browser_ |
| - anchoredAt:point]; |
| + [[ProfileChooserController alloc] initWithBrowser:browser_ |
| + anchoredAt:point |
| + viewMode:viewMode]; |
|
Alexei Svitkine (slow)
2014/03/28 14:07:31
Nit: withMode:
guohui
2014/03/28 15:28:00
Done.
|
| } else { |
| menuController_ = |
| [[AvatarMenuBubbleController alloc] initWithBrowser:browser_ |
| @@ -138,7 +144,8 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver { |
| - (IBAction)buttonClicked:(id)sender { |
| DCHECK_EQ(sender, button_.get()); |
| - [self showAvatarBubble:button_]; |
| + [self showAvatarBubble:button_ |
| + mode:BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT]; |
| } |
| - (void)bubbleWillClose:(NSNotification*)notif { |