| 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 3829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3840 win_attributes_->ia2_attributes.push_back(L"sort:descending"); | 3840 win_attributes_->ia2_attributes.push_back(L"sort:descending"); |
| 3841 break; | 3841 break; |
| 3842 case ui::AX_SORT_DIRECTION_OTHER: | 3842 case ui::AX_SORT_DIRECTION_OTHER: |
| 3843 win_attributes_->ia2_attributes.push_back(L"sort:other"); | 3843 win_attributes_->ia2_attributes.push_back(L"sort:other"); |
| 3844 break; | 3844 break; |
| 3845 } | 3845 } |
| 3846 } | 3846 } |
| 3847 | 3847 |
| 3848 win_attributes_->name = GetString16Attribute(ui::AX_ATTR_NAME); | 3848 win_attributes_->name = GetString16Attribute(ui::AX_ATTR_NAME); |
| 3849 win_attributes_->description = GetString16Attribute(ui::AX_ATTR_DESCRIPTION); | 3849 win_attributes_->description = GetString16Attribute(ui::AX_ATTR_DESCRIPTION); |
| 3850 StringAttributeToIA2(ui::AX_ATTR_PLACEHOLDER, "placeholder"); |
| 3850 | 3851 |
| 3851 base::string16 value = GetValue(); | 3852 base::string16 value = GetValue(); |
| 3852 // On Windows, the value of a document should be its url. | 3853 // On Windows, the value of a document should be its url. |
| 3853 if (GetRole() == ui::AX_ROLE_ROOT_WEB_AREA || | 3854 if (GetRole() == ui::AX_ROLE_ROOT_WEB_AREA || |
| 3854 GetRole() == ui::AX_ROLE_WEB_AREA) { | 3855 GetRole() == ui::AX_ROLE_WEB_AREA) { |
| 3855 value = base::UTF8ToUTF16(manager()->GetTreeData().url); | 3856 value = base::UTF8ToUTF16(manager()->GetTreeData().url); |
| 3856 } | 3857 } |
| 3857 // If this doesn't have a value and is linked then set its value to the url | 3858 // If this doesn't have a value and is linked then set its value to the url |
| 3858 // attribute. This allows screen readers to read an empty link's destination. | 3859 // attribute. This allows screen readers to read an empty link's destination. |
| 3859 if (value.empty() && (ia_state() & STATE_SYSTEM_LINKED)) | 3860 if (value.empty() && (ia_state() & STATE_SYSTEM_LINKED)) |
| (...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5531 return static_cast<BrowserAccessibilityWin*>(obj); | 5532 return static_cast<BrowserAccessibilityWin*>(obj); |
| 5532 } | 5533 } |
| 5533 | 5534 |
| 5534 const BrowserAccessibilityWin* | 5535 const BrowserAccessibilityWin* |
| 5535 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { | 5536 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { |
| 5536 DCHECK(!obj || obj->IsNative()); | 5537 DCHECK(!obj || obj->IsNative()); |
| 5537 return static_cast<const BrowserAccessibilityWin*>(obj); | 5538 return static_cast<const BrowserAccessibilityWin*>(obj); |
| 5538 } | 5539 } |
| 5539 | 5540 |
| 5540 } // namespace content | 5541 } // namespace content |
| OLD | NEW |