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

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

Issue 8298005: Fixes bug in instant where we would end up incorrectly using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak Created 9 years, 2 months 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 aa3046734dd98d1ceba992f2e8857d0a0cff3a40..21d0b4948ff3d8e3bf329c88351ffd531ca60e90 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -88,12 +88,14 @@ class InstantController : public InstantLoaderDelegate {
// when showing results for a search provider that supports instant.
void SetOmniboxBounds(const gfx::Rect& bounds);
- // Destroys the preview TabContents. Does nothing if the preview TabContents
- // has not been created.
+ // Notifies the delegate to hide the preview and destroys the preview
+ // TabContents. Does nothing if the preview TabContents has not been created.
void DestroyPreviewContents();
- // Destroys the current loaders but remains active.
- void DestroyPreviewContentsAndLeaveActive();
+ // Notifies the delegate to hide the preview but leaves it around in hopes it
+ // can be subsequently used. The preview will not be used until Update() (with
+ // valid parameters) is invoked.
+ void Hide();
// Returns true if we're showing the last URL passed to |Update|. If this is
// false a commit does not result in committing the last url passed to update.
@@ -149,10 +151,6 @@ class InstantController : public InstantLoaderDelegate {
// The preview TabContents; may be null.
TabContentsWrapper* GetPreviewContents();
- // 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_; }
@@ -225,14 +223,15 @@ class InstantController : public InstantLoaderDelegate {
// The TabContents last passed to |Update|.
TabContentsWrapper* tab_contents_;
- // See description above getter for details.
- bool is_active_;
-
- scoped_ptr<InstantLoader> loader_;
-
// True if |loader_| is ready to be displayed.
bool is_displayable_;
+ // Set to true in Hide() and false in UpdateLoader(). Used when we persist
+ // the |loader_|, but it isn't up to date.
+ bool is_out_of_date_;
+
+ scoped_ptr<InstantLoader> loader_;
+
// 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