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 e27975e4e2799de4a67934389db6ca079b1c9209..aa06f2d6a52ce3eaa0eb43bc9b5ab49d90f6a21a 100644 |
| --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
| @@ -508,6 +508,11 @@ void ProfileChooserView::ShowBubble( |
| views::BubbleDelegateView::CreateBubble(profile_bubble_); |
| profile_bubble_->set_close_on_deactivate(close_on_deactivate_for_testing_); |
| profile_bubble_->SetAlignment(border_alignment); |
| + profile_bubble_->initially_focused_view_ = |
|
msw
2015/07/13 21:37:30
Why is this controlled here? Let ProfileChooserVie
wjmaclean
2015/07/14 12:26:18
Done.
|
| + (view_mode == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER) |
|
msw
2015/07/13 21:37:30
I don't think there's a need for this conditional
wjmaclean
2015/07/14 12:26:18
Done.
|
| + ? profile_bubble_->signin_current_profile_link_ |
| + : nullptr; |
| + profile_bubble_->GetWidget()->set_focus_on_creation(true); |
|
msw
2015/07/13 21:37:30
Why is this needed? The button should be focused o
wjmaclean
2015/07/14 12:26:18
Done.
|
| profile_bubble_->GetWidget()->Show(); |
| profile_bubble_->SetArrowPaintType(views::BubbleBorder::PAINT_NONE); |
| } |
| @@ -543,6 +548,7 @@ ProfileChooserView::ProfileChooserView(views::View* anchor_view, |
| signin::GAIAServiceType service_type) |
| : BubbleDelegateView(anchor_view, arrow), |
| browser_(browser), |
| + initially_focused_view_(nullptr), |
| view_mode_(view_mode), |
| tutorial_mode_(tutorial_mode), |
| gaia_service_type_(service_type) { |
| @@ -737,6 +743,10 @@ bool ProfileChooserView::AcceleratorPressed( |
| return true; |
| } |
| +views::View* ProfileChooserView::GetInitiallyFocusedView() { |
| + return initially_focused_view_; |
| +} |
| + |
| bool ProfileChooserView::HandleContextMenu( |
| const content::ContextMenuParams& params) { |
| // Suppresses the context menu because some features, such as inspecting |