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

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

Issue 10867061: Pass user_text and full_text explicitly to Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove out params from Update() Created 8 years, 4 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/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index 47bcf093ba20b1820ef69108907b6f0d6a4e9f28..a4566bba0f0c5f87932b2f9f92ee10289ea3b663 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -76,16 +76,15 @@ class InstantController : public InstantLoaderDelegate {
static bool IsEnabled(Profile* profile);
// Invoked as the user types into the omnibox. |user_text| is what the user
- // has typed. |suggested_text| is the current inline autocomplete text. It
- // may be replaced by Instant's autocomplete suggestion, if any. If |verbatim|
- // is true, search results are shown for |user_text| rather than the best
- // guess as to what Instant thinks the user means. Returns true if the update
- // is processed by Instant (i.e., if |match| is a search rather than a URL).
+ // has typed. |full_text| is what the omnibox is showing. These may differ if
+ // the user typed only some text, and the rest was inline autocompleted. If
+ // |verbatim| is true, search results are shown for the exact omnibox text,
+ // rather than the best guess as to what the user means. Returns true if the
+ // update is accepted (i.e., if |match| is a search rather than a URL).
bool Update(const AutocompleteMatch& match,
const string16& user_text,
- bool verbatim,
- string16* suggested_text,
- InstantCompleteBehavior* complete_behavior);
+ const string16& full_text,
+ bool verbatim);
// Sets the bounds of the omnibox dropdown, in screen coordinates.
void SetOmniboxBounds(const gfx::Rect& bounds);
@@ -191,9 +190,7 @@ class InstantController : public InstantLoaderDelegate {
// pointer comparisons.
const void* last_active_tab_;
- // The most recent full omnibox query text known to us. If this is empty, it
- // could also mean that the omnibox text was a URL (or something else that
- // we shouldn't be processing).
+ // The most recent full_text passed to Update().
string16 last_full_text_;
// The most recent user_text passed to Update().
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698