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

Unified 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: Return early if not focused Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/focus/focus_manager.h
diff --git a/ui/views/focus/focus_manager.h b/ui/views/focus/focus_manager.h
index ebdc2a3d88e2034ec7b08359af0546dddb9f07ce..bb62085522f74a588b7827b32f97e3c15fce0dfa 100644
--- a/ui/views/focus/focus_manager.h
+++ b/ui/views/focus/focus_manager.h
@@ -184,6 +184,10 @@ class VIEWS_EXPORT FocusManager {
// the native focus (so we still get keyboard events).
void ClearFocus();
+ // Tries to advance focus if the focused view has become unfocusable. If there
+ // is no view available to advance focus to, focus will be cleared.
+ void AdvanceFocusIfNecessary();
+
// Validates the focused view, clearing it if the window it belongs too is not
// attached to the window hierarchy anymore.
void ValidateFocusedView();

Powered by Google App Engine
This is Rietveld 408576698