| 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 3383 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3394       ia_role_ = ROLE_SYSTEM_APPLICATION; | 3394       ia_role_ = ROLE_SYSTEM_APPLICATION; | 
| 3395       break; | 3395       break; | 
| 3396     case ui::AX_ROLE_ARTICLE: | 3396     case ui::AX_ROLE_ARTICLE: | 
| 3397       ia_role_ = ROLE_SYSTEM_DOCUMENT; | 3397       ia_role_ = ROLE_SYSTEM_DOCUMENT; | 
| 3398       ia_state_ |= STATE_SYSTEM_READONLY; | 3398       ia_state_ |= STATE_SYSTEM_READONLY; | 
| 3399       break; | 3399       break; | 
| 3400     case ui::AX_ROLE_BANNER: | 3400     case ui::AX_ROLE_BANNER: | 
| 3401       ia_role_ = ROLE_SYSTEM_GROUPING; | 3401       ia_role_ = ROLE_SYSTEM_GROUPING; | 
| 3402       ia2_role_ = IA2_ROLE_HEADER; | 3402       ia2_role_ = IA2_ROLE_HEADER; | 
| 3403       break; | 3403       break; | 
|  | 3404     case ui::AX_ROLE_BLOCKQUOTE: | 
|  | 3405       role_name_ = html_tag; | 
|  | 3406       ia2_role_ = IA2_ROLE_SECTION; | 
|  | 3407       break; | 
| 3404     case ui::AX_ROLE_BUSY_INDICATOR: | 3408     case ui::AX_ROLE_BUSY_INDICATOR: | 
| 3405       ia_role_ = ROLE_SYSTEM_ANIMATION; | 3409       ia_role_ = ROLE_SYSTEM_ANIMATION; | 
| 3406       ia_state_ |= STATE_SYSTEM_READONLY; | 3410       ia_state_ |= STATE_SYSTEM_READONLY; | 
| 3407       break; | 3411       break; | 
| 3408     case ui::AX_ROLE_BUTTON: | 3412     case ui::AX_ROLE_BUTTON: | 
| 3409       ia_role_ = ROLE_SYSTEM_PUSHBUTTON; | 3413       ia_role_ = ROLE_SYSTEM_PUSHBUTTON; | 
| 3410       bool is_aria_pressed_defined; | 3414       bool is_aria_pressed_defined; | 
| 3411       bool is_mixed; | 3415       bool is_mixed; | 
| 3412       if (GetAriaTristate("aria-pressed", &is_aria_pressed_defined, &is_mixed)) | 3416       if (GetAriaTristate("aria-pressed", &is_aria_pressed_defined, &is_mixed)) | 
| 3413         ia_state_ |= STATE_SYSTEM_PRESSED; | 3417         ia_state_ |= STATE_SYSTEM_PRESSED; | 
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3859   // The role should always be set. | 3863   // The role should always be set. | 
| 3860   DCHECK(!role_name_.empty() || ia_role_); | 3864   DCHECK(!role_name_.empty() || ia_role_); | 
| 3861 | 3865 | 
| 3862   // If we didn't explicitly set the IAccessible2 role, make it the same | 3866   // If we didn't explicitly set the IAccessible2 role, make it the same | 
| 3863   // as the MSAA role. | 3867   // as the MSAA role. | 
| 3864   if (!ia2_role_) | 3868   if (!ia2_role_) | 
| 3865     ia2_role_ = ia_role_; | 3869     ia2_role_ = ia_role_; | 
| 3866 } | 3870 } | 
| 3867 | 3871 | 
| 3868 }  // namespace content | 3872 }  // namespace content | 
| OLD | NEW | 
|---|