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 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3734 case ui::AX_ROLE_SPIN_BUTTON_PART: | 3734 case ui::AX_ROLE_SPIN_BUTTON_PART: |
3735 ia_role_ = ROLE_SYSTEM_PUSHBUTTON; | 3735 ia_role_ = ROLE_SYSTEM_PUSHBUTTON; |
3736 break; | 3736 break; |
3737 case ui::AX_ROLE_ANNOTATION: | 3737 case ui::AX_ROLE_ANNOTATION: |
3738 case ui::AX_ROLE_LIST_MARKER: | 3738 case ui::AX_ROLE_LIST_MARKER: |
3739 case ui::AX_ROLE_STATIC_TEXT: | 3739 case ui::AX_ROLE_STATIC_TEXT: |
3740 ia_role_ = ROLE_SYSTEM_STATICTEXT; | 3740 ia_role_ = ROLE_SYSTEM_STATICTEXT; |
3741 break; | 3741 break; |
3742 case ui::AX_ROLE_STATUS: | 3742 case ui::AX_ROLE_STATUS: |
3743 ia_role_ = ROLE_SYSTEM_STATUSBAR; | 3743 ia_role_ = ROLE_SYSTEM_STATUSBAR; |
3744 ia_state_ |= STATE_SYSTEM_READONLY; | |
3745 break; | 3744 break; |
3746 case ui::AX_ROLE_SPLITTER: | 3745 case ui::AX_ROLE_SPLITTER: |
3747 ia_role_ = ROLE_SYSTEM_SEPARATOR; | 3746 ia_role_ = ROLE_SYSTEM_SEPARATOR; |
3748 break; | 3747 break; |
3749 case ui::AX_ROLE_SVG_ROOT: | 3748 case ui::AX_ROLE_SVG_ROOT: |
3750 ia_role_ = ROLE_SYSTEM_GRAPHIC; | 3749 ia_role_ = ROLE_SYSTEM_GRAPHIC; |
3751 break; | 3750 break; |
3752 case ui::AX_ROLE_TAB: | 3751 case ui::AX_ROLE_TAB: |
3753 ia_role_ = ROLE_SYSTEM_PAGETAB; | 3752 ia_role_ = ROLE_SYSTEM_PAGETAB; |
3754 break; | 3753 break; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3847 // The role should always be set. | 3846 // The role should always be set. |
3848 DCHECK(!role_name_.empty() || ia_role_); | 3847 DCHECK(!role_name_.empty() || ia_role_); |
3849 | 3848 |
3850 // If we didn't explicitly set the IAccessible2 role, make it the same | 3849 // If we didn't explicitly set the IAccessible2 role, make it the same |
3851 // as the MSAA role. | 3850 // as the MSAA role. |
3852 if (!ia2_role_) | 3851 if (!ia2_role_) |
3853 ia2_role_ = ia_role_; | 3852 ia2_role_ = ia_role_; |
3854 } | 3853 } |
3855 | 3854 |
3856 } // namespace content | 3855 } // namespace content |
OLD | NEW |