Index: chrome/browser/ui/views/toolbar_view.cc |
=================================================================== |
--- chrome/browser/ui/views/toolbar_view.cc (revision 158889) |
+++ chrome/browser/ui/views/toolbar_view.cc (working copy) |
@@ -306,11 +306,6 @@ |
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 @@ |
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; |
} |