diff options
author | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 17:58:49 +0000 |
---|---|---|
committer | mpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 17:58:49 +0000 |
commit | 37d084754c7b7986fc5c1236cf93dbbe1320eff4 (patch) | |
tree | 0162c3e9f90fb77de97aa4c4f9f4c0341716cb29 | |
parent | 3f369085e882e753aeba49d9270e829d8c22081d (diff) | |
download | chromium_src-37d084754c7b7986fc5c1236cf93dbbe1320eff4.zip chromium_src-37d084754c7b7986fc5c1236cf93dbbe1320eff4.tar.gz chromium_src-37d084754c7b7986fc5c1236cf93dbbe1320eff4.tar.bz2 |
Merge 217232 "Fix omnibox enter behavior after pasting from righ..."
> Fix omnibox enter behavior after pasting from right click.
>
> BUG=270025
>
> Review URL: https://chromiumcodereview.appspot.com/22910002
TBR=hfung@chromium.org
Review URL: https://codereview.chromium.org/23077004
git-svn-id: svn://svn.chromium.org/chrome/branches/1547/src@217291 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/omnibox/omnibox_edit_model.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc index b0715bf..72ae821 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc @@ -812,7 +812,14 @@ void OmniboxEditModel::OnSetFocus(bool control_down) { SetFocusState(OMNIBOX_FOCUS_VISIBLE, OMNIBOX_FOCUS_CHANGE_EXPLICIT); control_key_state_ = control_down ? DOWN_WITHOUT_CHANGE : UP; - if (delegate_->CurrentPageExists()) { + // Try to get ZeroSuggest suggestions if a page is loaded and the user has + // not been typing in the omnibox. The |user_input_in_progress_| check is + // used to detect the case where this function is called after right-clicking + // in the omnibox and selecting paste in Linux (in which case we actually get + // the OnSetFocus() call after the process of handling the paste has kicked + // off). + // TODO(hfung): Remove this when crbug/271590 is fixed. + if (delegate_->CurrentPageExists() && !user_input_in_progress_) { // TODO(jered): We may want to merge this into Start() and just call that // here rather than having a special entry point for zero-suggest. Note // that we avoid PermanentURL() here because it's not guaranteed to give us |