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

Unified Diff: chrome/browser/ui/views/toolbar_view.cc

Issue 10962048: Fix toolbar keyboard accessibility if bookmarks bar is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Open second window with bookmark bar in same test 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 | « no previous file | chrome/browser/ui/views/toolbar_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index c837bff29d96a41ee34b36e6bed6e49cec0f4d53..4129a73c3e3d21763ccc92ec377d434c3bc34e5e 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -306,11 +306,6 @@ void ToolbarView::Init(views::View* location_bar_parent,
AddChildView(browser_actions_);
AddChildView(app_menu_);
- // Put the location bar container between the home button and browser
- // actions when doing a focus search.
- home_->SetNextFocusableView(location_bar_container_);
- location_bar_container_->SetNextFocusableView(browser_actions_);
-
location_bar_->Init(popup_parent_view);
show_home_button_.Init(prefs::kShowHomeButton,
browser_->profile()->GetPrefs(), this);
@@ -450,6 +445,14 @@ bool ToolbarView::SetPaneFocus(views::View* initial_focus) {
if (!AccessiblePaneView::SetPaneFocus(initial_focus))
return false;
+ // Put the location bar container between the home button and browser
+ // actions when doing a focus search. This needs to be done here rather
+ // than during initialization, because the location bar container might
+ // get siblings added to it after initialization of this view, which
+ // breaks our override.
+ home_->SetNextFocusableView(location_bar_container_);
+ location_bar_container_->SetNextFocusableView(browser_actions_);
+
location_bar_->SetShowFocusRect(true);
return true;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698