| 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_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/ui/search/search_model.h" | 9 #include "chrome/browser/ui/search/search_model.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 const GURL& url, | 38 const GURL& url, |
| 39 content::NavigationController::ReloadType reload_type) OVERRIDE; | 39 content::NavigationController::ReloadType reload_type) OVERRIDE; |
| 40 | 40 |
| 41 // Overridden from content::NotificationObserver: | 41 // Overridden from content::NotificationObserver: |
| 42 virtual void Observe(int type, | 42 virtual void Observe(int type, |
| 43 const content::NotificationSource& source, | 43 const content::NotificationSource& source, |
| 44 const content::NotificationDetails& details) OVERRIDE; | 44 const content::NotificationDetails& details) OVERRIDE; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 // Sets the mode of the model based on |url|. | 47 // Sets the mode of the model based on |url|. |
| 48 void UpdateModel(const GURL& url); | 48 // |animate| is set in the Mode passed to the model. |
| 49 void UpdateModel(const GURL& url, bool animate); |
| 49 | 50 |
| 50 const bool is_search_enabled_; | 51 const bool is_search_enabled_; |
| 51 | 52 |
| 52 // Model object for UI that cares about search state. | 53 // Model object for UI that cares about search state. |
| 53 SearchModel model_; | 54 SearchModel model_; |
| 54 | 55 |
| 55 content::NotificationRegistrar registrar_; | 56 content::NotificationRegistrar registrar_; |
| 56 | 57 |
| 57 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); | 58 DISALLOW_COPY_AND_ASSIGN(SearchTabHelper); |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 } // namespace search | 61 } // namespace search |
| 61 } // namespace chrome | 62 } // namespace chrome |
| 62 | 63 |
| 63 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ | 64 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_TAB_HELPER_H_ |
| OLD | NEW |