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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // Deletes |loader| after a delay. At the time we determine a site doesn't | 256 // Deletes |loader| after a delay. At the time we determine a site doesn't |
257 // want to participate in instant we can't destroy the loader (because | 257 // want to participate in instant we can't destroy the loader (because |
258 // destroying the loader destroys the TabContents and the TabContents is on | 258 // destroying the loader destroys the TabContents and the TabContents is on |
259 // the stack). Instead we place the loader in |loaders_to_destroy_| and | 259 // the stack). Instead we place the loader in |loaders_to_destroy_| and |
260 // schedule a task. | 260 // schedule a task. |
261 void ScheduleDestroy(InstantLoader* loader); | 261 void ScheduleDestroy(InstantLoader* loader); |
262 | 262 |
263 // Destroys all loaders scheduled for destruction in |ScheduleForDestroy|. | 263 // Destroys all loaders scheduled for destruction in |ScheduleForDestroy|. |
264 void DestroyLoaders(); | 264 void DestroyLoaders(); |
265 | 265 |
266 // Returns the TemplateURL to use for the specified AutocompleteMatch, or | |
267 // NULL if there is no TemplateURL for |match|. | |
268 const TemplateURL* GetTemplateURL(const AutocompleteMatch& match); | |
269 | |
270 InstantDelegate* delegate_; | 266 InstantDelegate* delegate_; |
271 | 267 |
272 // The TabContents last passed to |Update|. | 268 // The TabContents last passed to |Update|. |
273 TabContentsWrapper* tab_contents_; | 269 TabContentsWrapper* tab_contents_; |
274 | 270 |
275 // See description above getter for details. | 271 // See description above getter for details. |
276 bool is_active_; | 272 bool is_active_; |
277 | 273 |
278 // The loader that is ready to be displayed. | 274 // The loader that is ready to be displayed. |
279 InstantLoader* displayable_loader_; | 275 InstantLoader* displayable_loader_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 ScopedVector<InstantLoader> loaders_to_destroy_; | 307 ScopedVector<InstantLoader> loaders_to_destroy_; |
312 | 308 |
313 // The set of hosts that we don't use instant with. This is shared across all | 309 // The set of hosts that we don't use instant with. This is shared across all |
314 // instances and only maintained for the current session. | 310 // instances and only maintained for the current session. |
315 static HostBlacklist* host_blacklist_; | 311 static HostBlacklist* host_blacklist_; |
316 | 312 |
317 DISALLOW_COPY_AND_ASSIGN(InstantController); | 313 DISALLOW_COPY_AND_ASSIGN(InstantController); |
318 }; | 314 }; |
319 | 315 |
320 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ | 316 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ |
OLD | NEW |