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 3655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3666 role_name_ = html_tag; | 3666 role_name_ = html_tag; |
3667 ia_role_ = ROLE_SYSTEM_TEXT; | 3667 ia_role_ = ROLE_SYSTEM_TEXT; |
3668 ia2_role_ = IA2_ROLE_PARAGRAPH; | 3668 ia2_role_ = IA2_ROLE_PARAGRAPH; |
3669 break; | 3669 break; |
3670 case ui::AX_ROLE_PROGRESS_INDICATOR: | 3670 case ui::AX_ROLE_PROGRESS_INDICATOR: |
3671 ia_role_ = ROLE_SYSTEM_PROGRESSBAR; | 3671 ia_role_ = ROLE_SYSTEM_PROGRESSBAR; |
3672 ia_state_ |= STATE_SYSTEM_READONLY; | 3672 ia_state_ |= STATE_SYSTEM_READONLY; |
3673 break; | 3673 break; |
3674 case ui::AX_ROLE_RADIO_BUTTON: | 3674 case ui::AX_ROLE_RADIO_BUTTON: |
3675 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; | 3675 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; |
| 3676 ia2_state_ = IA2_STATE_CHECKABLE; |
3676 break; | 3677 break; |
3677 case ui::AX_ROLE_RADIO_GROUP: | 3678 case ui::AX_ROLE_RADIO_GROUP: |
3678 ia_role_ = ROLE_SYSTEM_GROUPING; | 3679 ia_role_ = ROLE_SYSTEM_GROUPING; |
3679 break; | 3680 break; |
3680 case ui::AX_ROLE_REGION: | 3681 case ui::AX_ROLE_REGION: |
3681 if (html_tag == L"section") { | 3682 if (html_tag == L"section") { |
3682 ia_role_ = ROLE_SYSTEM_GROUPING; | 3683 ia_role_ = ROLE_SYSTEM_GROUPING; |
3683 ia2_role_ = IA2_ROLE_SECTION; | 3684 ia2_role_ = IA2_ROLE_SECTION; |
3684 } else { | 3685 } else { |
3685 ia_role_ = ROLE_SYSTEM_PANE; | 3686 ia_role_ = ROLE_SYSTEM_PANE; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3831 // The role should always be set. | 3832 // The role should always be set. |
3832 DCHECK(!role_name_.empty() || ia_role_); | 3833 DCHECK(!role_name_.empty() || ia_role_); |
3833 | 3834 |
3834 // If we didn't explicitly set the IAccessible2 role, make it the same | 3835 // If we didn't explicitly set the IAccessible2 role, make it the same |
3835 // as the MSAA role. | 3836 // as the MSAA role. |
3836 if (!ia2_role_) | 3837 if (!ia2_role_) |
3837 ia2_role_ = ia_role_; | 3838 ia2_role_ = ia_role_; |
3838 } | 3839 } |
3839 | 3840 |
3840 } // namespace content | 3841 } // namespace content |
OLD | NEW |