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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 333010: Implement keyboard access between bookmarks and toolbar. (Closed)
Patch Set: Add more null checks Created 11 years 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/browser/views/bookmark_bar_view.h ('k') | chrome/browser/views/detachable_toolbar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bookmark_bar_view.cc
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc
index 47a13be0ccd94fc48e0af6da8408d439236ce61c..523706982e619d949ef65eaae3cb9f1fabe5c33f 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -39,7 +39,6 @@
#include "grit/theme_resources.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/label.h"
-#include "views/controls/button/menu_button.h"
#include "views/controls/menu/menu_item_view.h"
#include "views/drag_utils.h"
#include "views/view_constants.h"
@@ -716,25 +715,8 @@ int BookmarkBarView::OnPerformDrop(const DropTargetEvent& event) {
index);
}
-bool BookmarkBarView::GetAccessibleName(std::wstring* name) {
- DCHECK(name);
-
- if (!accessible_name_.empty()) {
- name->assign(accessible_name_);
- return true;
- }
- return false;
-}
-
-bool BookmarkBarView::GetAccessibleRole(AccessibilityTypes::Role* role) {
- DCHECK(role);
-
- *role = AccessibilityTypes::ROLE_TOOLBAR;
- return true;
-}
-
-void BookmarkBarView::SetAccessibleName(const std::wstring& name) {
- accessible_name_.assign(name);
+bool BookmarkBarView::IsAccessibleViewTraversable(views::View* view) {
+ return view != bookmarks_separator_view_ && view != instructions_;
}
void BookmarkBarView::OnStateChanged() {
@@ -903,15 +885,17 @@ void BookmarkBarView::Init() {
if (!kDefaultFavIcon)
kDefaultFavIcon = rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
- other_bookmarked_button_ = CreateOtherBookmarkedButton();
- AddChildView(other_bookmarked_button_);
-
+ // Child views are traversed in the order they are added. Make sure the order
+ // they are added matches the visual order.
sync_error_button_ = CreateSyncErrorButton();
AddChildView(sync_error_button_);
overflow_button_ = CreateOverflowButton();
AddChildView(overflow_button_);
+ other_bookmarked_button_ = CreateOtherBookmarkedButton();
+ AddChildView(other_bookmarked_button_);
+
bookmarks_separator_view_ = new ButtonSeparatorView();
bookmarks_separator_view_->SetAccessibleName(
l10n_util::GetString(IDS_ACCNAME_SEPARATOR));
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.h ('k') | chrome/browser/views/detachable_toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698