OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/views/accessibility/native_view_accessibility_win.h" | 5 #include "ui/views/accessibility/native_view_accessibility_win.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlcom.h> | 8 #include <atlcom.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 VARIANT* msaa_state, views::View* view) { | 966 VARIANT* msaa_state, views::View* view) { |
967 // Ensure the output param is initialized to zero. | 967 // Ensure the output param is initialized to zero. |
968 msaa_state->lVal = 0; | 968 msaa_state->lVal = 0; |
969 | 969 |
970 // Default state; all views can have accessibility focus. | 970 // Default state; all views can have accessibility focus. |
971 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE; | 971 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE; |
972 | 972 |
973 if (!view) | 973 if (!view) |
974 return; | 974 return; |
975 | 975 |
976 if (!view->IsEnabled()) | 976 if (!view->enabled()) |
977 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE; | 977 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE; |
978 if (!view->IsVisible()) | 978 if (!view->IsVisible()) |
979 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE; | 979 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE; |
980 if (view->IsHotTracked()) | 980 if (view->IsHotTracked()) |
981 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED; | 981 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED; |
982 if (view->HasFocus()) | 982 if (view->HasFocus()) |
983 msaa_state->lVal |= STATE_SYSTEM_FOCUSED; | 983 msaa_state->lVal |= STATE_SYSTEM_FOCUSED; |
984 | 984 |
985 // Add on any view-specific states. | 985 // Add on any view-specific states. |
986 ui::AccessibleViewState view_state; | 986 ui::AccessibleViewState view_state; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 const string16& text, | 1025 const string16& text, |
1026 IA2TextBoundaryType ia2_boundary, | 1026 IA2TextBoundaryType ia2_boundary, |
1027 LONG start_offset, | 1027 LONG start_offset, |
1028 ui::TextBoundaryDirection direction) { | 1028 ui::TextBoundaryDirection direction) { |
1029 HandleSpecialTextOffset(text, &start_offset); | 1029 HandleSpecialTextOffset(text, &start_offset); |
1030 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); | 1030 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); |
1031 std::vector<int32> line_breaks; | 1031 std::vector<int32> line_breaks; |
1032 return ui::FindAccessibleTextBoundary( | 1032 return ui::FindAccessibleTextBoundary( |
1033 text, line_breaks, boundary, start_offset, direction); | 1033 text, line_breaks, boundary, start_offset, direction); |
1034 } | 1034 } |
OLD | NEW |