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; |
} |