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

Side by Side Diff: ui/accessibility/ax_utils.cc

Issue 2671563002: MacViews: Implement NSAccessibilityPressAction for Views with clickable roles. (Closed)
Patch Set: Use method instead of private member. Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/accessibility/ax_utils.h"
6
7 namespace ui {
8
9 bool IsRoleClickable(AXRole role) {
dmazzoni 2017/02/09 20:24:43 This is fine for now, but @aboxhall may have some
Patti Lor 2017/02/09 23:11:23 Oh, that sounds interesting, thanks for the FYI! I
10 switch (role) {
11 case ui::AX_ROLE_BUTTON:
tapted 2017/02/09 02:45:18 ui:: prefixes not needed
Patti Lor 2017/02/09 23:11:23 Oops, thanks!
12 case ui::AX_ROLE_CHECK_BOX:
13 case ui::AX_ROLE_COLOR_WELL:
14 case ui::AX_ROLE_DISCLOSURE_TRIANGLE:
15 case ui::AX_ROLE_IMAGE_MAP_LINK:
16 case ui::AX_ROLE_LINK:
17 case ui::AX_ROLE_LIST_BOX_OPTION:
18 case ui::AX_ROLE_MENU_BUTTON:
19 case ui::AX_ROLE_MENU_ITEM:
20 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX:
21 case ui::AX_ROLE_MENU_ITEM_RADIO:
22 case ui::AX_ROLE_MENU_LIST_OPTION:
23 case ui::AX_ROLE_MENU_LIST_POPUP:
24 case ui::AX_ROLE_POP_UP_BUTTON:
25 case ui::AX_ROLE_RADIO_BUTTON:
26 case ui::AX_ROLE_SWITCH:
27 case ui::AX_ROLE_TAB:
28 case ui::AX_ROLE_TOGGLE_BUTTON:
29 return true;
30 default:
31 return false;
32 }
33 }
34
35 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698