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

Side by Side Diff: chrome/browser/ui/search/search_delegate.h

Issue 10873094: alternate ntp: fix toolbar separator visibility when query is cleared (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/search/search_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/ui/search/search_model_observer.h" 10 #include "chrome/browser/ui/search/search_model_observer.h"
11 #include "chrome/browser/ui/search/toolbar_search_animator.h" 11 #include "chrome/browser/ui/search/toolbar_search_animator.h"
12 12
13 class TabContents; 13 class TabContents;
14 class ToolbarModel;
14 15
15 namespace chrome { 16 namespace chrome {
16 namespace search { 17 namespace search {
17 18
18 class SearchModel; 19 class SearchModel;
19 20
20 // The SearchDelegate class acts as a helper to the Browser class. 21 // The SearchDelegate class acts as a helper to the Browser class.
21 // It is responsible for routing the changes from the active tab's 22 // It is responsible for routing the changes from the active tab's
22 // SearchModel through to the toolbar, tabstrip and other UI 23 // SearchModel through to the toolbar, tabstrip and other UI
23 // observers. 24 // observers.
24 // Changes are propagated from the active tab's model via this class to the 25 // Changes are propagated from the active tab's model via this class to the
25 // Browser-level model. 26 // Browser-level model.
26 class SearchDelegate : public SearchModelObserver { 27 class SearchDelegate : public SearchModelObserver {
27 public: 28 public:
28 explicit SearchDelegate(SearchModel* model); 29 SearchDelegate(SearchModel* browser_search_model,
30 ToolbarModel* toolbar_model);
29 virtual ~SearchDelegate(); 31 virtual ~SearchDelegate();
30 32
31 // Overrides for SearchModelObserver: 33 // Overrides for SearchModelObserver:
32 virtual void ModeChanged(const Mode& old_mode, const Mode& new_mode) OVERRIDE; 34 virtual void ModeChanged(const Mode& old_mode, const Mode& new_mode) OVERRIDE;
33 35
34 // When the active tab is changed, the model state of this new active tab is 36 // When the active tab is changed, the model state of this new active tab is
35 // propagated to the browser. 37 // propagated to the browser.
36 void OnTabActivated(TabContents* contents); 38 void OnTabActivated(TabContents* contents);
37 39
38 // When a tab is deactivated, this class no longer observes changes to the 40 // When a tab is deactivated, this class no longer observes changes to the
(...skipping 24 matching lines...) Expand all
63 // NTP to SEARCH. 65 // NTP to SEARCH.
64 ToolbarSearchAnimator toolbar_search_animator_; 66 ToolbarSearchAnimator toolbar_search_animator_;
65 67
66 DISALLOW_COPY_AND_ASSIGN(SearchDelegate); 68 DISALLOW_COPY_AND_ASSIGN(SearchDelegate);
67 }; 69 };
68 70
69 } // namespace search 71 } // namespace search
70 } // namespace chrome 72 } // namespace chrome
71 73
72 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_ 74 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/search/search_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698