| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INSTANT_INSTANT_LOADER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 void PageDoesntSupportInstant(bool needs_reload); | 143 void PageDoesntSupportInstant(bool needs_reload); |
| 144 | 144 |
| 145 // Invokes |SetBoundsToPage(false)|. This is called from the timer. | 145 // Invokes |SetBoundsToPage(false)|. This is called from the timer. |
| 146 void ProcessBoundsChange(); | 146 void ProcessBoundsChange(); |
| 147 | 147 |
| 148 // Notifes the page of the omnibox bounds. If |force_if_loading| is true the | 148 // Notifes the page of the omnibox bounds. If |force_if_loading| is true the |
| 149 // bounds are sent down even if we're waiting on the load, otherwise if we're | 149 // bounds are sent down even if we're waiting on the load, otherwise if we're |
| 150 // waiting on the load and |force_if_loading| is false this does nothing. | 150 // waiting on the load and |force_if_loading| is false this does nothing. |
| 151 void SendBoundsToPage(bool force_if_loading); | 151 void SendBoundsToPage(bool force_if_loading); |
| 152 | 152 |
| 153 // Called when the TabContentsDelegate wants to swap a new TabContentsWrapper |
| 154 // into our |preview_contents_|. |
| 155 void ReplacePreviewContents(TabContentsWrapper* old_tc, |
| 156 TabContentsWrapper* new_tc); |
| 157 |
| 158 // Called to set up the |preview_contents_| based on |tab_contents| when it is |
| 159 // created or replaced. |
| 160 void SetupPreviewContents(TabContentsWrapper* tab_contents); |
| 161 |
| 153 // Creates and sets the preview TabContentsWrapper. | 162 // Creates and sets the preview TabContentsWrapper. |
| 154 void CreatePreviewContents(TabContentsWrapper* tab_contents); | 163 void CreatePreviewContents(TabContentsWrapper* tab_contents); |
| 155 | 164 |
| 156 InstantLoaderDelegate* delegate_; | 165 InstantLoaderDelegate* delegate_; |
| 157 | 166 |
| 158 // If we're showing instant results this is the ID of the TemplateURL driving | 167 // If we're showing instant results this is the ID of the TemplateURL driving |
| 159 // the results. A value of 0 means there is no TemplateURL. | 168 // the results. A value of 0 means there is no TemplateURL. |
| 160 const TemplateURLID template_url_id_; | 169 const TemplateURLID template_url_id_; |
| 161 | 170 |
| 162 // The url we're displaying. | 171 // The url we're displaying. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // Last value of verbatim passed to |Update|. | 213 // Last value of verbatim passed to |Update|. |
| 205 bool verbatim_; | 214 bool verbatim_; |
| 206 | 215 |
| 207 // True if the page needs to be reloaded. | 216 // True if the page needs to be reloaded. |
| 208 bool needs_reload_; | 217 bool needs_reload_; |
| 209 | 218 |
| 210 DISALLOW_COPY_AND_ASSIGN(InstantLoader); | 219 DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
| 211 }; | 220 }; |
| 212 | 221 |
| 213 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 222 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
| OLD | NEW |