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

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

Issue 396006: Revert 32012-32017 (Closed)
Patch Set: Created 11 years, 1 month 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 675038abc7a8a032b965afd5a55eca454a4309c3..a8876de886aabdca7d70b6d86f36afccef3d9a53 100644
--- a/chrome/browser/views/bookmark_bar_view.cc
+++ b/chrome/browser/views/bookmark_bar_view.cc
@@ -39,6 +39,7 @@
#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"
@@ -692,8 +693,25 @@ int BookmarkBarView::OnPerformDrop(const DropTargetEvent& event) {
index);
}
-bool BookmarkBarView::IsAccessibleViewTraversable(views::View* view) {
- return view != bookmarks_separator_view_ && view != instructions_;
+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);
}
void BookmarkBarView::OnStateChanged() {
@@ -853,17 +871,15 @@ void BookmarkBarView::Init() {
if (!kDefaultFavIcon)
kDefaultFavIcon = rb.GetBitmapNamed(IDR_DEFAULT_FAVICON);
- // Child views are traversed in the order they are added. Make sure the order
- // they are added matches the visual order.
+ other_bookmarked_button_ = CreateOtherBookmarkedButton();
+ AddChildView(other_bookmarked_button_);
+
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