| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Invoked by |instant_| or |browser_| to update theme information for NTP. | 103 // Invoked by |instant_| or |browser_| to update theme information for NTP. |
| 104 // Set |parse_theme_info| to true to force re-parsing of theme information. | 104 // Set |parse_theme_info| to true to force re-parsing of theme information. |
| 105 void UpdateThemeInfo(bool parse_theme_info); | 105 void UpdateThemeInfo(bool parse_theme_info); |
| 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 OpenURL(const GURL& url, | 108 void OpenURL(const GURL& url, |
| 109 content::PageTransition transition, | 109 content::PageTransition transition, |
| 110 WindowOpenDisposition disposition); | 110 WindowOpenDisposition disposition); |
| 111 | 111 |
| 112 // Sets the start and end margins of the omnibox text area. | 112 // Sets the stored omnibox bounds. |
| 113 void SetMarginSize(int start, int end); | 113 void SetOmniboxBounds(const gfx::Rect& bounds); |
| 114 | 114 |
| 115 private: | 115 private: |
| 116 // Sets the value of |instant_| based on value from profile. Invoked | 116 // Sets the value of |instant_| based on value from profile. Invoked |
| 117 // on pref change. | 117 // on pref change. |
| 118 void ResetInstant(); | 118 void ResetInstant(); |
| 119 | 119 |
| 120 // Overridden from search::SearchModelObserver: | 120 // Overridden from search::SearchModelObserver: |
| 121 virtual void ModeChanged(const search::Mode& old_mode, | 121 virtual void ModeChanged(const search::Mode& old_mode, |
| 122 const search::Mode& new_mode) OVERRIDE; | 122 const search::Mode& new_mode) OVERRIDE; |
| 123 | 123 |
| (...skipping 22 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 |