Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: ui/views/focus/focus_manager.h

Issue 108063004: Give up focus if the focused view becomes unfocusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try to advance focus first Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MANAGER_H_ 5 #ifndef UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ 6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 // Get the reason why the focus most recently changed. 178 // Get the reason why the focus most recently changed.
179 FocusChangeReason focus_change_reason() const { 179 FocusChangeReason focus_change_reason() const {
180 return focus_change_reason_; 180 return focus_change_reason_;
181 } 181 }
182 182
183 // Clears the focused view. The window associated with the top root view gets 183 // Clears the focused view. The window associated with the top root view gets
184 // the native focus (so we still get keyboard events). 184 // the native focus (so we still get keyboard events).
185 void ClearFocus(); 185 void ClearFocus();
186 186
187 // Revises the focused view. Tries to advance focus if the focused view has
188 // become unfocusable.
189 void ReviseFocusedView();
190
187 // Validates the focused view, clearing it if the window it belongs too is not 191 // Validates the focused view, clearing it if the window it belongs too is not
188 // attached to the window hierarchy anymore. 192 // attached to the window hierarchy anymore.
189 void ValidateFocusedView(); 193 void ValidateFocusedView();
190 194
191 // Stores the focused view. Used when the widget loses activation. 195 // Stores the focused view. Used when the widget loses activation.
192 // |clear_native_focus| indicates whether this should invoke ClearFocus(). 196 // |clear_native_focus| indicates whether this should invoke ClearFocus().
193 // Typically |true| should be passed in. 197 // Typically |true| should be passed in.
194 void StoreFocusedView(bool clear_native_focus); 198 void StoreFocusedView(bool clear_native_focus);
195 199
196 // Restore the view saved with a previous call to StoreFocusedView(). Used 200 // Restore the view saved with a previous call to StoreFocusedView(). Used
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 367
364 // See description above getter. 368 // See description above getter.
365 bool is_changing_focus_; 369 bool is_changing_focus_;
366 370
367 DISALLOW_COPY_AND_ASSIGN(FocusManager); 371 DISALLOW_COPY_AND_ASSIGN(FocusManager);
368 }; 372 };
369 373
370 } // namespace views 374 } // namespace views
371 375
372 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ 376 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698