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

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: Undo unrelated changes. 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
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 a804f4b5404e629b25ff184b071240cd228e1cca..8d1a26fa710b7c7a6435813914e4966767972c0c 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());

Powered by Google App Engine
This is Rietveld 408576698