| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "views/widget/widget_win.h" | 9 #include "views/widget/widget_win.h" |
| 10 | 10 |
| (...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 if (state & AccessibilityTypes::STATE_OFFSCREEN) | 871 if (state & AccessibilityTypes::STATE_OFFSCREEN) |
| 872 msaa_state |= STATE_SYSTEM_OFFSCREEN; | 872 msaa_state |= STATE_SYSTEM_OFFSCREEN; |
| 873 if (state & AccessibilityTypes::STATE_PRESSED) | 873 if (state & AccessibilityTypes::STATE_PRESSED) |
| 874 msaa_state |= STATE_SYSTEM_PRESSED; | 874 msaa_state |= STATE_SYSTEM_PRESSED; |
| 875 if (state & AccessibilityTypes::STATE_PROTECTED) | 875 if (state & AccessibilityTypes::STATE_PROTECTED) |
| 876 msaa_state |= STATE_SYSTEM_PROTECTED; | 876 msaa_state |= STATE_SYSTEM_PROTECTED; |
| 877 if (state & AccessibilityTypes::STATE_READONLY) | 877 if (state & AccessibilityTypes::STATE_READONLY) |
| 878 msaa_state |= STATE_SYSTEM_READONLY; | 878 msaa_state |= STATE_SYSTEM_READONLY; |
| 879 if (state & AccessibilityTypes::STATE_SELECTED) | 879 if (state & AccessibilityTypes::STATE_SELECTED) |
| 880 msaa_state |= STATE_SYSTEM_SELECTED; | 880 msaa_state |= STATE_SYSTEM_SELECTED; |
| 881 if (state & AccessibilityTypes::STATE_FOCUSED) |
| 882 msaa_state |= STATE_SYSTEM_FOCUSED; |
| 881 if (state & AccessibilityTypes::STATE_UNAVAILABLE) | 883 if (state & AccessibilityTypes::STATE_UNAVAILABLE) |
| 882 msaa_state |= STATE_SYSTEM_UNAVAILABLE; | 884 msaa_state |= STATE_SYSTEM_UNAVAILABLE; |
| 883 return msaa_state; | 885 return msaa_state; |
| 884 } | 886 } |
| 885 | 887 |
| 886 HRESULT ViewAccessibility::GetNativeIAccessibleInterface( | 888 HRESULT ViewAccessibility::GetNativeIAccessibleInterface( |
| 887 views::NativeViewHost* native_host, IDispatch** disp_child) { | 889 views::NativeViewHost* native_host, IDispatch** disp_child) { |
| 888 if (!native_host || !disp_child) { | 890 if (!native_host || !disp_child) { |
| 889 return E_INVALIDARG; | 891 return E_INVALIDARG; |
| 890 } | 892 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 903 HWND native_view_window , IDispatch** disp_child) { | 905 HWND native_view_window , IDispatch** disp_child) { |
| 904 if (IsWindow(native_view_window)) { | 906 if (IsWindow(native_view_window)) { |
| 905 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, | 907 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, |
| 906 OBJID_CLIENT); | 908 OBJID_CLIENT); |
| 907 return ObjectFromLresult(ret, IID_IDispatch, 0, | 909 return ObjectFromLresult(ret, IID_IDispatch, 0, |
| 908 reinterpret_cast<void**>(disp_child)); | 910 reinterpret_cast<void**>(disp_child)); |
| 909 } | 911 } |
| 910 | 912 |
| 911 return E_FAIL; | 913 return E_FAIL; |
| 912 } | 914 } |
| OLD | NEW |