| 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 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3659 } else { | 3659 } else { |
| 3660 ia_role_ = ROLE_SYSTEM_BUTTONMENU; | 3660 ia_role_ = ROLE_SYSTEM_BUTTONMENU; |
| 3661 } | 3661 } |
| 3662 break; | 3662 break; |
| 3663 case ui::AX_ROLE_PROGRESS_INDICATOR: | 3663 case ui::AX_ROLE_PROGRESS_INDICATOR: |
| 3664 ia_role_ = ROLE_SYSTEM_PROGRESSBAR; | 3664 ia_role_ = ROLE_SYSTEM_PROGRESSBAR; |
| 3665 ia_state_ |= STATE_SYSTEM_READONLY; | 3665 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3666 break; | 3666 break; |
| 3667 case ui::AX_ROLE_RADIO_BUTTON: | 3667 case ui::AX_ROLE_RADIO_BUTTON: |
| 3668 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; | 3668 ia_role_ = ROLE_SYSTEM_RADIOBUTTON; |
| 3669 ia2_state_ = IA2_STATE_CHECKABLE; |
| 3669 break; | 3670 break; |
| 3670 case ui::AX_ROLE_RADIO_GROUP: | 3671 case ui::AX_ROLE_RADIO_GROUP: |
| 3671 ia_role_ = ROLE_SYSTEM_GROUPING; | 3672 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3672 ia2_role_ = IA2_ROLE_SECTION; | 3673 ia2_role_ = IA2_ROLE_SECTION; |
| 3673 break; | 3674 break; |
| 3674 case ui::AX_ROLE_REGION: | 3675 case ui::AX_ROLE_REGION: |
| 3675 ia_role_ = ROLE_SYSTEM_GROUPING; | 3676 ia_role_ = ROLE_SYSTEM_GROUPING; |
| 3676 ia2_role_ = IA2_ROLE_SECTION; | 3677 ia2_role_ = IA2_ROLE_SECTION; |
| 3677 ia_state_ |= STATE_SYSTEM_READONLY; | 3678 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3678 break; | 3679 break; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3835 // The role should always be set. | 3836 // The role should always be set. |
| 3836 DCHECK(!role_name_.empty() || ia_role_); | 3837 DCHECK(!role_name_.empty() || ia_role_); |
| 3837 | 3838 |
| 3838 // If we didn't explicitly set the IAccessible2 role, make it the same | 3839 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3839 // as the MSAA role. | 3840 // as the MSAA role. |
| 3840 if (!ia2_role_) | 3841 if (!ia2_role_) |
| 3841 ia2_role_ = ia_role_; | 3842 ia2_role_ = ia_role_; |
| 3842 } | 3843 } |
| 3843 | 3844 |
| 3844 } // namespace content | 3845 } // namespace content |
| OLD | NEW |