OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/accessibility/blink_ax_enum_conversion.h" | 5 #include "content/renderer/accessibility/blink_ax_enum_conversion.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 if (o.isOffScreen()) | 47 if (o.isOffScreen()) |
48 state |= (1 << ui::AX_STATE_OFFSCREEN); | 48 state |= (1 << ui::AX_STATE_OFFSCREEN); |
49 | 49 |
50 if (o.isPressed()) | 50 if (o.isPressed()) |
51 state |= (1 << ui::AX_STATE_PRESSED); | 51 state |= (1 << ui::AX_STATE_PRESSED); |
52 | 52 |
53 if (o.isPasswordField()) | 53 if (o.isPasswordField()) |
54 state |= (1 << ui::AX_STATE_PROTECTED); | 54 state |= (1 << ui::AX_STATE_PROTECTED); |
55 | 55 |
56 if (o.isReadOnly()) | 56 if (o.isReadOnly()) |
57 state |= (1 << ui::AX_STATE_READONLY); | 57 state |= (1 << ui::AX_STATE_READ_ONLY); |
58 | 58 |
59 if (o.isRequired()) | 59 if (o.isRequired()) |
60 state |= (1 << ui::AX_STATE_REQUIRED); | 60 state |= (1 << ui::AX_STATE_REQUIRED); |
61 | 61 |
62 if (o.canSetSelectedAttribute()) | 62 if (o.canSetSelectedAttribute()) |
63 state |= (1 << ui::AX_STATE_SELECTABLE); | 63 state |= (1 << ui::AX_STATE_SELECTABLE); |
64 | 64 |
65 if (o.isSelected()) | 65 if (o.isSelected()) |
66 state |= (1 << ui::AX_STATE_SELECTED); | 66 state |= (1 << ui::AX_STATE_SELECTED); |
67 | 67 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 return ui::AX_ROLE_IMAGE; | 160 return ui::AX_ROLE_IMAGE; |
161 case blink::WebAXRoleImageMap: | 161 case blink::WebAXRoleImageMap: |
162 return ui::AX_ROLE_IMAGE_MAP; | 162 return ui::AX_ROLE_IMAGE_MAP; |
163 case blink::WebAXRoleImageMapLink: | 163 case blink::WebAXRoleImageMapLink: |
164 return ui::AX_ROLE_IMAGE_MAP_LINK; | 164 return ui::AX_ROLE_IMAGE_MAP_LINK; |
165 case blink::WebAXRoleIncrementor: | 165 case blink::WebAXRoleIncrementor: |
166 return ui::AX_ROLE_INCREMENTOR; | 166 return ui::AX_ROLE_INCREMENTOR; |
167 case blink::WebAXRoleInlineTextBox: | 167 case blink::WebAXRoleInlineTextBox: |
168 return ui::AX_ROLE_INLINE_TEXT_BOX; | 168 return ui::AX_ROLE_INLINE_TEXT_BOX; |
169 case blink::WebAXRoleLabel: | 169 case blink::WebAXRoleLabel: |
170 return ui::AX_ROLE_LABEL; | 170 return ui::AX_ROLE_LABEL_TEXT; |
171 case blink::WebAXRoleLegend: | 171 case blink::WebAXRoleLegend: |
172 return ui::AX_ROLE_LEGEND; | 172 return ui::AX_ROLE_LEGEND; |
173 case blink::WebAXRoleLink: | 173 case blink::WebAXRoleLink: |
174 return ui::AX_ROLE_LINK; | 174 return ui::AX_ROLE_LINK; |
175 case blink::WebAXRoleList: | 175 case blink::WebAXRoleList: |
176 return ui::AX_ROLE_LIST; | 176 return ui::AX_ROLE_LIST; |
177 case blink::WebAXRoleListBox: | 177 case blink::WebAXRoleListBox: |
178 return ui::AX_ROLE_LIST_BOX; | 178 return ui::AX_ROLE_LIST_BOX; |
179 case blink::WebAXRoleListBoxOption: | 179 case blink::WebAXRoleListBoxOption: |
180 return ui::AX_ROLE_LIST_BOX_OPTION; | 180 return ui::AX_ROLE_LIST_BOX_OPTION; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 return ui::AX_EVENT_TEXT_REMOVED; | 366 return ui::AX_EVENT_TEXT_REMOVED; |
367 case blink::WebAXEventValueChanged: | 367 case blink::WebAXEventValueChanged: |
368 return ui::AX_EVENT_VALUE_CHANGED; | 368 return ui::AX_EVENT_VALUE_CHANGED; |
369 } | 369 } |
370 | 370 |
371 NOTREACHED(); | 371 NOTREACHED(); |
372 return static_cast<ui::AXEvent>(-1); | 372 return static_cast<ui::AXEvent>(-1); |
373 } | 373 } |
374 | 374 |
375 } // namespace content | 375 } // namespace content |
OLD | NEW |