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" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/timer.h" | 12 #include "base/timer.h" |
13 #include "chrome/browser/instant/instant_commit_type.h" | 13 #include "chrome/browser/instant/instant_commit_type.h" |
14 #include "chrome/browser/search_engines/template_url_id.h" | 14 #include "chrome/browser/search_engines/template_url_id.h" |
15 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper_delegate.h" | |
sky
2011/05/20 18:54:19
You don't need this include anymore.
dominich
2011/05/20 23:22:34
great spot. thank you.
| |
15 #include "chrome/common/instant_types.h" | 16 #include "chrome/common/instant_types.h" |
16 #include "content/common/notification_observer.h" | 17 #include "content/common/notification_observer.h" |
17 #include "content/common/notification_registrar.h" | 18 #include "content/common/notification_registrar.h" |
18 #include "content/common/page_transition_types.h" | 19 #include "content/common/page_transition_types.h" |
19 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
20 #include "ui/gfx/rect.h" | 21 #include "ui/gfx/rect.h" |
21 | 22 |
22 class InstantLoaderDelegate; | 23 class InstantLoaderDelegate; |
23 class InstantLoaderManagerTest; | 24 class InstantLoaderManagerTest; |
24 class TabContents; | 25 class TabContents; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 void PageDoesntSupportInstant(bool needs_reload); | 144 void PageDoesntSupportInstant(bool needs_reload); |
144 | 145 |
145 // Invokes |SetBoundsToPage(false)|. This is called from the timer. | 146 // Invokes |SetBoundsToPage(false)|. This is called from the timer. |
146 void ProcessBoundsChange(); | 147 void ProcessBoundsChange(); |
147 | 148 |
148 // Notifes the page of the omnibox bounds. If |force_if_loading| is true the | 149 // 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 | 150 // 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. | 151 // waiting on the load and |force_if_loading| is false this does nothing. |
151 void SendBoundsToPage(bool force_if_loading); | 152 void SendBoundsToPage(bool force_if_loading); |
152 | 153 |
154 // Called when the TabContentsDelegate wants to swap a new TabContentsWrapper | |
155 // into our preview_contents_. | |
sky
2011/05/20 18:54:19
Use || around fields, eg |preview_contents_|. And
| |
156 void ReplacePreviewContents(TabContentsWrapper* old_tc, | |
157 TabContentsWrapper* new_tc); | |
158 | |
159 // Called to set up the preview_contents_ when it is 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 |