| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/prefs/public/pref_change_registrar.h" | 10 #include "base/prefs/public/pref_change_registrar.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Invoked by |browser_| when the active tab is about to be deactivated. | 96 // Invoked by |browser_| when the active tab is about to be deactivated. |
| 97 void TabDeactivated(content::WebContents* contents); | 97 void TabDeactivated(content::WebContents* contents); |
| 98 | 98 |
| 99 // Invoked by |instant_| or |browser_| to update theme information for NTP. | 99 // Invoked by |instant_| or |browser_| to update theme information for NTP. |
| 100 // Set |parse_theme_info| to true to force re-parsing of theme information. | 100 // Set |parse_theme_info| to true to force re-parsing of theme information. |
| 101 void UpdateThemeInfo(bool parse_theme_info); | 101 void UpdateThemeInfo(bool parse_theme_info); |
| 102 | 102 |
| 103 // Invoked by the InstantController when it wants to open a URL. | 103 // Invoked by the InstantController when it wants to open a URL. |
| 104 void OpenURLInCurrentTab(const GURL& url, content::PageTransition transition); | 104 void OpenURLInCurrentTab(const GURL& url, content::PageTransition transition); |
| 105 | 105 |
| 106 // Sets the start and end margins of the omnibox text area. | 106 // Sets the stored start-edge margin and width of the location bar. |
| 107 void SetMarginSize(int start, int end); | 107 void SetStartMarginAndWidth(int margin, int width); |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 // Sets the value of |instant_| based on value from profile. Invoked | 110 // Sets the value of |instant_| based on value from profile. Invoked |
| 111 // on pref change. | 111 // on pref change. |
| 112 void ResetInstant(); | 112 void ResetInstant(); |
| 113 | 113 |
| 114 // Overridden from search::SearchModelObserver: | 114 // Overridden from search::SearchModelObserver: |
| 115 virtual void ModeChanged(const search::Mode& old_mode, | 115 virtual void ModeChanged(const search::Mode& old_mode, |
| 116 const search::Mode& new_mode) OVERRIDE; | 116 const search::Mode& new_mode) OVERRIDE; |
| 117 | 117 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 140 PrefChangeRegistrar profile_pref_registrar_; | 140 PrefChangeRegistrar profile_pref_registrar_; |
| 141 | 141 |
| 142 content::NotificationRegistrar registrar_; | 142 content::NotificationRegistrar registrar_; |
| 143 | 143 |
| 144 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); | 144 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace chrome | 147 } // namespace chrome |
| 148 | 148 |
| 149 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 149 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
| OLD | NEW |