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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 1963563002: Views: Flip default value of CustomButton::request_focus_on_press_ to false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/infobars/infobar_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index 6d2e02def860a2a502495972589d93a517b07ec7..e9d55c0f0c65f087e38c4faf3a7aec77654fdfd0 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -161,6 +161,7 @@ views::LabelButton* InfoBarView::CreateTextButton(
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
button->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont));
views::Button::ConfigureDefaultFocus(button);
+ button->set_request_focus_on_press(true);
button->SetTextColor(views::Button::STATE_NORMAL, GetInfobarTextColor());
button->SetTextColor(views::Button::STATE_HOVERED, GetInfobarTextColor());
return button;
@@ -275,10 +276,10 @@ void InfoBarView::ViewHierarchyChanged(
BarControlButton* close = new BarControlButton(this);
close->SetIcon(gfx::VectorIconId::BAR_CLOSE,
base::Bind(&GetInfobarTextColor));
- close->set_request_focus_on_press(false);
close_button_ = close;
} else {
close_button_ = new views::ImageButton(this);
+ close_button_->set_request_focus_on_press(true);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
close_button_->SetImage(views::CustomButton::STATE_NORMAL,
rb.GetImageNamed(IDR_CLOSE_1).ToImageSkia());
« no previous file with comments | « chrome/browser/ui/views/find_bar_view.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698