| 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 4087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4098 // Detach BrowserAccessibilityWin from us. | 4098 // Detach BrowserAccessibilityWin from us. |
| 4099 owner_ = nullptr; | 4099 owner_ = nullptr; |
| 4100 AXPlatformNodeWin::Destroy(); | 4100 AXPlatformNodeWin::Destroy(); |
| 4101 } | 4101 } |
| 4102 | 4102 |
| 4103 void BrowserAccessibilityComWin::Init(ui::AXPlatformNodeDelegate* delegate) { | 4103 void BrowserAccessibilityComWin::Init(ui::AXPlatformNodeDelegate* delegate) { |
| 4104 owner_ = static_cast<BrowserAccessibilityWin*>(delegate); | 4104 owner_ = static_cast<BrowserAccessibilityWin*>(delegate); |
| 4105 AXPlatformNodeBase::Init(delegate); | 4105 AXPlatformNodeBase::Init(delegate); |
| 4106 } | 4106 } |
| 4107 | 4107 |
| 4108 ui::AXPlatformNode* BrowserAccessibilityComWin::GetFromUniqueId( |
| 4109 int32_t unique_id) { |
| 4110 return ToBrowserAccessibilityComWin( |
| 4111 BrowserAccessibility::GetFromUniqueID(unique_id)); |
| 4112 } |
| 4113 |
| 4108 std::vector<base::string16> BrowserAccessibilityComWin::ComputeTextAttributes() | 4114 std::vector<base::string16> BrowserAccessibilityComWin::ComputeTextAttributes() |
| 4109 const { | 4115 const { |
| 4110 std::vector<base::string16> attributes; | 4116 std::vector<base::string16> attributes; |
| 4111 | 4117 |
| 4112 // We include list markers for now, but there might be other objects that are | 4118 // We include list markers for now, but there might be other objects that are |
| 4113 // auto generated. | 4119 // auto generated. |
| 4114 // TODO(nektar): Compute what objects are auto-generated in Blink. | 4120 // TODO(nektar): Compute what objects are auto-generated in Blink. |
| 4115 if (owner()->GetRole() == ui::AX_ROLE_LIST_MARKER) | 4121 if (owner()->GetRole() == ui::AX_ROLE_LIST_MARKER) |
| 4116 attributes.push_back(L"auto-generated:true"); | 4122 attributes.push_back(L"auto-generated:true"); |
| 4117 else | 4123 else |
| (...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5731 | 5737 |
| 5732 BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( | 5738 BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( |
| 5733 BrowserAccessibility* obj) { | 5739 BrowserAccessibility* obj) { |
| 5734 if (!obj || !obj->IsNative()) | 5740 if (!obj || !obj->IsNative()) |
| 5735 return nullptr; | 5741 return nullptr; |
| 5736 auto* result = static_cast<BrowserAccessibilityWin*>(obj)->GetCOM(); | 5742 auto* result = static_cast<BrowserAccessibilityWin*>(obj)->GetCOM(); |
| 5737 return result; | 5743 return result; |
| 5738 } | 5744 } |
| 5739 | 5745 |
| 5740 } // namespace content | 5746 } // namespace content |
| OLD | NEW |