| 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 f2164cc786b0ca4f5fe685949952b7997be55c78..d2edce4fca4bdc18f08988102929f2ac6e58b464 100644
|
| --- a/chrome/browser/ui/views/toolbar_view.cc
|
| +++ b/chrome/browser/ui/views/toolbar_view.cc
|
| @@ -245,6 +245,7 @@ void ToolbarView::Init(views::View* location_bar_parent,
|
| // Have to create this before |reload_| as |reload_|'s constructor needs it.
|
| location_bar_container_ = new LocationBarContainer(
|
| location_bar_parent,
|
| + this,
|
| chrome::search::IsInstantExtendedAPIEnabled(browser_->profile()));
|
| location_bar_ = new LocationBarView(
|
| browser_,
|
| @@ -305,6 +306,11 @@ 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);
|
| @@ -881,6 +887,7 @@ bool ToolbarView::IsWrenchMenuShowing() const {
|
| // also so that it selects all content in the location bar.
|
| bool ToolbarView::SetPaneFocusAndFocusDefault() {
|
| if (!location_bar_->HasFocus()) {
|
| + SetPaneFocus(location_bar_);
|
| location_bar_->FocusLocation(true);
|
| return true;
|
| }
|
| @@ -896,6 +903,21 @@ void ToolbarView::RemovePaneFocus() {
|
| location_bar_->SetShowFocusRect(false);
|
| }
|
|
|
| +views::View* ToolbarView::GetParentForFocusSearch(views::View* v) {
|
| + if (v == location_bar_container_)
|
| + return this;
|
| +
|
| + return AccessiblePaneView::GetParentForFocusSearch(v);
|
| +}
|
| +
|
| +bool ToolbarView::ContainsForFocusSearch(views::View* root,
|
| + const views::View* v) {
|
| + if (Contains(root) && location_bar_container_->Contains(v))
|
| + return true;
|
| +
|
| + return AccessiblePaneView::ContainsForFocusSearch(root, v);
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // ToolbarView, private:
|
|
|
|
|