| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "views/accessibility/view_accessibility.h" | 5 #include "views/accessibility/view_accessibility.h" |
| 6 | 6 |
| 7 #include "views/accessibility/view_accessibility_wrapper.h" | 7 #include "views/accessibility/view_accessibility_wrapper.h" |
| 8 #include "views/widget/widget.h" | 8 #include "views/widget/widget.h" |
| 9 | 9 |
| 10 const wchar_t kViewsUninitializeAccessibilityInstance[] = | 10 const wchar_t kViewsUninitializeAccessibilityInstance[] = |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 // Deprecated. | 767 // Deprecated. |
| 768 return E_NOTIMPL; | 768 return E_NOTIMPL; |
| 769 } | 769 } |
| 770 | 770 |
| 771 HRESULT ViewAccessibility::GetNativeIAccessibleInterface( | 771 HRESULT ViewAccessibility::GetNativeIAccessibleInterface( |
| 772 views::NativeViewHost* native_host, IDispatch** disp_child) { | 772 views::NativeViewHost* native_host, IDispatch** disp_child) { |
| 773 if (!native_host || !disp_child) { | 773 if (!native_host || !disp_child) { |
| 774 return E_INVALIDARG; | 774 return E_INVALIDARG; |
| 775 } | 775 } |
| 776 | 776 |
| 777 HWND render_view_window = | 777 HWND native_view_window = |
| 778 static_cast<HWND>(GetProp(native_host->native_view(), | 778 static_cast<HWND>(GetProp(native_host->native_view(), |
| 779 kViewsNativeHostPropForAccessibility)); | 779 kViewsNativeHostPropForAccessibility)); |
| 780 if (!IsWindow(native_view_window)) { |
| 781 native_view_window = native_host->native_view(); |
| 782 } |
| 780 | 783 |
| 781 if (IsWindow(render_view_window)) { | 784 if (IsWindow(native_view_window)) { |
| 782 LRESULT ret = SendMessage(render_view_window, WM_GETOBJECT, 0, | 785 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, |
| 783 OBJID_CLIENT); | 786 OBJID_CLIENT); |
| 784 return ObjectFromLresult(ret, IID_IDispatch, 0, | 787 return ObjectFromLresult(ret, IID_IDispatch, 0, |
| 785 reinterpret_cast<void**>(disp_child)); | 788 reinterpret_cast<void**>(disp_child)); |
| 786 } | 789 } |
| 787 | 790 |
| 788 return E_FAIL; | 791 return E_FAIL; |
| 789 } | 792 } |
| OLD | NEW |