diff options
author | hfung@chromium.org <hfung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 11:43:46 +0000 |
---|---|---|
committer | hfung@chromium.org <hfung@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-13 11:43:46 +0000 |
commit | 4e7b67cd1ae5cff97ec0d9b9f7aa7b173624a3f7 (patch) | |
tree | 9205a86aed8a83f8745490316667022b2bf98e83 /chrome/browser/ui/omnibox/omnibox_edit_model.cc | |
parent | 12bd537e7357da6dfe6c9f4ebf04c58c6e6c88fe (diff) | |
download | chromium_src-4e7b67cd1ae5cff97ec0d9b9f7aa7b173624a3f7.zip chromium_src-4e7b67cd1ae5cff97ec0d9b9f7aa7b173624a3f7.tar.gz chromium_src-4e7b67cd1ae5cff97ec0d9b9f7aa7b173624a3f7.tar.bz2 |
Fix omnibox enter behavior after pasting from right click.
BUG=270025
Review URL: https://chromiumcodereview.appspot.com/22910002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/omnibox/omnibox_edit_model.cc')
-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 e983bbc..ae9ec4d 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 |