Index: chrome/browser/ui/omnibox/omnibox_edit_model.h |
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h |
index 5535a48311a5888fb370873c171d56c4cfb89414..b1fc9b3af4e51b425df7133e985ee2ed40f6b6f5 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h |
@@ -90,7 +90,7 @@ class OmniboxEditModel { |
void set_popup_model(OmniboxPopupModel* popup_model) { |
omnibox_controller_->set_popup_model(popup_model); |
- } |
+ } |
// TODO: The edit and popup should be siblings owned by the LocationBarView, |
// making this accessor unnecessary. |
@@ -117,11 +117,6 @@ class OmniboxEditModel { |
// Sets the url, and if known, the title and favicon. |
void GetDataForURLExport(GURL* url, string16* title, gfx::Image* favicon); |
- // Returns true if a verbatim query should be used for Instant. A verbatim |
- // query is forced in certain situations, such as pressing delete at the end |
- // of the edit. |
- bool UseVerbatimInstant(); |
- |
// Returns true if the current edit contents will be treated as a |
// URL/navigation, as opposed to a search. |
bool CurrentTextIsURL() const; |
@@ -159,21 +154,16 @@ class OmniboxEditModel { |
void SetUserText(const string16& text); |
// Calls through to SearchProvider::FinalizeInstantQuery. |
- // If |skip_inline_autocomplete| is true then the |suggestion| text will be |
- // turned into final text instead of inline autocomplete suggest. |
void FinalizeInstantQuery(const string16& input_text, |
- const InstantSuggestion& suggestion, |
- bool skip_inline_autocomplete); |
+ const InstantSuggestion& suggestion); |
// Sets the suggestion text. |
void SetInstantSuggestion(const InstantSuggestion& suggestion); |
- // Commits the suggested text. If |skip_inline_autocomplete| is true then the |
- // suggested text will be committed as final text as if it's inputted by the |
- // user, rather than as inline autocomplete suggest. |
+ // Commits the gray suggested text as if it's been input by the user. |
// Returns true if the text was committed. |
// TODO: can the return type be void? |
- bool CommitSuggestedText(bool skip_inline_autocomplete); |
+ bool CommitSuggestedText(); |
// Invoked any time the text may have changed in the edit. Updates Instant and |
// notifies the controller. |
@@ -335,6 +325,12 @@ class OmniboxEditModel { |
// Called when the results have changed in the OmniboxController. |
void OnResultChanged(bool default_match_changed); |
+ // TODO(beaudoin): We need this to allow OmniboxController access the |
+ // InstantController via OmniboxEditController, because the only valid pointer |
+ // to InstantController is kept in Browser. We should try to get rid of this, |
+ // maybe by ensuring InstantController lives as long as Browser. |
+ InstantController* GetInstantController() const; |
+ |
private: |
friend class InstantTestBase; |
friend class OmniboxControllerTest; |
@@ -376,6 +372,9 @@ class OmniboxEditModel { |
// Returns true if a keyword is selected. |
bool KeywordIsSelected() const; |
+ // Turns off keyword mode for the current match. |
+ void ClearPopupKeywordMode() const; |
+ |
// Conversion between user text and display text. User text is the text the |
// user has input. Display text is the text being shown in the edit. The |
// two are different if a keyword is selected. |
@@ -407,13 +406,6 @@ class OmniboxEditModel { |
const string16& new_text, |
size_t caret_position) const; |
- // Tries to start an Instant preview for |match|. Returns true if Instant |
- // processed the match. |
- bool DoInstant(const AutocompleteMatch& match); |
- |
- // Starts a DNS prefetch for the given |match|. |
- void DoPreconnect(const AutocompleteMatch& match); |
- |
// Checks if a given character is a valid space character for accepting |
// keyword. |
static bool IsSpaceCharForAcceptingKeyword(wchar_t c); |