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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/style/platform_style.h" 5 #include "ui/views/style/platform_style.h"
6 6
7 #include "ui/base/resource/resource_bundle.h" 7 #include "ui/base/resource/resource_bundle.h"
8 #include "ui/gfx/paint_vector_icon.h" 8 #include "ui/gfx/paint_vector_icon.h"
9 #include "ui/gfx/vector_icons.h" 9 #include "ui/gfx/vector_icons.h"
10 #include "ui/resources/grit/ui_resources.h" 10 #include "ui/resources/grit/ui_resources.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return make_scoped_ptr(new DialogButtonBorderMac()); 49 return make_scoped_ptr(new DialogButtonBorderMac());
50 50
51 return make_scoped_ptr(new LabelButtonAssetBorder(style)); 51 return make_scoped_ptr(new LabelButtonAssetBorder(style));
52 } 52 }
53 53
54 // static 54 // static
55 scoped_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) { 55 scoped_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
56 return make_scoped_ptr(new CocoaScrollBar(is_horizontal)); 56 return make_scoped_ptr(new CocoaScrollBar(is_horizontal));
57 } 57 }
58 58
59 // static
60 void PlatformStyle::ConfigureFocus(CONTROL control, View* view) {
61 switch (control) {
62 case CONTROL::TREE_VIEW:
63 case CONTROL::TEXTFIELD:
64 case CONTROL::TABLE_VIEW:
65 case CONTROL::WEBVIEW:
66 case CONTROL::IN_MENU_BUTTON:
67 view->SetFocusable(true);
68 view->SetAccessibilityFocusable(true);
69 break;
70 case CONTROL::BUTTON:
71 case CONTROL::COMBOBOX:
72 case CONTROL::LINK:
73 case CONTROL::SLIDER:
74 case CONTROL::TABBED_PANE:
75 case CONTROL::ICON:
76 case CONTROL::CREDENTIALS_ITEM_VIEW:
77 case CONTROL::DESKTOP_MEDIA_LIST_VIEW:
78 case CONTROL::DESKTOP_MEDIA_SOURCE_VIEW:
79 case CONTROL::TOOLBAR_BUTTON:
80 view->SetFocusable(false);
81 view->SetAccessibilityFocusable(true);
82 break;
83 case CONTROL::SCROLLBAR_VIEW:
84 case CONTROL::SEPARATOR:
85 case CONTROL::COLOR_CHOOSER_VIEW:
86 view->SetFocusable(false);
87 view->SetAccessibilityFocusable(false);
88 break;
89 }
90 }
91
59 } // namespace views 92 } // namespace views
OLDNEW
« 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