Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7176)

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 1226093005: Give ProfileChooserView signin button focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d1945be97a86dc5fc214a8f77426e6823344af9e..4636f5838fb459c515ab791e262fee48e559edb5 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -508,6 +508,13 @@ void ProfileChooserView::ShowBubble(
profile_bubble_->set_close_on_deactivate(close_on_deactivate_for_testing_);
profile_bubble_->SetAlignment(border_alignment);
profile_bubble_->GetWidget()->Show();
+ // On first showing the bubble, focus the signin button. This needs to be
+ // done here, since the first call to ShowView() happens before the view's
+ // FocusManager has been created.
+ if (view_mode == profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER &&
+ profile_bubble_->signin_current_profile_link_) {
+ profile_bubble_->signin_current_profile_link_->RequestFocus();
msw 2015/07/13 20:06:22 Make ProfileChooserView override WidgetDelegate's
wjmaclean 2015/07/13 21:11:40 Done.
+ }
profile_bubble_->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
}

Powered by Google App Engine
This is Rietveld 408576698