OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/accessibility/browser_accessibility_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_win.h" |
6 | 6 |
7 #include <UIAutomationClient.h> | 7 #include <UIAutomationClient.h> |
8 #include <UIAutomationCoreApi.h> | 8 #include <UIAutomationCoreApi.h> |
9 | 9 |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 3487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3498 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: | 3498 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: |
3499 ia_role_ = ROLE_SYSTEM_PUSHBUTTON; | 3499 ia_role_ = ROLE_SYSTEM_PUSHBUTTON; |
3500 break; | 3500 break; |
3501 case ui::AX_ROLE_DOCUMENT: | 3501 case ui::AX_ROLE_DOCUMENT: |
3502 case ui::AX_ROLE_ROOT_WEB_AREA: | 3502 case ui::AX_ROLE_ROOT_WEB_AREA: |
3503 case ui::AX_ROLE_WEB_AREA: | 3503 case ui::AX_ROLE_WEB_AREA: |
3504 ia_role_ = ROLE_SYSTEM_DOCUMENT; | 3504 ia_role_ = ROLE_SYSTEM_DOCUMENT; |
3505 ia_state_ |= STATE_SYSTEM_READONLY; | 3505 ia_state_ |= STATE_SYSTEM_READONLY; |
3506 ia_state_ |= STATE_SYSTEM_FOCUSABLE; | 3506 ia_state_ |= STATE_SYSTEM_FOCUSABLE; |
3507 break; | 3507 break; |
| 3508 case ui::AX_ROLE_EMBEDDED_OBJECT: |
| 3509 ia_role_ = ROLE_SYSTEM_CLIENT; |
| 3510 ia2_role_ = IA2_ROLE_EMBEDDED_OBJECT; |
| 3511 break; |
3508 case ui::AX_ROLE_EDITABLE_TEXT: | 3512 case ui::AX_ROLE_EDITABLE_TEXT: |
3509 ia_role_ = ROLE_SYSTEM_TEXT; | 3513 ia_role_ = ROLE_SYSTEM_TEXT; |
3510 ia2_state_ |= IA2_STATE_SINGLE_LINE; | 3514 ia2_state_ |= IA2_STATE_SINGLE_LINE; |
3511 ia2_state_ |= IA2_STATE_EDITABLE; | 3515 ia2_state_ |= IA2_STATE_EDITABLE; |
3512 break; | 3516 break; |
3513 case ui::AX_ROLE_FIGCAPTION: | 3517 case ui::AX_ROLE_FIGCAPTION: |
3514 role_name_ = html_tag; | 3518 role_name_ = html_tag; |
3515 ia2_role_ = IA2_ROLE_CAPTION; | 3519 ia2_role_ = IA2_ROLE_CAPTION; |
3516 break; | 3520 break; |
3517 case ui::AX_ROLE_FIGURE: | 3521 case ui::AX_ROLE_FIGURE: |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3853 // The role should always be set. | 3857 // The role should always be set. |
3854 DCHECK(!role_name_.empty() || ia_role_); | 3858 DCHECK(!role_name_.empty() || ia_role_); |
3855 | 3859 |
3856 // If we didn't explicitly set the IAccessible2 role, make it the same | 3860 // If we didn't explicitly set the IAccessible2 role, make it the same |
3857 // as the MSAA role. | 3861 // as the MSAA role. |
3858 if (!ia2_role_) | 3862 if (!ia2_role_) |
3859 ia2_role_ = ia_role_; | 3863 ia2_role_ = ia_role_; |
3860 } | 3864 } |
3861 | 3865 |
3862 } // namespace content | 3866 } // namespace content |
OLD | NEW |