| 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 3580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3591 } | 3591 } |
| 3592 break; | 3592 break; |
| 3593 case ui::AX_ROLE_LIST_ITEM: | 3593 case ui::AX_ROLE_LIST_ITEM: |
| 3594 ia_role_ = ROLE_SYSTEM_LISTITEM; | 3594 ia_role_ = ROLE_SYSTEM_LISTITEM; |
| 3595 ia_state_ |= STATE_SYSTEM_READONLY; | 3595 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3596 break; | 3596 break; |
| 3597 case ui::AX_ROLE_MAIN: | 3597 case ui::AX_ROLE_MAIN: |
| 3598 ia_role_ = ROLE_SYSTEM_GROUPING; | 3598 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3599 ia2_role_ = IA2_ROLE_PARAGRAPH; | 3599 ia2_role_ = IA2_ROLE_PARAGRAPH; |
| 3600 break; | 3600 break; |
| 3601 case ui::AX_ROLE_MARQUEE: |
| 3602 ia_role_ = ROLE_SYSTEM_ANIMATION; |
| 3603 break; |
| 3601 case ui::AX_ROLE_MATH_ELEMENT: | 3604 case ui::AX_ROLE_MATH_ELEMENT: |
| 3602 ia_role_ = ROLE_SYSTEM_EQUATION; | 3605 ia_role_ = ROLE_SYSTEM_EQUATION; |
| 3603 ia_state_ |= STATE_SYSTEM_READONLY; | 3606 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3604 break; | 3607 break; |
| 3605 case ui::AX_ROLE_MENU: | 3608 case ui::AX_ROLE_MENU: |
| 3606 case ui::AX_ROLE_MENU_BUTTON: | 3609 case ui::AX_ROLE_MENU_BUTTON: |
| 3607 ia_role_ = ROLE_SYSTEM_MENUPOPUP; | 3610 ia_role_ = ROLE_SYSTEM_MENUPOPUP; |
| 3608 break; | 3611 break; |
| 3609 case ui::AX_ROLE_MENU_BAR: | 3612 case ui::AX_ROLE_MENU_BAR: |
| 3610 ia_role_ = ROLE_SYSTEM_MENUBAR; | 3613 ia_role_ = ROLE_SYSTEM_MENUBAR; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3784 break; | 3787 break; |
| 3785 | 3788 |
| 3786 // TODO(dmazzoni): figure out the proper MSAA role for all of these. | 3789 // TODO(dmazzoni): figure out the proper MSAA role for all of these. |
| 3787 case ui::AX_ROLE_BROWSER: | 3790 case ui::AX_ROLE_BROWSER: |
| 3788 case ui::AX_ROLE_DIRECTORY: | 3791 case ui::AX_ROLE_DIRECTORY: |
| 3789 case ui::AX_ROLE_DRAWER: | 3792 case ui::AX_ROLE_DRAWER: |
| 3790 case ui::AX_ROLE_HELP_TAG: | 3793 case ui::AX_ROLE_HELP_TAG: |
| 3791 case ui::AX_ROLE_IGNORED: | 3794 case ui::AX_ROLE_IGNORED: |
| 3792 case ui::AX_ROLE_INCREMENTOR: | 3795 case ui::AX_ROLE_INCREMENTOR: |
| 3793 case ui::AX_ROLE_LOG: | 3796 case ui::AX_ROLE_LOG: |
| 3794 case ui::AX_ROLE_MARQUEE: | |
| 3795 case ui::AX_ROLE_MATTE: | 3797 case ui::AX_ROLE_MATTE: |
| 3796 case ui::AX_ROLE_NONE: | 3798 case ui::AX_ROLE_NONE: |
| 3797 case ui::AX_ROLE_PRESENTATIONAL: | 3799 case ui::AX_ROLE_PRESENTATIONAL: |
| 3798 case ui::AX_ROLE_RULER_MARKER: | 3800 case ui::AX_ROLE_RULER_MARKER: |
| 3799 case ui::AX_ROLE_SHEET: | 3801 case ui::AX_ROLE_SHEET: |
| 3800 case ui::AX_ROLE_SLIDER_THUMB: | 3802 case ui::AX_ROLE_SLIDER_THUMB: |
| 3801 case ui::AX_ROLE_SYSTEM_WIDE: | 3803 case ui::AX_ROLE_SYSTEM_WIDE: |
| 3802 case ui::AX_ROLE_VALUE_INDICATOR: | 3804 case ui::AX_ROLE_VALUE_INDICATOR: |
| 3803 default: | 3805 default: |
| 3804 ia_role_ = ROLE_SYSTEM_CLIENT; | 3806 ia_role_ = ROLE_SYSTEM_CLIENT; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3823 // The role should always be set. | 3825 // The role should always be set. |
| 3824 DCHECK(!role_name_.empty() || ia_role_); | 3826 DCHECK(!role_name_.empty() || ia_role_); |
| 3825 | 3827 |
| 3826 // If we didn't explicitly set the IAccessible2 role, make it the same | 3828 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3827 // as the MSAA role. | 3829 // as the MSAA role. |
| 3828 if (!ia2_role_) | 3830 if (!ia2_role_) |
| 3829 ia2_role_ = ia_role_; | 3831 ia2_role_ = ia_role_; |
| 3830 } | 3832 } |
| 3831 | 3833 |
| 3832 } // namespace content | 3834 } // namespace content |
| OLD | NEW |