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

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: rebased, resolved conflicts 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..be21773518530f5d54771d451b069c892c37f93d 100644
--- a/chrome/browser/ui/search/search_delegate.cc
+++ b/chrome/browser/ui/search/search_delegate.cc
@@ -20,8 +20,10 @@ SearchDelegate::~SearchDelegate() {
DCHECK(!tab_model_) << "All tabs should have been deactivated or closed.";
}
-void SearchDelegate::ModeChanged(const Mode& old_mode, const Mode& new_mode) {
+void SearchDelegate::ModelChanged(const Mode& old_mode, const Mode& new_mode,
+ bool top_bars_visible) {
browser_model_->SetMode(new_mode);
+ browser_model_->SetTopBarsVisible(top_bars_visible);
dhollowa 2013/03/13 17:21:55 This is a potential problem (having two model-chan
kuan 2013/03/13 22:21:07 Done.
}
void SearchDelegate::OnTabActivated(content::WebContents* web_contents) {
@@ -30,6 +32,7 @@ void SearchDelegate::OnTabActivated(content::WebContents* web_contents) {
tab_model_ =
chrome::search::SearchTabHelper::FromWebContents(web_contents)->model();
browser_model_->SetMode(tab_model_->mode());
+ browser_model_->SetTopBarsVisible(tab_model_->top_bars_visible());
dhollowa 2013/03/13 17:21:55 Ditto.
kuan 2013/03/13 22:21:07 Done.
tab_model_->AddObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698