Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(711)

Unified Diff: chrome/browser/instant/instant_controller.h

Issue 5701008: Fixes bug in instant that resulted in flickery fade. The problem would (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Adds content to 403.html as bots seem to have problem with empty file Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index 6b1345ae3d7ba5a1f0bdbff49fb8b822262b0afd..1482481fb3d9a7063742081c9f29ff1f2b4cb9af 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -27,6 +27,7 @@ struct AutocompleteMatch;
class InstantDelegate;
class InstantLoader;
class InstantLoaderManager;
+class InstantTest;
class PrefService;
class Profile;
class TabContents;
@@ -153,10 +154,14 @@ class InstantController : public InstantLoaderDelegate {
// The preview TabContents; may be null.
TabContentsWrapper* GetPreviewContents();
- // Returns true if the preview TabContents is active. In some situations this
- // may return false yet preview_contents() returns non-NULL.
+ // Returns true if |Update| has been invoked without a corresponding call to
+ // |DestroyPreviewContents| or |CommitCurrentPreview|.
bool is_active() const { return is_active_; }
+ // Returns true if the preview TabContents is ready to be displayed. In some
+ // situations this may return false yet GetPreviewContents() returns non-NULL.
+ bool is_displayable() const { return is_displayable_; }
+
// Returns the transition type of the last AutocompleteMatch passed to Update.
PageTransition::Type last_transition_type() const {
return last_transition_type_;
@@ -191,8 +196,17 @@ class InstantController : public InstantLoaderDelegate {
private:
+ friend class InstantTest;
+
typedef std::set<std::string> HostBlacklist;
+ // Destroys the current loaders but remains actives.
+ void DestroyAndLeaveActive();
+
+ // Returns the TabContents of the pending loader (or NULL). This is only used
+ // for testing.
+ TabContentsWrapper* GetPendingPreviewContents();
+
// Returns true if we should update immediately.
bool ShouldUpdateNow(TemplateURLID instant_id, const GURL& url);
@@ -253,9 +267,12 @@ class InstantController : public InstantLoaderDelegate {
// The TabContents last passed to |Update|.
TabContentsWrapper* tab_contents_;
+ // See description above getter for details.
+ bool is_active_;
+
// Has notification been sent out that the preview TabContents is ready to be
// shown?
- bool is_active_;
+ bool is_displayable_;
// See description above setter.
gfx::Rect omnibox_bounds_;
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698