| 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 3373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3384 case ui::AX_ROLE_ALERT: | 3384 case ui::AX_ROLE_ALERT: |
| 3385 ia_role_ = ROLE_SYSTEM_ALERT; | 3385 ia_role_ = ROLE_SYSTEM_ALERT; |
| 3386 break; | 3386 break; |
| 3387 case ui::AX_ROLE_ALERT_DIALOG: | 3387 case ui::AX_ROLE_ALERT_DIALOG: |
| 3388 ia_role_ = ROLE_SYSTEM_DIALOG; | 3388 ia_role_ = ROLE_SYSTEM_DIALOG; |
| 3389 break; | 3389 break; |
| 3390 case ui::AX_ROLE_APPLICATION: | 3390 case ui::AX_ROLE_APPLICATION: |
| 3391 ia_role_ = ROLE_SYSTEM_APPLICATION; | 3391 ia_role_ = ROLE_SYSTEM_APPLICATION; |
| 3392 break; | 3392 break; |
| 3393 case ui::AX_ROLE_ARTICLE: | 3393 case ui::AX_ROLE_ARTICLE: |
| 3394 ia_role_ = ROLE_SYSTEM_GROUPING; | 3394 ia_role_ = ROLE_SYSTEM_DOCUMENT; |
| 3395 ia2_role_ = IA2_ROLE_SECTION; | |
| 3396 ia_state_ |= STATE_SYSTEM_READONLY; | 3395 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3397 break; | 3396 break; |
| 3398 case ui::AX_ROLE_BUSY_INDICATOR: | 3397 case ui::AX_ROLE_BUSY_INDICATOR: |
| 3399 ia_role_ = ROLE_SYSTEM_ANIMATION; | 3398 ia_role_ = ROLE_SYSTEM_ANIMATION; |
| 3400 ia_state_ |= STATE_SYSTEM_READONLY; | 3399 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3401 break; | 3400 break; |
| 3402 case ui::AX_ROLE_BUTTON: | 3401 case ui::AX_ROLE_BUTTON: |
| 3403 ia_role_ = ROLE_SYSTEM_PUSHBUTTON; | 3402 ia_role_ = ROLE_SYSTEM_PUSHBUTTON; |
| 3404 bool is_aria_pressed_defined; | 3403 bool is_aria_pressed_defined; |
| 3405 bool is_mixed; | 3404 bool is_mixed; |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3803 // The role should always be set. | 3802 // The role should always be set. |
| 3804 DCHECK(!role_name_.empty() || ia_role_); | 3803 DCHECK(!role_name_.empty() || ia_role_); |
| 3805 | 3804 |
| 3806 // If we didn't explicitly set the IAccessible2 role, make it the same | 3805 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3807 // as the MSAA role. | 3806 // as the MSAA role. |
| 3808 if (!ia2_role_) | 3807 if (!ia2_role_) |
| 3809 ia2_role_ = ia_role_; | 3808 ia2_role_ = ia_role_; |
| 3810 } | 3809 } |
| 3811 | 3810 |
| 3812 } // namespace content | 3811 } // namespace content |
| OLD | NEW |