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

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

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 8 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 ae8637ffdbf6cc418150aea38205187c39a987ba..567700777bcb40eae7b19ccf2b46c02cc19bbc0d 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -160,7 +160,7 @@ views::LabelButton* InfoBarView::CreateTextButton(
button->set_animate_on_state_change(false);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
button->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont));
- button->SetFocusable(true);
+ button->SetFocusBehavior(FocusBehavior::ALWAYS);
button->SetTextColor(views::Button::STATE_NORMAL, GetInfobarTextColor());
button->SetTextColor(views::Button::STATE_HOVERED, GetInfobarTextColor());
return button;
@@ -289,7 +289,7 @@ void InfoBarView::ViewHierarchyChanged(
}
close_button_->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
- close_button_->SetFocusable(true);
+ close_button_->SetFocusBehavior(FocusBehavior::ALWAYS);
// Subclasses should already be done adding child views by this point (see
// related DCHECK in Layout()).
child_container_->AddChildView(close_button_);
« no previous file with comments | « chrome/browser/ui/views/ime/ime_window_view.cc ('k') | chrome/browser/ui/views/location_bar/bubble_icon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698