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

Unified Diff: ui/message_center/views/notifier_settings_view.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: ui/message_center/views/notifier_settings_view.cc
diff --git a/ui/message_center/views/notifier_settings_view.cc b/ui/message_center/views/notifier_settings_view.cc
index 65b94444bfe4e60b189a8a218f239ca62c3ba89c..b10460f3caa79fda71be692e4d66a3d4e136ead8 100644
--- a/ui/message_center/views/notifier_settings_view.cc
+++ b/ui/message_center/views/notifier_settings_view.cc
@@ -299,7 +299,7 @@ NotifierSettingsView::NotifierButton::NotifierButton(
checkbox_->SetChecked(notifier_->enabled);
checkbox_->set_listener(this);
- checkbox_->SetFocusable(false);
+ checkbox_->SetFocusBehavior(views::View::FocusBehavior::NEVER);
checkbox_->SetAccessibleName(notifier_->name);
if (ShouldHaveLearnMoreButton()) {
@@ -307,7 +307,7 @@ NotifierSettingsView::NotifierButton::NotifierButton(
learn_more_ = new views::ImageButton(this);
learn_more_->SetFocusPainter(CreateFocusPainter());
learn_more_->set_request_focus_on_press(false);
- learn_more_->SetFocusable(true);
+ views::Button::ConfigureDefaultFocus(learn_more_);
ui::ResourceBundle& rb = ResourceBundle::GetSharedInstance();
learn_more_->SetImage(
@@ -477,7 +477,7 @@ NotifierSettingsView::NotifierSettingsView(NotifierSettingsProvider* provider)
if (provider_)
provider_->AddObserver(this);
- SetFocusable(true);
+ SetFocusBehavior(FocusBehavior::ALWAYS);
set_background(
views::Background::CreateSolidBackground(kMessageCenterBackgroundColor));
SetPaintToLayer(true);
@@ -583,7 +583,8 @@ void NotifierSettingsView::UpdateContentsView(
new views::LabelButtonAssetBorder(views::Button::STYLE_BUTTON)));
notifier_group_selector_->SetFocusPainter(nullptr);
notifier_group_selector_->set_animate_on_state_change(false);
- notifier_group_selector_->SetFocusable(true);
+
+ views::Button::ConfigureDefaultFocus(notifier_group_selector_);
contents_title_view->AddChildView(notifier_group_selector_);
}
@@ -609,7 +610,7 @@ void NotifierSettingsView::UpdateContentsView(
settings::kEntrySeparatorColor);
}
entry->SetBorder(std::move(entry_border));
- entry->SetFocusable(true);
+ entry->SetFocusBehavior(views::View::FocusBehavior::ALWAYS);
contents_view->AddChildView(entry);
buttons_.insert(button);
}

Powered by Google App Engine
This is Rietveld 408576698