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 4046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4057 case ui::AX_ROLE_TAB_LIST: | 4057 case ui::AX_ROLE_TAB_LIST: |
4058 ia_role = ROLE_SYSTEM_PAGETABLIST; | 4058 ia_role = ROLE_SYSTEM_PAGETABLIST; |
4059 break; | 4059 break; |
4060 case ui::AX_ROLE_TAB_PANEL: | 4060 case ui::AX_ROLE_TAB_PANEL: |
4061 ia_role = ROLE_SYSTEM_PROPERTYPAGE; | 4061 ia_role = ROLE_SYSTEM_PROPERTYPAGE; |
4062 break; | 4062 break; |
4063 case ui::AX_ROLE_TOGGLE_BUTTON: | 4063 case ui::AX_ROLE_TOGGLE_BUTTON: |
4064 ia_role = ROLE_SYSTEM_PUSHBUTTON; | 4064 ia_role = ROLE_SYSTEM_PUSHBUTTON; |
4065 ia2_role = IA2_ROLE_TOGGLE_BUTTON; | 4065 ia2_role = IA2_ROLE_TOGGLE_BUTTON; |
4066 break; | 4066 break; |
4067 case ui::AX_ROLE_TEXT_AREA: | |
4068 ia_role = ROLE_SYSTEM_TEXT; | |
4069 ia2_state |= IA2_STATE_MULTI_LINE; | |
4070 ia2_state |= IA2_STATE_EDITABLE; | |
4071 ia2_state |= IA2_STATE_SELECTABLE_TEXT; | |
4072 break; | |
4073 case ui::AX_ROLE_TEXT_FIELD: | 4067 case ui::AX_ROLE_TEXT_FIELD: |
4074 case ui::AX_ROLE_SEARCH_BOX: | 4068 case ui::AX_ROLE_SEARCH_BOX: |
4075 ia_role = ROLE_SYSTEM_TEXT; | 4069 ia_role = ROLE_SYSTEM_TEXT; |
4076 ia2_state |= IA2_STATE_SINGLE_LINE; | 4070 if (HasState(ui::AX_STATE_MULTILINE)) |
| 4071 ia2_state |= IA2_STATE_MULTI_LINE; |
| 4072 else |
| 4073 ia2_state |= IA2_STATE_SINGLE_LINE; |
4077 ia2_state |= IA2_STATE_EDITABLE; | 4074 ia2_state |= IA2_STATE_EDITABLE; |
4078 ia2_state |= IA2_STATE_SELECTABLE_TEXT; | 4075 ia2_state |= IA2_STATE_SELECTABLE_TEXT; |
4079 break; | 4076 break; |
4080 case ui::AX_ROLE_TIME: | 4077 case ui::AX_ROLE_TIME: |
4081 ia_role = ROLE_SYSTEM_SPINBUTTON; | 4078 ia_role = ROLE_SYSTEM_SPINBUTTON; |
4082 break; | 4079 break; |
4083 case ui::AX_ROLE_TIMER: | 4080 case ui::AX_ROLE_TIMER: |
4084 ia_role = ROLE_SYSTEM_CLOCK; | 4081 ia_role = ROLE_SYSTEM_CLOCK; |
4085 ia_state |= STATE_SYSTEM_READONLY; | 4082 ia_state |= STATE_SYSTEM_READONLY; |
4086 break; | 4083 break; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4144 ia2_role = ia_role; | 4141 ia2_role = ia_role; |
4145 | 4142 |
4146 win_attributes_->ia_role = ia_role; | 4143 win_attributes_->ia_role = ia_role; |
4147 win_attributes_->ia_state = ia_state; | 4144 win_attributes_->ia_state = ia_state; |
4148 win_attributes_->role_name = role_name; | 4145 win_attributes_->role_name = role_name; |
4149 win_attributes_->ia2_role = ia2_role; | 4146 win_attributes_->ia2_role = ia2_role; |
4150 win_attributes_->ia2_state = ia2_state; | 4147 win_attributes_->ia2_state = ia2_state; |
4151 } | 4148 } |
4152 | 4149 |
4153 } // namespace content | 4150 } // namespace content |
OLD | NEW |