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 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3698 role_name_ = html_tag; | 3698 role_name_ = html_tag; |
3699 ia_role_ = ROLE_SYSTEM_PROGRESSBAR; | 3699 ia_role_ = ROLE_SYSTEM_PROGRESSBAR; |
3700 break; | 3700 break; |
3701 case ui::AX_ROLE_NAVIGATION: | 3701 case ui::AX_ROLE_NAVIGATION: |
3702 ia_role_ = ROLE_SYSTEM_GROUPING; | 3702 ia_role_ = ROLE_SYSTEM_GROUPING; |
3703 ia2_role_ = IA2_ROLE_SECTION; | 3703 ia2_role_ = IA2_ROLE_SECTION; |
3704 break; | 3704 break; |
3705 case ui::AX_ROLE_NOTE: | 3705 case ui::AX_ROLE_NOTE: |
3706 ia_role_ = ROLE_SYSTEM_GROUPING; | 3706 ia_role_ = ROLE_SYSTEM_GROUPING; |
3707 ia2_role_ = IA2_ROLE_NOTE; | 3707 ia2_role_ = IA2_ROLE_NOTE; |
3708 ia_state_ |= STATE_SYSTEM_READONLY; | |
3709 break; | 3708 break; |
3710 case ui::AX_ROLE_OUTLINE: | 3709 case ui::AX_ROLE_OUTLINE: |
3711 ia_role_ = ROLE_SYSTEM_OUTLINE; | 3710 ia_role_ = ROLE_SYSTEM_OUTLINE; |
3712 break; | 3711 break; |
3713 case ui::AX_ROLE_PARAGRAPH: | 3712 case ui::AX_ROLE_PARAGRAPH: |
3714 role_name_ = L"P"; | 3713 role_name_ = L"P"; |
3715 ia2_role_ = IA2_ROLE_PARAGRAPH; | 3714 ia2_role_ = IA2_ROLE_PARAGRAPH; |
3716 break; | 3715 break; |
3717 case ui::AX_ROLE_POP_UP_BUTTON: | 3716 case ui::AX_ROLE_POP_UP_BUTTON: |
3718 if (html_tag == L"select") { | 3717 if (html_tag == L"select") { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3893 // The role should always be set. | 3892 // The role should always be set. |
3894 DCHECK(!role_name_.empty() || ia_role_); | 3893 DCHECK(!role_name_.empty() || ia_role_); |
3895 | 3894 |
3896 // If we didn't explicitly set the IAccessible2 role, make it the same | 3895 // If we didn't explicitly set the IAccessible2 role, make it the same |
3897 // as the MSAA role. | 3896 // as the MSAA role. |
3898 if (!ia2_role_) | 3897 if (!ia2_role_) |
3899 ia2_role_ = ia_role_; | 3898 ia2_role_ = ia_role_; |
3900 } | 3899 } |
3901 | 3900 |
3902 } // namespace content | 3901 } // namespace content |
OLD | NEW |