OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <atlbase.h> | 5 #include <atlbase.h> |
6 #include <atlcom.h> | 6 #include <atlcom.h> |
7 #include <limits.h> | 7 #include <limits.h> |
8 #include <oleacc.h> | 8 #include <oleacc.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 return S_OK; | 971 return S_OK; |
972 } | 972 } |
973 | 973 |
974 // | 974 // |
975 // IAccessible2 methods not implemented. | 975 // IAccessible2 methods not implemented. |
976 // | 976 // |
977 | 977 |
978 STDMETHODIMP AXPlatformNodeWin::get_attribute(BSTR name, VARIANT* attribute) { | 978 STDMETHODIMP AXPlatformNodeWin::get_attribute(BSTR name, VARIANT* attribute) { |
979 return E_NOTIMPL; | 979 return E_NOTIMPL; |
980 } | 980 } |
| 981 |
981 STDMETHODIMP AXPlatformNodeWin::get_extendedRole(BSTR* extended_role) { | 982 STDMETHODIMP AXPlatformNodeWin::get_extendedRole(BSTR* extended_role) { |
| 983 WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_EXTENDED_ROLE); |
982 return E_NOTIMPL; | 984 return E_NOTIMPL; |
983 } | 985 } |
| 986 |
984 STDMETHODIMP AXPlatformNodeWin::get_nRelations(LONG* n_relations) { | 987 STDMETHODIMP AXPlatformNodeWin::get_nRelations(LONG* n_relations) { |
985 return E_NOTIMPL; | 988 return E_NOTIMPL; |
986 } | 989 } |
| 990 |
987 STDMETHODIMP AXPlatformNodeWin::get_relation(LONG relation_index, | 991 STDMETHODIMP AXPlatformNodeWin::get_relation(LONG relation_index, |
988 IAccessibleRelation** relation) { | 992 IAccessibleRelation** relation) { |
989 return E_NOTIMPL; | 993 return E_NOTIMPL; |
990 } | 994 } |
| 995 |
991 STDMETHODIMP AXPlatformNodeWin::get_relations(LONG max_relations, | 996 STDMETHODIMP AXPlatformNodeWin::get_relations(LONG max_relations, |
992 IAccessibleRelation** relations, | 997 IAccessibleRelation** relations, |
993 LONG* n_relations) { | 998 LONG* n_relations) { |
994 return E_NOTIMPL; | 999 return E_NOTIMPL; |
995 } | 1000 } |
| 1001 |
996 STDMETHODIMP AXPlatformNodeWin::scrollTo(enum IA2ScrollType scroll_type) { | 1002 STDMETHODIMP AXPlatformNodeWin::scrollTo(enum IA2ScrollType scroll_type) { |
997 return E_NOTIMPL; | 1003 return E_NOTIMPL; |
998 } | 1004 } |
| 1005 |
999 STDMETHODIMP AXPlatformNodeWin::scrollToPoint( | 1006 STDMETHODIMP AXPlatformNodeWin::scrollToPoint( |
1000 enum IA2CoordinateType coordinate_type, | 1007 enum IA2CoordinateType coordinate_type, |
1001 LONG x, | 1008 LONG x, |
1002 LONG y) { | 1009 LONG y) { |
1003 return E_NOTIMPL; | 1010 return E_NOTIMPL; |
1004 } | 1011 } |
| 1012 |
1005 STDMETHODIMP AXPlatformNodeWin::get_groupPosition(LONG* group_level, | 1013 STDMETHODIMP AXPlatformNodeWin::get_groupPosition(LONG* group_level, |
1006 LONG* similar_items_in_group, | 1014 LONG* similar_items_in_group, |
1007 LONG* position_in_group) { | 1015 LONG* position_in_group) { |
1008 return E_NOTIMPL; | 1016 return E_NOTIMPL; |
1009 } | 1017 } |
| 1018 |
1010 STDMETHODIMP AXPlatformNodeWin::get_localizedExtendedRole( | 1019 STDMETHODIMP AXPlatformNodeWin::get_localizedExtendedRole( |
1011 BSTR* localized_extended_role) { | 1020 BSTR* localized_extended_role) { |
1012 return E_NOTIMPL; | 1021 return E_NOTIMPL; |
1013 } | 1022 } |
| 1023 |
1014 STDMETHODIMP AXPlatformNodeWin::get_nExtendedStates(LONG* n_extended_states) { | 1024 STDMETHODIMP AXPlatformNodeWin::get_nExtendedStates(LONG* n_extended_states) { |
| 1025 WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_N_EXTENDED_STATES); |
1015 return E_NOTIMPL; | 1026 return E_NOTIMPL; |
1016 } | 1027 } |
| 1028 |
1017 STDMETHODIMP AXPlatformNodeWin::get_extendedStates(LONG max_extended_states, | 1029 STDMETHODIMP AXPlatformNodeWin::get_extendedStates(LONG max_extended_states, |
1018 BSTR** extended_states, | 1030 BSTR** extended_states, |
1019 LONG* n_extended_states) { | 1031 LONG* n_extended_states) { |
| 1032 WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_EXTENDED_STATES); |
1020 return E_NOTIMPL; | 1033 return E_NOTIMPL; |
1021 } | 1034 } |
| 1035 |
1022 STDMETHODIMP AXPlatformNodeWin::get_localizedExtendedStates( | 1036 STDMETHODIMP AXPlatformNodeWin::get_localizedExtendedStates( |
1023 LONG max_localized_extended_states, | 1037 LONG max_localized_extended_states, |
1024 BSTR** localized_extended_states, | 1038 BSTR** localized_extended_states, |
1025 LONG* n_localized_extended_states) { | 1039 LONG* n_localized_extended_states) { |
| 1040 WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_LOCALIZED_EXTENDED_STATES); |
| 1041 |
1026 return E_NOTIMPL; | 1042 return E_NOTIMPL; |
1027 } | 1043 } |
| 1044 |
1028 STDMETHODIMP AXPlatformNodeWin::get_locale(IA2Locale* locale) { | 1045 STDMETHODIMP AXPlatformNodeWin::get_locale(IA2Locale* locale) { |
| 1046 WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_LOCALE); |
1029 return E_NOTIMPL; | 1047 return E_NOTIMPL; |
1030 } | 1048 } |
| 1049 |
1031 STDMETHODIMP AXPlatformNodeWin::get_accessibleWithCaret(IUnknown** accessible, | 1050 STDMETHODIMP AXPlatformNodeWin::get_accessibleWithCaret(IUnknown** accessible, |
1032 long* caret_offset) { | 1051 long* caret_offset) { |
1033 return E_NOTIMPL; | 1052 return E_NOTIMPL; |
1034 } | 1053 } |
1035 | 1054 |
1036 // | 1055 // |
1037 // IAccessibleTable methods. | 1056 // IAccessibleTable methods. |
1038 // | 1057 // |
1039 | 1058 |
1040 STDMETHODIMP AXPlatformNodeWin::get_accessibleAt(long row, | 1059 STDMETHODIMP AXPlatformNodeWin::get_accessibleAt(long row, |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1869 REFGUID guidService, REFIID riid, void** object) { | 1888 REFGUID guidService, REFIID riid, void** object) { |
1870 COM_OBJECT_VALIDATE_1_ARG(object); | 1889 COM_OBJECT_VALIDATE_1_ARG(object); |
1871 | 1890 |
1872 if (riid == IID_IAccessible2) { | 1891 if (riid == IID_IAccessible2) { |
1873 for (IAccessible2UsageObserver& observer : | 1892 for (IAccessible2UsageObserver& observer : |
1874 GetIAccessible2UsageObserverList()) { | 1893 GetIAccessible2UsageObserverList()) { |
1875 observer.OnIAccessible2Used(); | 1894 observer.OnIAccessible2Used(); |
1876 } | 1895 } |
1877 } | 1896 } |
1878 | 1897 |
1879 if (guidService == IID_IAccessible || | 1898 if (guidService == IID_IAccessible || guidService == IID_IAccessible2 || |
1880 guidService == IID_IAccessible2 || | |
1881 guidService == IID_IAccessible2_2 || | 1899 guidService == IID_IAccessible2_2 || |
| 1900 guidService == IID_IAccessibleTable || |
| 1901 guidService == IID_IAccessibleTable2 || |
| 1902 guidService == IID_IAccessibleTableCell || |
1882 guidService == IID_IAccessibleText) { | 1903 guidService == IID_IAccessibleText) { |
1883 return QueryInterface(riid, object); | 1904 return QueryInterface(riid, object); |
1884 } | 1905 } |
1885 | 1906 |
1886 *object = nullptr; | 1907 *object = nullptr; |
1887 return E_FAIL; | 1908 return E_FAIL; |
1888 } | 1909 } |
1889 | 1910 |
1890 // | 1911 // |
1891 // Private member functions. | 1912 // Private member functions. |
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3056 if (container && container->GetData().role == ui::AX_ROLE_GROUP) | 3077 if (container && container->GetData().role == ui::AX_ROLE_GROUP) |
3057 container = FromNativeViewAccessible(container->GetParent()); | 3078 container = FromNativeViewAccessible(container->GetParent()); |
3058 | 3079 |
3059 if (!container) | 3080 if (!container) |
3060 return false; | 3081 return false; |
3061 | 3082 |
3062 return container->GetData().role == ui::AX_ROLE_TREE_GRID; | 3083 return container->GetData().role == ui::AX_ROLE_TREE_GRID; |
3063 } | 3084 } |
3064 | 3085 |
3065 } // namespace ui | 3086 } // namespace ui |
OLD | NEW |