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 #ifndef UI_VIEWS_FOCUS_FOCUS_SEARCH_H_ | 5 #ifndef UI_VIEWS_FOCUS_FOCUS_SEARCH_H_ |
6 #define UI_VIEWS_FOCUS_FOCUS_SEARCH_H_ | 6 #define UI_VIEWS_FOCUS_FOCUS_SEARCH_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual bool Contains(View* root, const View* v); | 80 virtual bool Contains(View* root, const View* v); |
81 | 81 |
82 View* root() const { return root_; } | 82 View* root() const { return root_; } |
83 | 83 |
84 private: | 84 private: |
85 // Convenience method that returns true if a view is focusable and does not | 85 // Convenience method that returns true if a view is focusable and does not |
86 // belong to the specified group. | 86 // belong to the specified group. |
87 bool IsViewFocusableCandidate(View* v, int skip_group_id); | 87 bool IsViewFocusableCandidate(View* v, int skip_group_id); |
88 | 88 |
89 // Convenience method; returns true if a view is not NULL and is focusable | 89 // Convenience method; returns true if a view is not NULL and is focusable |
90 // (checking IsAccessibilityFocusable() if |accessibility_mode_| is true). | 90 // (checking IsAccessibilityFocusable() if |accessibility_mode_| is true or |
| 91 // the associated FocusManager has keyboard accessibility enabled). |
91 bool IsFocusable(View* v); | 92 bool IsFocusable(View* v); |
92 | 93 |
93 // Returns the view selected for the group of the selected view. If the view | 94 // Returns the view selected for the group of the selected view. If the view |
94 // does not belong to a group or if no view is selected in the group, the | 95 // does not belong to a group or if no view is selected in the group, the |
95 // specified view is returned. | 96 // specified view is returned. |
96 View* FindSelectedViewForGroup(View* view); | 97 View* FindSelectedViewForGroup(View* view); |
97 | 98 |
98 // Returns the next focusable view or view containing a FocusTraversable | 99 // Returns the next focusable view or view containing a FocusTraversable |
99 // (NULL if none was found), starting at the starting_view. | 100 // (NULL if none was found), starting at the starting_view. |
100 // |check_starting_view|, |can_go_up| and |can_go_down| controls the | 101 // |check_starting_view|, |can_go_up| and |can_go_down| controls the |
(...skipping 19 matching lines...) Expand all Loading... |
120 View* root_; | 121 View* root_; |
121 bool cycle_; | 122 bool cycle_; |
122 bool accessibility_mode_; | 123 bool accessibility_mode_; |
123 | 124 |
124 DISALLOW_COPY_AND_ASSIGN(FocusSearch); | 125 DISALLOW_COPY_AND_ASSIGN(FocusSearch); |
125 }; | 126 }; |
126 | 127 |
127 } // namespace views | 128 } // namespace views |
128 | 129 |
129 #endif // UI_VIEWS_FOCUS_FOCUS_SEARCH_H_ | 130 #endif // UI_VIEWS_FOCUS_FOCUS_SEARCH_H_ |
OLD | NEW |