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

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

Issue 10816027: alternate ntp: toolbar background and separator animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android build break Created 8 years, 4 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
« no previous file with comments | « chrome/browser/ui/search/search_delegate.cc ('k') | chrome/browser/ui/search/search_model_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_model.cc
diff --git a/chrome/browser/ui/search/search_model.cc b/chrome/browser/ui/search/search_model.cc
index 8d98be1ab8bc6821efc7b89c97a10daa51774178..f10027cfeda060cb2ee77ff68214b9f9fc8cc753 100644
--- a/chrome/browser/ui/search/search_model.cc
+++ b/chrome/browser/ui/search/search_model.cc
@@ -18,7 +18,7 @@ SearchModel::SearchModel(TabContents* contents)
SearchModel::~SearchModel() {
}
-void SearchModel::SetMode(const Mode& mode) {
+void SearchModel::SetMode(const Mode& new_mode) {
if (!contents_)
return;
@@ -26,12 +26,14 @@ void SearchModel::SetMode(const Mode& mode) {
<< "Please do not try to set the SearchModel mode without first "
<< "checking if Search is enabled.";
- if (mode_ == mode)
+ if (mode_ == new_mode)
return;
- mode_ = mode;
+ const Mode old_mode = mode_;
+ mode_ = new_mode;
- FOR_EACH_OBSERVER(SearchModelObserver, observers_, ModeChanged(mode_));
+ FOR_EACH_OBSERVER(SearchModelObserver, observers_,
+ ModeChanged(old_mode, mode_));
// Animation is transient, it is cleared after observers are notified.
mode_.animate = false;
« no previous file with comments | « chrome/browser/ui/search/search_delegate.cc ('k') | chrome/browser/ui/search/search_model_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698