Index: ui/views/focus/focus_manager.h |
diff --git a/ui/views/focus/focus_manager.h b/ui/views/focus/focus_manager.h |
index 6d5195e45e605fbbdb593be543b748172895c734..5d6b091f21d77b30d531f5a78d0b4ccc5c47d0af 100644 |
--- a/ui/views/focus/focus_manager.h |
+++ b/ui/views/focus/focus_manager.h |
@@ -201,7 +201,8 @@ class VIEWS_EXPORT FocusManager { |
// Restore the view saved with a previous call to StoreFocusedView(). Used |
// when the widget becomes active. Returns true when the previous view was |
- // successfully refocused - otherwise false. |
+ // successfully refocused - otherwise false. In case, the stored view is no |
+ // longer focusable, it advances focus and returns false. |
bool RestoreFocusedView(); |
// Sets the |view| to be restored when calling RestoreFocusView. This is used |
@@ -325,6 +326,13 @@ class VIEWS_EXPORT FocusManager { |
bool reverse, |
bool dont_loop); |
+ // Returns keyboard_accessibility_. |
+ bool IsKeyboardAccessibilityEnabled() { return keyboard_accessibility_; } |
tapted
2016/02/23 03:01:19
for accessors like this, we just do
bool keyboard
karandeepb
2016/03/15 02:19:50
Done.
|
+ |
+ // Updates keyboard_accessibility_ to the given value and advances focus if |
tapted
2016/02/23 03:01:19
keyboard_accessibility_ -> |keyboard_accessibility
karandeepb
2016/03/15 02:19:50
Done.
|
+ // necessary. |
+ void SetKeyboardAccessibility(bool keyboard_accessibility); |
+ |
private: |
// Returns the focusable view found in the FocusTraversable specified starting |
// at the specified view. This traverses down along the FocusTraversable |
@@ -338,6 +346,10 @@ class VIEWS_EXPORT FocusManager { |
// and should not be processed further. |
bool ProcessArrowKeyTraversal(const ui::KeyEvent& event); |
+ // Returns true if a view is not NULL and is focusable (checking |
tapted
2016/02/23 03:01:20
NULL -> null
karandeepb
2016/03/15 02:19:51
Done.
|
+ // IsAccessibilityFocusable() if keyboard_accessibility_ is true). |
tapted
2016/02/23 03:01:20
keyboard_accessibility_ -> |keyboard_accessibility
karandeepb
2016/03/15 02:19:50
Done.
|
+ bool IsFocusable(View* view); |
tapted
2016/02/23 03:01:19
const method?
karandeepb
2016/03/15 02:19:50
Done.
|
+ |
// Whether arrow key traversal is enabled. |
static bool arrow_key_traversal_enabled_; |
@@ -370,6 +382,14 @@ class VIEWS_EXPORT FocusManager { |
// See description above getter. |
bool is_changing_focus_; |
+ // This is true if full keyboard accessibility is needed and you want to |
tapted
2016/02/23 03:01:20
`you want to check` sounds funny. Perhaps `FocusSe
karandeepb
2016/03/15 02:19:50
Done.
|
+ // check IsAccessibilityFocusable(), rather than IsFocusable(). This can be |
+ // set depending on platform constraints, for example, on Mac, this is true |
tapted
2016/02/23 03:01:20
`constraints, for example,` -> `constraints. For E
karandeepb
2016/03/15 02:19:50
Done.
|
+ // when Full Keyboard Access mode is on. FocusSearch uses this in addition to |
+ // its own accessibility mode, which handles accessibility at the view level. |
+ // Default value is false. |
+ bool keyboard_accessibility_; |
tapted
2016/02/23 03:01:20
maybe `keyboard_accessible_` is a better name
karandeepb
2016/03/15 02:19:50
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(FocusManager); |
}; |