| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // used as theme area height, i.e. the height of the area that the entire | 100 // used as theme area height, i.e. the height of the area that the entire |
| 101 // theme background image should fill up. | 101 // theme background image should fill up. |
| 102 void SetContentHeight(int height); | 102 void SetContentHeight(int height); |
| 103 | 103 |
| 104 // Invoked by |instant_| to update theme information for preview. | 104 // Invoked by |instant_| to update theme information for preview. |
| 105 void UpdateThemeInfoForPreview(); | 105 void UpdateThemeInfoForPreview(); |
| 106 | 106 |
| 107 // Invoked by the InstantController when it wants to open a URL. | 107 // Invoked by the InstantController when it wants to open a URL. |
| 108 void OpenURLInCurrentTab(const GURL& url, content::PageTransition transition); | 108 void OpenURLInCurrentTab(const GURL& url, content::PageTransition transition); |
| 109 | 109 |
| 110 // Sets the start and end margins of the omnibox text area. | 110 // Sets the stored start-edge margin and width of the location bar. |
| 111 void SetMarginSize(int start, int end); | 111 void SetStartMarginAndWidth(int margin, int width); |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 // Sets the value of |instant_| based on value from profile. Invoked | 114 // Sets the value of |instant_| based on value from profile. Invoked |
| 115 // on pref change. | 115 // on pref change. |
| 116 void ResetInstant(); | 116 void ResetInstant(); |
| 117 | 117 |
| 118 // Overridden from search::SearchModelObserver: | 118 // Overridden from search::SearchModelObserver: |
| 119 virtual void ModeChanged(const search::Mode& old_mode, | 119 virtual void ModeChanged(const search::Mode& old_mode, |
| 120 const search::Mode& new_mode) OVERRIDE; | 120 const search::Mode& new_mode) OVERRIDE; |
| 121 | 121 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 148 PrefChangeRegistrar profile_pref_registrar_; | 148 PrefChangeRegistrar profile_pref_registrar_; |
| 149 | 149 |
| 150 content::NotificationRegistrar registrar_; | 150 content::NotificationRegistrar registrar_; |
| 151 | 151 |
| 152 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); | 152 DISALLOW_COPY_AND_ASSIGN(BrowserInstantController); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace chrome | 155 } // namespace chrome |
| 156 | 156 |
| 157 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ | 157 #endif // CHROME_BROWSER_UI_BROWSER_INSTANT_CONTROLLER_H_ |
| OLD | NEW |