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 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3613 ia_role_ = ROLE_SYSTEM_GROUPING; | 3613 ia_role_ = ROLE_SYSTEM_GROUPING; |
3614 ia2_role_ = IA2_ROLE_PARAGRAPH; | 3614 ia2_role_ = IA2_ROLE_PARAGRAPH; |
3615 break; | 3615 break; |
3616 case ui::AX_ROLE_MARQUEE: | 3616 case ui::AX_ROLE_MARQUEE: |
3617 ia_role_ = ROLE_SYSTEM_ANIMATION; | 3617 ia_role_ = ROLE_SYSTEM_ANIMATION; |
3618 break; | 3618 break; |
3619 case ui::AX_ROLE_MATH: | 3619 case ui::AX_ROLE_MATH: |
3620 ia_role_ = ROLE_SYSTEM_EQUATION; | 3620 ia_role_ = ROLE_SYSTEM_EQUATION; |
3621 break; | 3621 break; |
3622 case ui::AX_ROLE_MENU: | 3622 case ui::AX_ROLE_MENU: |
3623 case ui::AX_ROLE_MENU_BUTTON: | |
3624 ia_role_ = ROLE_SYSTEM_MENUPOPUP; | 3623 ia_role_ = ROLE_SYSTEM_MENUPOPUP; |
3625 break; | 3624 break; |
3626 case ui::AX_ROLE_MENU_BAR: | 3625 case ui::AX_ROLE_MENU_BAR: |
3627 ia_role_ = ROLE_SYSTEM_MENUBAR; | 3626 ia_role_ = ROLE_SYSTEM_MENUBAR; |
3628 break; | 3627 break; |
| 3628 case ui::AX_ROLE_MENU_BUTTON: |
3629 case ui::AX_ROLE_MENU_ITEM: | 3629 case ui::AX_ROLE_MENU_ITEM: |
3630 ia_role_ = ROLE_SYSTEM_MENUITEM; | 3630 ia_role_ = ROLE_SYSTEM_MENUITEM; |
3631 break; | 3631 break; |
3632 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: | 3632 case ui::AX_ROLE_MENU_ITEM_CHECK_BOX: |
3633 ia_role_ = ROLE_SYSTEM_MENUITEM; | 3633 ia_role_ = ROLE_SYSTEM_MENUITEM; |
3634 ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM; | 3634 ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM; |
3635 ia2_state_ |= IA2_STATE_CHECKABLE; | 3635 ia2_state_ |= IA2_STATE_CHECKABLE; |
3636 break; | 3636 break; |
3637 case ui::AX_ROLE_MENU_ITEM_RADIO: | 3637 case ui::AX_ROLE_MENU_ITEM_RADIO: |
3638 ia_role_ = ROLE_SYSTEM_MENUITEM; | 3638 ia_role_ = ROLE_SYSTEM_MENUITEM; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3855 // The role should always be set. | 3855 // The role should always be set. |
3856 DCHECK(!role_name_.empty() || ia_role_); | 3856 DCHECK(!role_name_.empty() || ia_role_); |
3857 | 3857 |
3858 // If we didn't explicitly set the IAccessible2 role, make it the same | 3858 // If we didn't explicitly set the IAccessible2 role, make it the same |
3859 // as the MSAA role. | 3859 // as the MSAA role. |
3860 if (!ia2_role_) | 3860 if (!ia2_role_) |
3861 ia2_role_ = ia_role_; | 3861 ia2_role_ = ia_role_; |
3862 } | 3862 } |
3863 | 3863 |
3864 } // namespace content | 3864 } // namespace content |
OLD | NEW |