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

Unified Diff: ui/views/accessible_pane_view.h

Issue 10949005: Fix toolbar keyboard accessibility on Views (alternative impl). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test on linux_chromeos Created 8 years, 3 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/accessible_pane_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/accessible_pane_view.h
diff --git a/ui/views/accessible_pane_view.h b/ui/views/accessible_pane_view.h
index 0d563d7c726d60523f6894e02420dba0648556db..f15bbedb034a39a8fb7e5026e2dddcbecca65969 100644
--- a/ui/views/accessible_pane_view.h
+++ b/ui/views/accessible_pane_view.h
@@ -57,11 +57,27 @@ class VIEWS_EXPORT AccessiblePaneView : public View,
virtual FocusTraversable* GetFocusTraversableParent() OVERRIDE;
virtual View* GetFocusTraversableParentView() OVERRIDE;
+ // For testing only.
+ const ui::Accelerator& home_key() const { return home_key_; }
+ const ui::Accelerator& end_key() const { return end_key_; }
+ const ui::Accelerator& escape_key() const { return escape_key_; }
+ const ui::Accelerator& left_key() const { return left_key_; }
+ const ui::Accelerator& right_key() const { return right_key_; }
+
protected:
// A subclass can override this to provide a default focusable child
// other than the first focusable child.
virtual View* GetDefaultFocusableChild();
+ // Returns the parent of |v|. Subclasses can override this if
+ // they need custom focus search behavior.
+ virtual View* GetParentForFocusSearch(View* v);
+
+ // Returns true if |v| is contained within the hierarchy rooted at |root|
+ // for the purpose of focus searching. Subclasses can override this if
+ // they need custom focus search behavior.
+ virtual bool ContainsForFocusSearch(View* root, const View* v);
+
// Remove pane focus.
virtual void RemovePaneFocus();
@@ -70,6 +86,9 @@ class VIEWS_EXPORT AccessiblePaneView : public View,
View* GetFirstFocusableChild();
View* GetLastFocusableChild();
+ FocusManager* focus_manager() const { return focus_manager_; }
+
+ private:
bool pane_has_focus_;
base::WeakPtrFactory<AccessiblePaneView> method_factory_;
@@ -90,6 +109,8 @@ class VIEWS_EXPORT AccessiblePaneView : public View,
ui::Accelerator left_key_;
ui::Accelerator right_key_;
+ friend class AccessiblePaneViewFocusSearch;
+
DISALLOW_COPY_AND_ASSIGN(AccessiblePaneView);
};
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | ui/views/accessible_pane_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698