Chromium Code Reviews| Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| index f55258026ec657bf0ba3466211ae3fa8ea3bc099..a6d7e29d35a3e32746554cbcee6a7c3d0795a14d 100644 |
| --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| @@ -518,6 +518,18 @@ bool ProfileChooserView::IsShowing() { |
| } |
| // static |
| +ShowingType ProfileChooserView::IsShowingInBrowser(const Browser* browser) { |
| + if (profile_bubble_ == NULL) { |
| + return IS_NOT_SHOWING; |
| + } else { |
| + if (profile_bubble_->browser_ == browser || NULL == browser) |
|
Roger Tawa OOO till Jul 10th
2015/05/15 14:29:17
Use nullptr at lines 522 and 525, and the constant
gogerald1
2015/05/19 23:35:12
Done.
|
| + return IS_SHOWING; |
| + else |
| + return IS_SHOWING_IN_ANOTHER_BROWSER; |
| + } |
| +} |
| + |
| +// static |
| void ProfileChooserView::Hide() { |
| if (IsShowing()) |
| profile_bubble_->GetWidget()->Close(); |
| @@ -686,6 +698,15 @@ void ProfileChooserView::ShowView(profiles::BubbleViewMode view_to_display, |
| if (view_mode_ != profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) |
| tutorial_mode_ = profiles::TUTORIAL_MODE_NONE; |
| + if (view_mode_ == profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN || |
| + view_mode_ == profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT || |
| + view_mode_ == profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH || |
| + tutorial_mode_ == profiles::TUTORIAL_MODE_CONFIRM_SIGNIN) { |
| + profile_bubble_->set_close_on_deactivate(false); |
| + } else { |
| + profile_bubble_->set_close_on_deactivate(close_on_deactivate_for_testing_); |
| + } |
| + |
| layout->StartRow(1, 0); |
| layout->AddView(sub_view); |
| Layout(); |