diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-29 19:59:21 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-29 19:59:21 +0000 |
commit | 3d3afbf1a7c0a1b890a5f34b65d7ca5ccc0e19dc (patch) | |
tree | 3028f071aba4d98227cdeb8b6b535860d9056d07 /chrome/browser/instant/instant_controller.h | |
parent | b1e5ceb336729e8d4d32de55dfd3daca2d206b4d (diff) | |
download | chromium_src-3d3afbf1a7c0a1b890a5f34b65d7ca5ccc0e19dc.zip chromium_src-3d3afbf1a7c0a1b890a5f34b65d7ca5ccc0e19dc.tar.gz chromium_src-3d3afbf1a7c0a1b890a5f34b65d7ca5ccc0e19dc.tar.bz2 |
Makes instant delay showing any page that doens't result in a 403.
BUG=72573
TEST=see bug
R=jcivelli@chromium.org
Review URL: http://codereview.chromium.org/6683059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79729 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant/instant_controller.h')
-rw-r--r-- | chrome/browser/instant/instant_controller.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h index a023146..da47d11 100644 --- a/chrome/browser/instant/instant_controller.h +++ b/chrome/browser/instant/instant_controller.h @@ -173,7 +173,7 @@ class InstantController : public InstantLoaderDelegate { GURL GetCurrentURL(); // InstantLoaderDelegate - virtual void ShowInstantLoader(InstantLoader* loader) OVERRIDE; + virtual void InstantStatusChanged(InstantLoader* loader) OVERRIDE; virtual void SetSuggestedTextFor(InstantLoader* loader, const string16& text, InstantCompleteBehavior behavior) OVERRIDE; @@ -206,6 +206,14 @@ class InstantController : public InstantLoaderDelegate { // Invoked from the timer to process the last scheduled url. void ProcessScheduledUpdate(); + // Does the work of processing a change in the status (ready or + // http_status_ok) of a loader. + void ProcessInstantStatusChanged(InstantLoader* loader); + + // Callback when the |show_timer_| fires. Invokes + // |ProcessInstantStatusChanged| with the appropriate arguments. + void ShowTimerFired(); + // Updates InstantLoaderManager and its current InstantLoader. This is invoked // internally from Update. void UpdateLoader(const TemplateURL* template_url, @@ -275,6 +283,9 @@ class InstantController : public InstantLoaderDelegate { // Timer used to delay calls to |UpdateLoader|. base::OneShotTimer<InstantController> update_timer_; + // Timer used to delay showing loaders whose status isn't ok. + base::OneShotTimer<InstantController> show_timer_; + // Used by ScheduleForDestroy; see it for details. ScopedRunnableMethodFactory<InstantController> destroy_factory_; |