| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_BROWSER_INSTANT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 // Sets the stored omnibox bounds. | 105 // Sets the stored omnibox bounds. |
| 106 void SetOmniboxBounds(const gfx::Rect& bounds); | 106 void SetOmniboxBounds(const gfx::Rect& bounds); |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 // Sets the value of |instant_| based on value from profile. Invoked | 109 // Sets the value of |instant_| based on value from profile. Invoked |
| 110 // on pref change. | 110 // on pref change. |
| 111 void ResetInstant(const std::string& pref_name); | 111 void ResetInstant(const std::string& pref_name); |
| 112 | 112 |
| 113 // Overridden from search::SearchModelObserver: | 113 // Overridden from search::SearchModelObserver: |
| 114 virtual void ModeChanged(const search::Mode& old_mode, | 114 virtual void ModelChanged( |
| 115 const search::Mode& new_mode) OVERRIDE; | 115 const search::SearchModel::State& old_state, |
| 116 const search::SearchModel::State& new_state) OVERRIDE; |
| 116 | 117 |
| 117 // content::NotificationObserver implementation. | 118 // content::NotificationObserver implementation. |
| 118 virtual void Observe(int type, | 119 virtual void Observe(int type, |
| 119 const content::NotificationSource& source, | 120 const content::NotificationSource& source, |
| 120 const content::NotificationDetails& details) OVERRIDE; | 121 const content::NotificationDetails& details) OVERRIDE; |
| 121 | 122 |
| 122 // Helper for handling theme change. | 123 // Helper for handling theme change. |
| 123 void OnThemeChanged(ThemeService* theme_service); | 124 void OnThemeChanged(ThemeService* theme_service); |
| 124 | 125 |
| 125 // Replaces the contents at tab |index| with |new_contents| and deletes the | 126 // Replaces the contents at tab |index| with |new_contents| and deletes the |
| (...skipping 13 matching lines...) Expand all Loading... |
| 139 PrefChangeRegistrar profile_pref_registrar_; | 140 PrefChangeRegistrar profile_pref_registrar_; |
| 140 | 141 |
| 141 content::NotificationRegistrar registrar_; | 142 content::NotificationRegistrar registrar_; |
| 142 | 143 |
| 143 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); | 144 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); |
| 144 }; | 145 }; |
| 145 | 146 |
| 146 } // namespace chrome | 147 } // namespace chrome |
| 147 | 148 |
| 148 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 149 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
| OLD | NEW |