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

Unified Diff: chrome/browser/ui/search/instant_controller.h

Issue 14843002: InstantExtended: don't reset InstantTab if not ready. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test. Created 7 years, 7 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
Index: chrome/browser/ui/search/instant_controller.h
diff --git a/chrome/browser/ui/search/instant_controller.h b/chrome/browser/ui/search/instant_controller.h
index e75495bc346e5a400a1976cb939f427209774a34..7bec85774e58da442bbc1d6fd6deb7cb0157e0f4 100644
--- a/chrome/browser/ui/search/instant_controller.h
+++ b/chrome/browser/ui/search/instant_controller.h
@@ -250,6 +250,7 @@ class InstantController : public InstantPage::Delegate,
FRIEND_TEST_ALL_PREFIXES(InstantExtendedManualTest,
MANUAL_BackspaceFromQueryToSelectedUrlAndNavigate);
FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, OnDefaultSearchProviderChanged);
+ FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, UsesOverlayIfTabNotReady);
Profile* profile() const;
InstantOverlay* overlay() const;
@@ -382,6 +383,10 @@ class InstantController : public InstantPage::Delegate,
// Returns true if the local page is being used.
bool UsingLocalPage() const;
+ // Returns true iff |use_tab_for_suggestions_| is true and |instant_tab_|
+ // exists.
+ bool UseTabForSuggestions() const;
+
BrowserInstantController* const browser_;
// Whether the extended API and regular API are enabled. If both are false,
@@ -406,6 +411,11 @@ class InstantController : public InstantPage::Delegate,
scoped_ptr<InstantNTP> ntp_;
scoped_ptr<InstantTab> instant_tab_;
+ // If true, send suggestion-related events (such as user key strokes, auto
+ // complete results, etc.) to |instant_tab_| instead of |overlay_|. Once set
+ // to false, will stay false until the overlay is hidden or committed.
+ bool use_tab_for_suggestions_;
+
// The most recent full_text passed to Update(). If empty, we'll not accept
// search suggestions from |overlay_| or |instant_tab_|.
string16 last_omnibox_text_;

Powered by Google App Engine
This is Rietveld 408576698