| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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_com_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_com_win.h" |
| 6 | 6 |
| 7 #include <UIAutomationClient.h> | 7 #include <UIAutomationClient.h> |
| 8 #include <UIAutomationCoreApi.h> | 8 #include <UIAutomationCoreApi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 5186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5197 BrowserAccessibilityStateImpl* accessibility_state = | 5197 BrowserAccessibilityStateImpl* accessibility_state = |
| 5198 BrowserAccessibilityStateImpl::GetInstance(); | 5198 BrowserAccessibilityStateImpl::GetInstance(); |
| 5199 if (!accessibility_state->disable_hot_tracking_for_testing()) { | 5199 if (!accessibility_state->disable_hot_tracking_for_testing()) { |
| 5200 if (owner()->HasState(ui::AX_STATE_HOVERED)) | 5200 if (owner()->HasState(ui::AX_STATE_HOVERED)) |
| 5201 ia_state |= STATE_SYSTEM_HOTTRACKED; | 5201 ia_state |= STATE_SYSTEM_HOTTRACKED; |
| 5202 } | 5202 } |
| 5203 | 5203 |
| 5204 if (owner()->HasState(ui::AX_STATE_EDITABLE)) | 5204 if (owner()->HasState(ui::AX_STATE_EDITABLE)) |
| 5205 ia2_state |= IA2_STATE_EDITABLE; | 5205 ia2_state |= IA2_STATE_EDITABLE; |
| 5206 | 5206 |
| 5207 if (owner()->GetBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE)) | 5207 if (owner()->HasAction(ui::AX_ACTION_SET_VALUE)) |
| 5208 ia2_state |= IA2_STATE_EDITABLE; | 5208 ia2_state |= IA2_STATE_EDITABLE; |
| 5209 | 5209 |
| 5210 if (!owner()->GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty()) | 5210 if (!owner()->GetStringAttribute(ui::AX_ATTR_AUTO_COMPLETE).empty()) |
| 5211 ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION; | 5211 ia2_state |= IA2_STATE_SUPPORTS_AUTOCOMPLETION; |
| 5212 | 5212 |
| 5213 if (owner()->GetBoolAttribute(ui::AX_ATTR_MODAL)) | 5213 if (owner()->GetBoolAttribute(ui::AX_ATTR_MODAL)) |
| 5214 ia2_state |= IA2_STATE_MODAL; | 5214 ia2_state |= IA2_STATE_MODAL; |
| 5215 | 5215 |
| 5216 base::string16 html_tag = owner()->GetString16Attribute(ui::AX_ATTR_HTML_TAG); | 5216 base::string16 html_tag = owner()->GetString16Attribute(ui::AX_ATTR_HTML_TAG); |
| 5217 switch (owner()->GetRole()) { | 5217 switch (owner()->GetRole()) { |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5717 | 5717 |
| 5718 BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( | 5718 BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( |
| 5719 BrowserAccessibility* obj) { | 5719 BrowserAccessibility* obj) { |
| 5720 if (!obj || !obj->IsNative()) | 5720 if (!obj || !obj->IsNative()) |
| 5721 return nullptr; | 5721 return nullptr; |
| 5722 auto* result = static_cast<BrowserAccessibilityWin*>(obj)->GetCOM(); | 5722 auto* result = static_cast<BrowserAccessibilityWin*>(obj)->GetCOM(); |
| 5723 return result; | 5723 return result; |
| 5724 } | 5724 } |
| 5725 | 5725 |
| 5726 } // namespace content | 5726 } // namespace content |
| OLD | NEW |