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

Unified Diff: chrome/browser/ui/search/search_delegate.cc

Issue 12631008: alternate ntp: implement Show/HideBars API to reduce jank when showing/hiding bars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
Index: chrome/browser/ui/search/search_delegate.cc
diff --git a/chrome/browser/ui/search/search_delegate.cc b/chrome/browser/ui/search/search_delegate.cc
index 6e437c0032f8198e338a1131ee45578cbe928355..32c475227ced903538a91f77df49e5fa565347c8 100644
--- a/chrome/browser/ui/search/search_delegate.cc
+++ b/chrome/browser/ui/search/search_delegate.cc
@@ -24,12 +24,17 @@ void SearchDelegate::ModeChanged(const Mode& old_mode, const Mode& new_mode) {
browser_model_->SetMode(new_mode);
}
+void SearchDelegate::TopBarsVisibilityChanged(const Mode& mode, bool visible) {
+ browser_model_->SetTopBarsVisible(visible);
+}
+
void SearchDelegate::OnTabActivated(content::WebContents* web_contents) {
if (tab_model_)
tab_model_->RemoveObserver(this);
tab_model_ =
chrome::search::SearchTabHelper::FromWebContents(web_contents)->model();
browser_model_->SetMode(tab_model_->mode());
+ browser_model_->SetTopBarsVisible(tab_model_->show_top_bars());
tab_model_->AddObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698