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 <algorithm> | 10 #include <algorithm> |
(...skipping 4814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4825 ia_role = ROLE_SYSTEM_PUSHBUTTON; | 4825 ia_role = ROLE_SYSTEM_PUSHBUTTON; |
4826 break; | 4826 break; |
4827 case ui::AX_ROLE_DOCUMENT: | 4827 case ui::AX_ROLE_DOCUMENT: |
4828 case ui::AX_ROLE_ROOT_WEB_AREA: | 4828 case ui::AX_ROLE_ROOT_WEB_AREA: |
4829 case ui::AX_ROLE_WEB_AREA: | 4829 case ui::AX_ROLE_WEB_AREA: |
4830 ia_role = ROLE_SYSTEM_DOCUMENT; | 4830 ia_role = ROLE_SYSTEM_DOCUMENT; |
4831 ia_state |= STATE_SYSTEM_READONLY; | 4831 ia_state |= STATE_SYSTEM_READONLY; |
4832 ia_state |= STATE_SYSTEM_FOCUSABLE; | 4832 ia_state |= STATE_SYSTEM_FOCUSABLE; |
4833 break; | 4833 break; |
4834 case ui::AX_ROLE_EMBEDDED_OBJECT: | 4834 case ui::AX_ROLE_EMBEDDED_OBJECT: |
4835 if (HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)) { | 4835 if (PlatformChildCount()) { |
4836 // Windows screen readers assume that IA2_ROLE_EMBEDDED_OBJECT | 4836 // Windows screen readers assume that IA2_ROLE_EMBEDDED_OBJECT |
4837 // doesn't have any children, but it may be something like a | 4837 // doesn't have any children, but it may be something like a |
4838 // browser plugin that has a document inside. | 4838 // browser plugin that has a document inside. |
4839 ia_role = ROLE_SYSTEM_GROUPING; | 4839 ia_role = ROLE_SYSTEM_GROUPING; |
4840 } else { | 4840 } else { |
4841 ia_role = ROLE_SYSTEM_CLIENT; | 4841 ia_role = ROLE_SYSTEM_CLIENT; |
4842 ia2_role = IA2_ROLE_EMBEDDED_OBJECT; | 4842 ia2_role = IA2_ROLE_EMBEDDED_OBJECT; |
4843 } | 4843 } |
4844 break; | 4844 break; |
4845 case ui::AX_ROLE_FIGCAPTION: | 4845 case ui::AX_ROLE_FIGCAPTION: |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5203 return static_cast<BrowserAccessibilityWin*>(obj); | 5203 return static_cast<BrowserAccessibilityWin*>(obj); |
5204 } | 5204 } |
5205 | 5205 |
5206 const BrowserAccessibilityWin* | 5206 const BrowserAccessibilityWin* |
5207 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { | 5207 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { |
5208 DCHECK(!obj || obj->IsNative()); | 5208 DCHECK(!obj || obj->IsNative()); |
5209 return static_cast<const BrowserAccessibilityWin*>(obj); | 5209 return static_cast<const BrowserAccessibilityWin*>(obj); |
5210 } | 5210 } |
5211 | 5211 |
5212 } // namespace content | 5212 } // namespace content |
OLD | NEW |