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

Unified Diff: ui/views/style/platform_style_mac.cc

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix FocusManagerTest.StoreFocusedView Created 4 years, 10 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/views/style/platform_style_mac.cc
diff --git a/ui/views/style/platform_style_mac.cc b/ui/views/style/platform_style_mac.cc
index f1038d87842aeeea13a344d82c013f46914ee84a..92531b7bc3fcc384768436c0e8647843ea023251 100644
--- a/ui/views/style/platform_style_mac.cc
+++ b/ui/views/style/platform_style_mac.cc
@@ -19,4 +19,13 @@ scoped_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
return make_scoped_ptr(new LabelButtonAssetBorder(style));
}
+// static
+void PlatformStyle::SetControlStyleFocus(View* view) {
+ // On Mac, all controls except textfields and lists, should not be focusable
+ // by default. However, make them focusable when Full Keyboard Access is
+ // turned on.
+ view->SetFocusable(false);
+ view->SetAccessibilityFocusable(true);
+}
+
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698