Index: chrome/browser/ui/omnibox/omnibox_edit_model.cc |
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
index 6f7c1ae1a09969fb8761861e6f52b60c121d92af..b286c2748503bebc3cf2d94450501058a7b1ab32 100644 |
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc |
@@ -239,10 +239,6 @@ void OmniboxEditModel::SetUserText(const string16& text) { |
void OmniboxEditModel::SetInstantSuggestion( |
const InstantSuggestion& suggestion) { |
-// Should only get called for the HTML popup. |
-#if defined(HTML_INSTANT_EXTENDED_POPUP) |
- omnibox_controller_->SetInstantSuggestion(suggestion); |
-#endif |
} |
bool OmniboxEditModel::CommitSuggestedText() { |
@@ -711,20 +707,6 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match, |
content::RecordAction(UserMetricsAction( |
"OmniboxDestinationURLMatchesDefaultSearchProvider")); |
-#if defined(HTML_INSTANT_EXTENDED_POPUP) |
- // If running with instant, notify the instant controller that a navigation |
- // is about to take place if we are navigating to a URL. This can be |
- // determined by inspecting the transition type. To ensure that this is only |
- // done on Enter key press, check that the disposition is CURRENT_TAB. This |
- // is the same heuristic used by BrowserInstantController::OpenInstant |
- if (match.transition == content::PAGE_TRANSITION_TYPED && |
- disposition == CURRENT_TAB) { |
- InstantController* instant = GetInstantController(); |
- if (instant) |
- instant->OmniboxNavigateToURL(); |
- } |
-#endif |
- |
// This calls RevertAll again. |
base::AutoReset<bool> tmp(&in_revert_, true); |
controller_->OnAutocompleteAccept(destination_url, disposition, |
@@ -771,7 +753,6 @@ void OmniboxEditModel::AcceptTemporaryTextAsUserText() { |
is_temporary_text_set_by_instant_ = false; |
selected_instant_autocomplete_match_index_ = OmniboxPopupModel::kNoMatch; |
is_instant_temporary_text_a_search_query_ = false; |
- OnPopupBoundsChanged(gfx::Rect()); |
delegate_->NotifySearchTabHelper(user_input_in_progress_, !in_revert_, |
popup_model()->IsOpen(), user_text_.empty()); |
} |
@@ -914,21 +895,9 @@ void OmniboxEditModel::OnUpOrDownKeyPressed(int count) { |
// should force it to open immediately. |
} |
} else { |
-#if defined(HTML_INSTANT_EXTENDED_POPUP) |
- InstantController* instant = GetInstantController(); |
- if (instant && instant->OnUpOrDownKeyPressed(count)) { |
- // If Instant handles the key press, it's showing a list of suggestions |
- // that it's stepping through. In that case, our popup model is |
- // irrelevant, so don't process the key press ourselves. However, do stop |
- // the autocomplete system from changing the results. |
- autocomplete_controller()->Stop(false); |
- } else |
-#endif |
- { |
- // The popup is open, so the user should be able to interact with it |
- // normally. |
- popup_model()->Move(count); |
- } |
+ // The popup is open, so the user should be able to interact with it |
+ // normally. |
+ popup_model()->Move(count); |
} |
} |
@@ -1288,36 +1257,12 @@ void OmniboxEditModel::RevertTemporaryText(bool revert_popup) { |
// The user typed something, then selected a different item. Restore the |
// text they typed and change back to the default item. |
// NOTE: This purposefully does not reset paste_state_. |
-#if defined(HTML_INSTANT_EXTENDED_POPUP) |
- bool notify_instant = is_temporary_text_set_by_instant_; |
-#endif |
just_deleted_text_ = false; |
has_temporary_text_ = false; |
is_temporary_text_set_by_instant_ = false; |
selected_instant_autocomplete_match_index_ = OmniboxPopupModel::kNoMatch; |
is_instant_temporary_text_a_search_query_ = false; |
-#if defined(HTML_INSTANT_EXTENDED_POPUP) |
- InstantController* instant = GetInstantController(); |
- if (instant && notify_instant) { |
- // Normally, popup_model()->ResetToDefaultMatch() will cause the view text |
- // to be updated. In Instant Extended mode however, the popup_model() is |
- // not used, so it won't do anything. So, update the view ourselves. Even |
- // if Instant is not in extended mode (i.e., it's enabled in non-extended |
- // mode, or disabled altogether), this is okay to do, since the call to |
- // popup_model()->ResetToDefaultMatch() will just override whatever we do |
- // here. |
- // |
- // The two "false" arguments make sure that our shenanigans don't cause any |
- // previously saved selection to be erased nor OnChanged() to be called. |
- view_->OnTemporaryTextMaybeChanged(user_text_ + inline_autocomplete_text_, |
- false, false); |
- AutocompleteResult::const_iterator match(result().default_match()); |
- instant->OnCancel(match != result().end() ? *match : AutocompleteMatch(), |
- user_text_, |
- user_text_ + inline_autocomplete_text_); |
- } |
-#endif |
if (revert_popup) |
popup_model()->ResetToDefaultMatch(); |
view_->OnRevertTemporaryText(); |