| 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 static_cast<base::win::IUnknownImpl*>(enum_variant)); | 787 static_cast<base::win::IUnknownImpl*>(enum_variant)); |
| 788 return S_OK; | 788 return S_OK; |
| 789 } | 789 } |
| 790 | 790 |
| 791 STDMETHODIMP BrowserAccessibilityComWin::accSelect(LONG flags_sel, | 791 STDMETHODIMP BrowserAccessibilityComWin::accSelect(LONG flags_sel, |
| 792 VARIANT var_id) { | 792 VARIANT var_id) { |
| 793 WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_ACC_SELECT); | 793 WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_ACC_SELECT); |
| 794 if (!owner()) | 794 if (!owner()) |
| 795 return E_FAIL; | 795 return E_FAIL; |
| 796 | 796 |
| 797 auto* manager = Manager(); | 797 return AXPlatformNodeWin::accSelect(flags_sel, var_id); |
| 798 if (!manager) | |
| 799 return E_FAIL; | |
| 800 | |
| 801 if (flags_sel & SELFLAG_TAKEFOCUS) { | |
| 802 manager->SetFocus(*owner()); | |
| 803 return S_OK; | |
| 804 } | |
| 805 | |
| 806 return S_FALSE; | |
| 807 } | 798 } |
| 808 | 799 |
| 809 STDMETHODIMP | 800 STDMETHODIMP |
| 810 BrowserAccessibilityComWin::put_accName(VARIANT var_id, BSTR put_name) { | 801 BrowserAccessibilityComWin::put_accName(VARIANT var_id, BSTR put_name) { |
| 811 return E_NOTIMPL; | 802 return E_NOTIMPL; |
| 812 } | 803 } |
| 813 STDMETHODIMP | 804 STDMETHODIMP |
| 814 BrowserAccessibilityComWin::put_accValue(VARIANT var_id, BSTR put_val) { | 805 BrowserAccessibilityComWin::put_accValue(VARIANT var_id, BSTR put_val) { |
| 815 return E_NOTIMPL; | 806 return E_NOTIMPL; |
| 816 } | 807 } |
| (...skipping 4817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5634 | 5625 |
| 5635 BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( | 5626 BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( |
| 5636 BrowserAccessibility* obj) { | 5627 BrowserAccessibility* obj) { |
| 5637 if (!obj || !obj->IsNative()) | 5628 if (!obj || !obj->IsNative()) |
| 5638 return nullptr; | 5629 return nullptr; |
| 5639 auto* result = static_cast<BrowserAccessibilityWin*>(obj)->GetCOM(); | 5630 auto* result = static_cast<BrowserAccessibilityWin*>(obj)->GetCOM(); |
| 5640 return result; | 5631 return result; |
| 5641 } | 5632 } |
| 5642 | 5633 |
| 5643 } // namespace content | 5634 } // namespace content |
| OLD | NEW |