diff options
author | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 18:08:15 +0000 |
---|---|---|
committer | sreeram@chromium.org <sreeram@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 18:08:15 +0000 |
commit | 88f15b5393368eb61397c8828ef786c1b9d02172 (patch) | |
tree | 144c1b5cbd1850fff623d868d080fd249acb4fd8 /chrome/browser/instant/instant_loader_manager.h | |
parent | 737cfb2a8cc57c8fbc93c2fb5997f384e01bf0cc (diff) | |
download | chromium_src-88f15b5393368eb61397c8828ef786c1b9d02172.zip chromium_src-88f15b5393368eb61397c8828ef786c1b9d02172.tar.gz chromium_src-88f15b5393368eb61397c8828ef786c1b9d02172.tar.bz2 |
Don't destroy instant loaders if you don't have to.
As long as the omnibox retains focus, don't delete any instant loaders. This
includes cases where the user is not typing actively, or when the user switches
tabs (but retaining focus in the omnibox). The rationale is that the user may
type at any time, so it's useful to keep the instant loaders ready to process
the user query.
BUG=none
TEST=PreloadInstantTest.*
Review URL: http://codereview.chromium.org/8085010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant/instant_loader_manager.h')
-rw-r--r-- | chrome/browser/instant/instant_loader_manager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/instant/instant_loader_manager.h b/chrome/browser/instant/instant_loader_manager.h index 7f2d995..7202190 100644 --- a/chrome/browser/instant/instant_loader_manager.h +++ b/chrome/browser/instant/instant_loader_manager.h @@ -65,6 +65,9 @@ class InstantLoaderManager { // If |loader| is in |instant_loaders_| it is removed. void RemoveLoaderFromInstant(InstantLoader* loader); + // Destroys non-instant loaders (leaves instant loaders alone). + void DestroyNonInstantLoaders(); + // Returns the loader for loading instant results with the specified id. If // there is no loader for the specified id a new one is created. InstantLoader* GetInstantLoader(TemplateURLID id); |