| 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 59aea6ac6e39f4e95b93043c69e60b4a6ca87760..a4b44c72f475d0979698f5fdc8553080609e14a7 100644
|
| --- a/chrome/browser/ui/views/frame/browser_view.cc
|
| +++ b/chrome/browser/ui/views/frame/browser_view.cc
|
| @@ -2554,20 +2554,38 @@ void BrowserView::ShowAvatarBubbleFromAvatarButton(
|
| // Do not show avatar bubble if there is no avatar menu button.
|
| if (!frame_->GetNewAvatarMenuButton())
|
| return;
|
| +
|
| 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);
|
| +
|
| + if (SigninViewController::ShouldShowModalSigninForMode(bubble_view_mode)) {
|
| + ShowModalSigninWindow(mode);
|
| + } else {
|
| + 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);
|
| + signin_view_controller_.ShowModalSignin(bubble_view_mode, browser());
|
| +}
|
| +
|
| +void BrowserView::CloseModalSigninWindow() {
|
| + signin_view_controller_.CloseModalSignin();
|
| +}
|
| +
|
| int BrowserView::GetRenderViewHeightInsetWithDetachedBookmarkBar() {
|
| if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED ||
|
| !bookmark_bar_view_ || !bookmark_bar_view_->IsDetached()) {
|
|
|