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

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

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.h ('k') | ui/views/style/platform_style_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/style/platform_style.cc
diff --git a/ui/views/style/platform_style.cc b/ui/views/style/platform_style.cc
index 6719c9ba46bf4ec8e2559743a560aa7fb8369b2c..8fff9d020acc112cce9bb8d0248a72864b2886af 100644
--- a/ui/views/style/platform_style.cc
+++ b/ui/views/style/platform_style.cc
@@ -53,6 +53,39 @@ scoped_ptr<LabelButtonBorder> PlatformStyle::CreateLabelButtonBorder(
scoped_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
return make_scoped_ptr(new NativeScrollBar(is_horizontal));
}
+
+// static
+void PlatformStyle::ConfigureFocus(CONTROL control, View* view) {
+ switch (control) {
+ case CONTROL::BUTTON:
+ case CONTROL::COMBOBOX:
+ case CONTROL::LINK:
+ case CONTROL::SLIDER:
+ case CONTROL::TREE_VIEW:
+ case CONTROL::TEXTFIELD:
+ case CONTROL::TABLE_VIEW:
+ case CONTROL::TABBED_PANE:
+ case CONTROL::IN_MENU_BUTTON:
+ case CONTROL::WEBVIEW:
+ case CONTROL::ICON:
+ case CONTROL::CREDENTIALS_ITEM_VIEW:
+ case CONTROL::DESKTOP_MEDIA_LIST_VIEW:
+ case CONTROL::DESKTOP_MEDIA_SOURCE_VIEW:
+ view->SetFocusable(true);
+ break;
+ case CONTROL::SCROLLBAR_VIEW:
+ case CONTROL::SEPARATOR:
+ case CONTROL::COLOR_CHOOSER_VIEW:
+ view->SetFocusable(false);
+ view->SetAccessibilityFocusable(false);
+ break;
+ case CONTROL::TOOLBAR_BUTTON:
+ view->SetFocusable(false);
+ view->SetAccessibilityFocusable(true);
+ break;
+ }
+}
+
#endif
#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
« no previous file with comments | « ui/views/style/platform_style.h ('k') | ui/views/style/platform_style_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698