Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_view.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
| index 0b6e909a11af335dbf932bcae7bdca7dcbcfc525..367643af5693c7f8dfc427e2c8b54f4222fb1cc4 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view.cc |
| @@ -2528,18 +2528,38 @@ void BrowserView::ShowAvatarBubbleFromAvatarButton( |
| // Do not show avatar bubble if there is no avatar menu button. |
| if (!frame_->GetNewAvatarMenuButton()) |
| return; |
| + |
| + if (switches::UsePasswordSeparatedSigninFlow() && |
| + (mode == AVATAR_BUBBLE_MODE_SIGNIN || |
| + mode == AVATAR_BUBBLE_MODE_ADD_ACCOUNT || |
| + mode == AVATAR_BUBBLE_MODE_REAUTH)) { |
|
Roger Tawa OOO till Jul 10th
2015/11/11 19:34:30
Call SigninViewController::ShouldShowModalSigninFo
anthonyvd
2015/11/24 16:28:04
Missed that, thanks!
|
| + ShowModalSigninWindow(mode); |
| + } else { |
| + profiles::BubbleViewMode bubble_view_mode; |
| + profiles::TutorialMode tutorial_mode; |
| + profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, |
| + &tutorial_mode); |
| + ProfileChooserView::ShowBubble( |
| + bubble_view_mode, tutorial_mode, manage_accounts_params, |
| + frame_->GetNewAvatarMenuButton(), views::BubbleBorder::TOP_RIGHT, |
| + views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, browser()); |
| + ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
| + } |
| +#else |
| + NOTREACHED(); |
| +#endif |
| +} |
| + |
| +void BrowserView::ShowModalSigninWindow(AvatarBubbleMode mode) { |
| profiles::BubbleViewMode bubble_view_mode; |
| profiles::TutorialMode tutorial_mode; |
| profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, |
| &tutorial_mode); |
| - ProfileChooserView::ShowBubble( |
| - bubble_view_mode, tutorial_mode, manage_accounts_params, |
| - frame_->GetNewAvatarMenuButton(), views::BubbleBorder::TOP_RIGHT, |
| - views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, browser()); |
| - ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
| -#else |
| - NOTREACHED(); |
| -#endif |
| + signin_view_controller_.ShowModalSignin(bubble_view_mode, browser()); |
| +} |
| + |
| +void BrowserView::CloseModalSigninWindow() { |
| + signin_view_controller_.CloseModalSignin(); |
| } |
| int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() { |