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

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

Issue 1870573003: Full Keyboard Access: Second Approach (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
« no previous file with comments | « ui/views/style/platform_style.cc ('k') | ui/views/touchui/touch_selection_menu_runner_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/platform_style_mac.mm
diff --git a/ui/views/style/platform_style_mac.mm b/ui/views/style/platform_style_mac.mm
index cbe9be51ce15d0094f4546ee536b1cf0bf603def..e8902e158007686b5af4ba6806540b24366f342d 100644
--- a/ui/views/style/platform_style_mac.mm
+++ b/ui/views/style/platform_style_mac.mm
@@ -56,4 +56,37 @@ scoped_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
return make_scoped_ptr(new CocoaScrollBar(is_horizontal));
}
+// static
+void PlatformStyle::ConfigureFocus(CONTROL control, View* view) {
+ switch (control) {
+ case CONTROL::TREE_VIEW:
+ case CONTROL::TEXTFIELD:
+ case CONTROL::TABLE_VIEW:
+ case CONTROL::WEBVIEW:
+ case CONTROL::IN_MENU_BUTTON:
+ view->SetFocusable(true);
+ view->SetAccessibilityFocusable(true);
+ break;
+ case CONTROL::BUTTON:
+ case CONTROL::COMBOBOX:
+ case CONTROL::LINK:
+ case CONTROL::SLIDER:
+ case CONTROL::TABBED_PANE:
+ case CONTROL::ICON:
+ case CONTROL::CREDENTIALS_ITEM_VIEW:
+ case CONTROL::DESKTOP_MEDIA_LIST_VIEW:
+ case CONTROL::DESKTOP_MEDIA_SOURCE_VIEW:
+ case CONTROL::TOOLBAR_BUTTON:
+ view->SetFocusable(false);
+ view->SetAccessibilityFocusable(true);
+ break;
+ case CONTROL::SCROLLBAR_VIEW:
+ case CONTROL::SEPARATOR:
+ case CONTROL::COLOR_CHOOSER_VIEW:
+ view->SetFocusable(false);
+ view->SetAccessibilityFocusable(false);
+ break;
+ }
+}
+
} // namespace views
« no previous file with comments | « ui/views/style/platform_style.cc ('k') | ui/views/touchui/touch_selection_menu_runner_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698