OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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/accessibility/ax_role_properties.h" | 5 #include "ui/accessibility/ax_role_properties.h" |
6 | 6 |
7 namespace ui { | 7 namespace ui { |
8 | 8 |
9 bool IsRoleClickable(AXRole role) { | 9 bool IsRoleClickable(AXRole role) { |
10 switch (role) { | 10 switch (role) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 case ui::AX_ROLE_TREE: | 77 case ui::AX_ROLE_TREE: |
78 case ui::AX_ROLE_TREE_GRID: | 78 case ui::AX_ROLE_TREE_GRID: |
79 case ui::AX_ROLE_GRID: | 79 case ui::AX_ROLE_GRID: |
80 case ui::AX_ROLE_TABLE: | 80 case ui::AX_ROLE_TABLE: |
81 return true; | 81 return true; |
82 default: | 82 default: |
83 return false; | 83 return false; |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
| 87 bool IsControl(ui::AXRole role) { |
| 88 switch (role) { |
| 89 case ui::AX_ROLE_BUTTON: |
| 90 case ui::AX_ROLE_CHECK_BOX: |
| 91 case ui::AX_ROLE_COLOR_WELL: |
| 92 case ui::AX_ROLE_COMBO_BOX: |
| 93 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: |
| 94 case ui::AX_ROLE_LIST_BOX: |
| 95 case ui::AX_ROLE_MENU: |
| 96 case ui::AX_ROLE_MENU_BAR: |
| 97 case ui::AX_ROLE_MENU_BUTTON: |
| 98 case ui::AX_ROLE_MENU_ITEM: |
| 99 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: |
| 100 case ui::AX_ROLE_MENU_ITEM_RADIO: |
| 101 case ui::AX_ROLE_MENU_LIST_OPTION: |
| 102 case ui::AX_ROLE_MENU_LIST_POPUP: |
| 103 case ui::AX_ROLE_POP_UP_BUTTON: |
| 104 case ui::AX_ROLE_RADIO_BUTTON: |
| 105 case ui::AX_ROLE_SCROLL_BAR: |
| 106 case ui::AX_ROLE_SEARCH_BOX: |
| 107 case ui::AX_ROLE_SLIDER: |
| 108 case ui::AX_ROLE_SPIN_BUTTON: |
| 109 case ui::AX_ROLE_SWITCH: |
| 110 case ui::AX_ROLE_TAB: |
| 111 case ui::AX_ROLE_TEXT_FIELD: |
| 112 case ui::AX_ROLE_TOGGLE_BUTTON: |
| 113 case ui::AX_ROLE_TREE: |
| 114 return true; |
| 115 default: |
| 116 return false; |
| 117 } |
| 118 } |
| 119 |
| 120 bool IsMenuRelated(ui::AXRole role) { |
| 121 switch (role) { |
| 122 case ui::AX_ROLE_MENU: |
| 123 case ui::AX_ROLE_MENU_BAR: |
| 124 case ui::AX_ROLE_MENU_BUTTON: |
| 125 case ui::AX_ROLE_MENU_ITEM: |
| 126 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: |
| 127 case ui::AX_ROLE_MENU_ITEM_RADIO: |
| 128 case ui::AX_ROLE_MENU_LIST_OPTION: |
| 129 case ui::AX_ROLE_MENU_LIST_POPUP: |
| 130 return true; |
| 131 default: |
| 132 return false; |
| 133 } |
| 134 } |
| 135 |
87 } // namespace ui | 136 } // namespace ui |
OLD | NEW |