Chromium Code Reviews| 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..3491f125c2d1340dbda4ed9bb1330ebbc4690f29 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. In case, the stored view is no longer focusable, |
|
tapted
2016/03/15 05:05:32
nit: no comma after 'case'
karandeepb
2016/03/17 07:24:46
Done.
|
| + // it advances focus and returns false. |
| bool RestoreFocusedView(); |
| // Sets the |view| to be restored when calling RestoreFocusView. This is used |
| @@ -325,6 +326,12 @@ class VIEWS_EXPORT FocusManager { |
| bool reverse, |
| bool dont_loop); |
| + bool keyboard_accessible() const { return keyboard_accessible_; } |
| + |
| + // Updates |keyboard_accessible_| to the given value and advances focus if |
| + // necessary. |
| + void SetKeyboardAccessible(bool keyboard_accessible); |
| + |
| private: |
| // Returns the focusable view found in the FocusTraversable specified starting |
| // at the specified view. This traverses down along the FocusTraversable |
| @@ -338,6 +345,11 @@ class VIEWS_EXPORT FocusManager { |
| // and should not be processed further. |
| bool ProcessArrowKeyTraversal(const ui::KeyEvent& event); |
| + // Returns true if the |view| is focusable (checking |
| + // IsAccessibilityFocusable() if |keyboard_accessible_ | is true). |view| |
|
tapted
2016/03/15 05:05:32
nit: spacing after keyboard_accessible_
Also I th
karandeepb
2016/03/17 07:24:47
Done.
|
| + // must not be null. |
| + bool IsFocusable(View* view) const; |
| + |
| // 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 which causes |
|
tapted
2016/03/15 05:05:32
nit: True if full keyboard accessibility is needed
karandeepb
2016/03/17 07:24:46
Done.
|
| + // IsAccessibilityFocusable() to be checked rather than IsFocusable(). This |
| + // can be set depending on platform constraints. For example, on Mac, this is |
| + // true when Full Keyboard Access mode is on. FocusSearch uses this in |
| + // addition to its own accessibility mode, which handles accessibility at the |
| + // FocusTraversable level. Default value is false. |
| + bool keyboard_accessible_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(FocusManager); |
| }; |