| OLD | NEW |
| 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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Changes are propagated from the active tab's model via this class to the | 27 // Changes are propagated from the active tab's model via this class to the |
| 28 // Browser-level model. | 28 // Browser-level model. |
| 29 class SearchDelegate : public SearchModelObserver { | 29 class SearchDelegate : public SearchModelObserver { |
| 30 public: | 30 public: |
| 31 SearchDelegate(SearchModel* browser_search_model, | 31 SearchDelegate(SearchModel* browser_search_model, |
| 32 ToolbarModel* toolbar_model); | 32 ToolbarModel* toolbar_model); |
| 33 virtual ~SearchDelegate(); | 33 virtual ~SearchDelegate(); |
| 34 | 34 |
| 35 // Overrides for SearchModelObserver: | 35 // Overrides for SearchModelObserver: |
| 36 virtual void ModeChanged(const Mode& old_mode, const Mode& new_mode) OVERRIDE; | 36 virtual void ModeChanged(const Mode& old_mode, const Mode& new_mode) OVERRIDE; |
| 37 virtual void TopBarsVisibilityChanged(const Mode& mode, |
| 38 bool visible) OVERRIDE; |
| 37 | 39 |
| 38 // When the active tab is changed, the model state of this new active tab is | 40 // When the active tab is changed, the model state of this new active tab is |
| 39 // propagated to the browser. | 41 // propagated to the browser. |
| 40 void OnTabActivated(content::WebContents* web_contents); | 42 void OnTabActivated(content::WebContents* web_contents); |
| 41 | 43 |
| 42 // When a tab is deactivated, this class no longer observes changes to the | 44 // When a tab is deactivated, this class no longer observes changes to the |
| 43 // tab's model. | 45 // tab's model. |
| 44 void OnTabDeactivated(content::WebContents* web_contents); | 46 void OnTabDeactivated(content::WebContents* web_contents); |
| 45 | 47 |
| 46 // When a tab is detached, this class no longer observes changes to the | 48 // When a tab is detached, this class no longer observes changes to the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 59 // tab. Changes to this model are propagated through to the |browser_model_|. | 61 // tab. Changes to this model are propagated through to the |browser_model_|. |
| 60 SearchModel* tab_model_; | 62 SearchModel* tab_model_; |
| 61 | 63 |
| 62 DISALLOW_COPY_AND_ASSIGN(SearchDelegate); | 64 DISALLOW_COPY_AND_ASSIGN(SearchDelegate); |
| 63 }; | 65 }; |
| 64 | 66 |
| 65 } // namespace search | 67 } // namespace search |
| 66 } // namespace chrome | 68 } // namespace chrome |
| 67 | 69 |
| 68 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_ | 70 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_DELEGATE_H_ |
| OLD | NEW |