diff options
author | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 05:32:25 +0000 |
---|---|---|
committer | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 05:32:25 +0000 |
commit | b9376951e95e4cb1dda5a21f6f698a359ad51da0 (patch) | |
tree | 0f9e7fd4990cf431578bf15222ac2d5e4299d008 /chrome/browser/views/bookmark_bar_view.h | |
parent | 6371bf471df4ae89446c22b924909f09ad034fae (diff) | |
download | chromium_src-b9376951e95e4cb1dda5a21f6f698a359ad51da0.zip chromium_src-b9376951e95e4cb1dda5a21f6f698a359ad51da0.tar.gz chromium_src-b9376951e95e4cb1dda5a21f6f698a359ad51da0.tar.bz2 |
Implement keyboard access between bookmarks and main toolbar.
Allow ALT+SHIFT+T and TAB to traverse between bookmarks bar and main toolbar, same thing goes for SHIFT+TAB. Once any toolbar is focused, the arrow keys are used to traverse its children views.
Any toolbar that needs to be traversable needs to extend "AccessibleToolbarView", that class will deal with all the toolbar accessibility needs such as handling ESC, Left/Right arrows, Enter, Drop downs, and traversals with Tab/Shift+Tab.
There is one abstract method that the views who are extending this would need to implement if needed which allows the toolbar to skip views that are being traversed:
bool IsAccessibleViewTraversable(views::View* view)
BUG=25625
TEST=Test to see if the main toolbar and bookmarks bar is traversable.
Review URL: http://codereview.chromium.org/333010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.h')
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h index a9cc397..bb3d975 100644 --- a/chrome/browser/views/bookmark_bar_view.h +++ b/chrome/browser/views/bookmark_bar_view.h @@ -71,7 +71,7 @@ class BookmarkBarView : public DetachableToolbarView, static const int kNewtabBarHeight; - explicit BookmarkBarView(Profile* profile, Browser* browser); + BookmarkBarView(Profile* profile, Browser* browser); virtual ~BookmarkBarView(); // Resets the profile. This removes any buttons for the current profile and @@ -112,9 +112,9 @@ class BookmarkBarView : public DetachableToolbarView, virtual int OnDragUpdated(const views::DropTargetEvent& event); virtual void OnDragExited(); virtual int OnPerformDrop(const views::DropTargetEvent& event); - virtual bool GetAccessibleName(std::wstring* name); - virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); - virtual void SetAccessibleName(const std::wstring& name); + + // AccessibleToolbarView methods: + virtual bool IsAccessibleViewTraversable(views::View* view); // ProfileSyncServiceObserver method. virtual void OnStateChanged(); @@ -488,9 +488,6 @@ class BookmarkBarView : public DetachableToolbarView, // Background for extension toolstrips. SkBitmap toolstrip_background_; - // Storage of strings needed for accessibility. - std::wstring accessible_name_; - DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); }; |