| Index: chrome/browser/ui/views/frame/instant_overlay_controller_views.cc
|
| diff --git a/chrome/browser/ui/views/frame/instant_overlay_controller_views.cc b/chrome/browser/ui/views/frame/instant_overlay_controller_views.cc
|
| index ef8fdbbe479d84dc107a6eeef338cad1dbc910d0..16a13396efdacc82ef25feb43973fd7da79c77c1 100644
|
| --- a/chrome/browser/ui/views/frame/instant_overlay_controller_views.cc
|
| +++ b/chrome/browser/ui/views/frame/instant_overlay_controller_views.cc
|
| @@ -7,6 +7,9 @@
|
| #include "chrome/browser/instant/instant_overlay_model.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/search/search_model.h"
|
| +#include "chrome/browser/ui/search/search_tab_helper.h"
|
| +#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| #include "chrome/browser/ui/view_ids.h"
|
| #include "chrome/browser/ui/views/frame/browser_view.h"
|
| #include "chrome/browser/ui/views/frame/contents_container.h"
|
| @@ -46,16 +49,20 @@ void InstantOverlayControllerViews::OverlayStateChanged(
|
| overlay_.reset();
|
| }
|
|
|
| - browser_->MaybeUpdateBookmarkBarStateForInstantOverlay(model.mode());
|
| + // Set top bars (bookmark and info bars) visibility for current tab via
|
| + // |SearchTabHelper| of current active web contents: top bars are hidden if
|
| + // there's overlay.
|
| + chrome::search::SearchTabHelper* search_tab_helper =
|
| + chrome::search::SearchTabHelper::FromWebContents(
|
| + browser_->tab_strip_model()->GetActiveWebContents());
|
| + if (search_tab_helper)
|
| + search_tab_helper->model()->SetTopBarsVisible(!overlay_);
|
|
|
| // If an Instant overlay is added during an immersive mode reveal, the reveal
|
| // view needs to stay on top.
|
| - // Notify infobar container of change in overlay state.
|
| if (overlay_) {
|
| BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_);
|
| - if (browser_view) {
|
| + if (browser_view)
|
| browser_view->MaybeStackImmersiveRevealAtTop();
|
| - browser_view->infobar_container()->OverlayStateChanged(model);
|
| - }
|
| }
|
| }
|
|
|