| Index: ui/views/focus/focus_manager.h
|
| diff --git a/ui/views/focus/focus_manager.h b/ui/views/focus/focus_manager.h
|
| index e8eb3a045432364a0177392a1914ab55de09e938..ce3a88f43abb378b07bd567889760168b8389aa1 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,
|
| + // 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,10 @@ class VIEWS_EXPORT FocusManager {
|
| // and should not be processed further.
|
| bool ProcessArrowKeyTraversal(const ui::KeyEvent& event);
|
|
|
| + // Returns true if the |view| is accessibility focusable (checking
|
| + // IsFocusable() if |keyboard_accessible_| is false on Mac).
|
| + bool IsFocusable(View* view) const;
|
| +
|
| // Whether arrow key traversal is enabled.
|
| static bool arrow_key_traversal_enabled_;
|
|
|
| @@ -370,6 +381,15 @@ class VIEWS_EXPORT FocusManager {
|
| // See description above getter.
|
| bool is_changing_focus_;
|
|
|
| + // This is true if full keyboard accessibility is needed. This causes
|
| + // 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. Currently only used on Mac.
|
| + // Default value is false.
|
| + bool keyboard_accessible_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(FocusManager);
|
| };
|
|
|
|
|