| 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 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3420 ia_role_ = ROLE_SYSTEM_GRAPHIC; | 3420 ia_role_ = ROLE_SYSTEM_GRAPHIC; |
| 3421 } | 3421 } |
| 3422 break; | 3422 break; |
| 3423 case ui::AX_ROLE_CELL: | 3423 case ui::AX_ROLE_CELL: |
| 3424 ia_role_ = ROLE_SYSTEM_CELL; | 3424 ia_role_ = ROLE_SYSTEM_CELL; |
| 3425 break; | 3425 break; |
| 3426 case ui::AX_ROLE_CHECK_BOX: | 3426 case ui::AX_ROLE_CHECK_BOX: |
| 3427 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; | 3427 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; |
| 3428 ia2_state_ |= IA2_STATE_CHECKABLE; | 3428 ia2_state_ |= IA2_STATE_CHECKABLE; |
| 3429 break; | 3429 break; |
| 3430 case ui::AX_ROLE_CHECK_BOX_MENU_ITEM: |
| 3431 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; |
| 3432 ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM; |
| 3433 ia2_state_ |= IA2_STATE_CHECKABLE; |
| 3434 break; |
| 3430 case ui::AX_ROLE_COLOR_WELL: | 3435 case ui::AX_ROLE_COLOR_WELL: |
| 3431 ia_role_ = ROLE_SYSTEM_CLIENT; | 3436 ia_role_ = ROLE_SYSTEM_CLIENT; |
| 3432 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; | 3437 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; |
| 3433 break; | 3438 break; |
| 3434 case ui::AX_ROLE_COLUMN: | 3439 case ui::AX_ROLE_COLUMN: |
| 3435 ia_role_ = ROLE_SYSTEM_COLUMN; | 3440 ia_role_ = ROLE_SYSTEM_COLUMN; |
| 3436 ia_state_ |= STATE_SYSTEM_READONLY; | 3441 ia_state_ |= STATE_SYSTEM_READONLY; |
| 3437 break; | 3442 break; |
| 3438 case ui::AX_ROLE_COLUMN_HEADER: | 3443 case ui::AX_ROLE_COLUMN_HEADER: |
| 3439 ia_role_ = ROLE_SYSTEM_COLUMNHEADER; | 3444 ia_role_ = ROLE_SYSTEM_COLUMNHEADER; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3835 // The role should always be set. | 3840 // The role should always be set. |
| 3836 DCHECK(!role_name_.empty() || ia_role_); | 3841 DCHECK(!role_name_.empty() || ia_role_); |
| 3837 | 3842 |
| 3838 // If we didn't explicitly set the IAccessible2 role, make it the same | 3843 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3839 // as the MSAA role. | 3844 // as the MSAA role. |
| 3840 if (!ia2_role_) | 3845 if (!ia2_role_) |
| 3841 ia2_role_ = ia_role_; | 3846 ia2_role_ = ia_role_; |
| 3842 } | 3847 } |
| 3843 | 3848 |
| 3844 } // namespace content | 3849 } // namespace content |
| OLD | NEW |