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