| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 VIEWS_WIDGET_ROOT_VIEW_H_ | 5 #ifndef VIEWS_WIDGET_ROOT_VIEW_H_ |
| 6 #define VIEWS_WIDGET_ROOT_VIEW_H_ | 6 #define VIEWS_WIDGET_ROOT_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // MouseWheel events are sent on the focus path. | 137 // MouseWheel events are sent on the focus path. |
| 138 virtual bool ProcessMouseWheelEvent(const MouseWheelEvent& e); | 138 virtual bool ProcessMouseWheelEvent(const MouseWheelEvent& e); |
| 139 | 139 |
| 140 // Overridden to handle special root view case. | 140 // Overridden to handle special root view case. |
| 141 virtual bool IsVisibleInRootView() const; | 141 virtual bool IsVisibleInRootView() const; |
| 142 | 142 |
| 143 // FocusTraversable implementation. | 143 // FocusTraversable implementation. |
| 144 virtual View* FindNextFocusableView(View* starting_view, | 144 virtual View* FindNextFocusableView(View* starting_view, |
| 145 bool reverse, | 145 bool reverse, |
| 146 Direction direction, | 146 Direction direction, |
| 147 bool dont_loop, | 147 bool check_starting_view, |
| 148 FocusTraversable** focus_traversable, | 148 FocusTraversable** focus_traversable, |
| 149 View** focus_traversable_view); | 149 View** focus_traversable_view); |
| 150 virtual FocusTraversable* GetFocusTraversableParent(); | 150 virtual FocusTraversable* GetFocusTraversableParent(); |
| 151 virtual View* GetFocusTraversableParentView(); | 151 virtual View* GetFocusTraversableParentView(); |
| 152 | 152 |
| 153 // Used to set the FocusTraversable parent after the view has been created | 153 // Used to set the FocusTraversable parent after the view has been created |
| 154 // (typically when the hierarchy changes and this RootView is added/removed). | 154 // (typically when the hierarchy changes and this RootView is added/removed). |
| 155 virtual void SetFocusTraversableParent(FocusTraversable* focus_traversable); | 155 virtual void SetFocusTraversableParent(FocusTraversable* focus_traversable); |
| 156 | 156 |
| 157 // Used to set the View parent after the view has been created. | 157 // Used to set the View parent after the view has been created. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // notifies the appropriate views. | 207 // notifies the appropriate views. |
| 208 void ViewBoundsChanged(View* view, bool size_changed, bool position_changed); | 208 void ViewBoundsChanged(View* view, bool size_changed, bool position_changed); |
| 209 | 209 |
| 210 // Registers a view for notification when the visible bounds relative to the | 210 // Registers a view for notification when the visible bounds relative to the |
| 211 // root of a view changes. | 211 // root of a view changes. |
| 212 void RegisterViewForVisibleBoundsNotification(View* view); | 212 void RegisterViewForVisibleBoundsNotification(View* view); |
| 213 void UnregisterViewForVisibleBoundsNotification(View* view); | 213 void UnregisterViewForVisibleBoundsNotification(View* view); |
| 214 | 214 |
| 215 // Returns the next focusable view or view containing a FocusTraversable (NULL | 215 // Returns the next focusable view or view containing a FocusTraversable (NULL |
| 216 // if none was found), starting at the starting_view. | 216 // if none was found), starting at the starting_view. |
| 217 // skip_starting_view, can_go_up and can_go_down controls the traversal of | 217 // check_starting_view, can_go_up and can_go_down controls the traversal of |
| 218 // the views hierarchy. | 218 // the views hierarchy. |
| 219 // skip_group_id specifies a group_id, -1 means no group. All views from a | 219 // skip_group_id specifies a group_id, -1 means no group. All views from a |
| 220 // group are traversed in one pass. | 220 // group are traversed in one pass. |
| 221 View* FindNextFocusableViewImpl(View* starting_view, | 221 View* FindNextFocusableViewImpl(View* starting_view, |
| 222 bool skip_starting_view, | 222 bool check_starting_view, |
| 223 bool can_go_up, | 223 bool can_go_up, |
| 224 bool can_go_down, | 224 bool can_go_down, |
| 225 int skip_group_id); | 225 int skip_group_id, |
| 226 FocusTraversable** focus_traversable, |
| 227 View** focus_traversable_view); |
| 226 | 228 |
| 227 // Same as FindNextFocusableViewImpl but returns the previous focusable view. | 229 // Same as FindNextFocusableViewImpl but returns the previous focusable view. |
| 228 View* FindPreviousFocusableViewImpl(View* starting_view, | 230 View* FindPreviousFocusableViewImpl(View* starting_view, |
| 229 bool skip_starting_view, | 231 bool check_starting_view, |
| 230 bool can_go_up, | 232 bool can_go_up, |
| 231 bool can_go_down, | 233 bool can_go_down, |
| 232 int skip_group_id); | 234 int skip_group_id, |
| 235 FocusTraversable** focus_traversable, |
| 236 View** focus_traversable_view); |
| 233 | 237 |
| 234 // Convenience method that returns true if a view is focusable and does not | 238 // Convenience method that returns true if a view is focusable and does not |
| 235 // belong to the specified group. | 239 // belong to the specified group. |
| 236 bool IsViewFocusableCandidate(View* v, int skip_group_id); | 240 bool IsViewFocusableCandidate(View* v, int skip_group_id); |
| 237 | 241 |
| 238 // Returns the view selected for the group of the selected view. If the view | 242 // Returns the view selected for the group of the selected view. If the view |
| 239 // does not belong to a group or if no view is selected in the group, the | 243 // does not belong to a group or if no view is selected in the group, the |
| 240 // specified view is returned. | 244 // specified view is returned. |
| 241 static View* FindSelectedViewForGroup(View* view); | 245 static View* FindSelectedViewForGroup(View* view); |
| 242 | 246 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 339 |
| 336 #ifndef NDEBUG | 340 #ifndef NDEBUG |
| 337 // True if we're currently processing paint. | 341 // True if we're currently processing paint. |
| 338 bool is_processing_paint_; | 342 bool is_processing_paint_; |
| 339 #endif | 343 #endif |
| 340 }; | 344 }; |
| 341 | 345 |
| 342 } // namespace views | 346 } // namespace views |
| 343 | 347 |
| 344 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ | 348 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ |
| OLD | NEW |