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 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3418 ia_role_ = ROLE_SYSTEM_GRAPHIC; | 3418 ia_role_ = ROLE_SYSTEM_GRAPHIC; |
3419 } | 3419 } |
3420 break; | 3420 break; |
3421 case ui::AX_ROLE_CELL: | 3421 case ui::AX_ROLE_CELL: |
3422 ia_role_ = ROLE_SYSTEM_CELL; | 3422 ia_role_ = ROLE_SYSTEM_CELL; |
3423 break; | 3423 break; |
3424 case ui::AX_ROLE_CHECK_BOX: | 3424 case ui::AX_ROLE_CHECK_BOX: |
3425 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; | 3425 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; |
3426 ia2_state_ |= IA2_STATE_CHECKABLE; | 3426 ia2_state_ |= IA2_STATE_CHECKABLE; |
3427 break; | 3427 break; |
| 3428 case ui::AX_ROLE_CHECK_BOX_MENU_ITEM: |
| 3429 ia_role_ = ROLE_SYSTEM_CHECKBUTTON; |
| 3430 ia2_role_ = IA2_ROLE_CHECK_MENU_ITEM; |
| 3431 ia2_state_ |= IA2_STATE_CHECKABLE; |
| 3432 break; |
3428 case ui::AX_ROLE_COLOR_WELL: | 3433 case ui::AX_ROLE_COLOR_WELL: |
3429 ia_role_ = ROLE_SYSTEM_CLIENT; | 3434 ia_role_ = ROLE_SYSTEM_CLIENT; |
3430 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; | 3435 ia2_role_ = IA2_ROLE_COLOR_CHOOSER; |
3431 break; | 3436 break; |
3432 case ui::AX_ROLE_COLUMN: | 3437 case ui::AX_ROLE_COLUMN: |
3433 ia_role_ = ROLE_SYSTEM_COLUMN; | 3438 ia_role_ = ROLE_SYSTEM_COLUMN; |
3434 ia_state_ |= STATE_SYSTEM_READONLY; | 3439 ia_state_ |= STATE_SYSTEM_READONLY; |
3435 break; | 3440 break; |
3436 case ui::AX_ROLE_COLUMN_HEADER: | 3441 case ui::AX_ROLE_COLUMN_HEADER: |
3437 ia_role_ = ROLE_SYSTEM_COLUMNHEADER; | 3442 ia_role_ = ROLE_SYSTEM_COLUMNHEADER; |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3823 // The role should always be set. | 3828 // The role should always be set. |
3824 DCHECK(!role_name_.empty() || ia_role_); | 3829 DCHECK(!role_name_.empty() || ia_role_); |
3825 | 3830 |
3826 // If we didn't explicitly set the IAccessible2 role, make it the same | 3831 // If we didn't explicitly set the IAccessible2 role, make it the same |
3827 // as the MSAA role. | 3832 // as the MSAA role. |
3828 if (!ia2_role_) | 3833 if (!ia2_role_) |
3829 ia2_role_ = ia_role_; | 3834 ia2_role_ = ia_role_; |
3830 } | 3835 } |
3831 | 3836 |
3832 } // namespace content | 3837 } // namespace content |
OLD | NEW |