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

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: 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
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f9b894649a34110ebc47c216eee995258ac7a6b7 100644
--- a/chrome/browser/ui/search/instant_controller.h
+++ b/chrome/browser/ui/search/instant_controller.h
@@ -211,6 +211,7 @@ class InstantController : public InstantPage::Delegate,
private:
FRIEND_TEST_ALL_PREFIXES(InstantTest, OmniboxFocusLoadsInstant);
+ FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest, UsesOverlayIfTabNotReady);
FRIEND_TEST_ALL_PREFIXES(InstantExtendedTest,
SearchQueryNotDisplayedForNavsuggest);
FRIEND_TEST_ALL_PREFIXES(InstantTest, SetWithTemplateURL);
@@ -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_;
« no previous file with comments | « no previous file | chrome/browser/ui/search/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698