Commit 61f29c23 authored by Justin Donnelly's avatar Justin Donnelly Committed by Commit Bot

[omnibox, MacViews] Open background tab on command-enter.

Previously, this opened a new tab in the foreground. Opening in a
background tab matches the behavior of Cocoa Chrome and Safari.

Bug: 838966
Change-Id: I5220c614afab0fc1894af0f39caa350529ef7634
Reviewed-on: https://chromium-review.googlesource.com/1049949Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Justin Donnelly <jdonnelly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556794}
parent 970fd082
...@@ -1141,10 +1141,15 @@ bool OmniboxViewViews::HandleKeyEvent(views::Textfield* textfield, ...@@ -1141,10 +1141,15 @@ bool OmniboxViewViews::HandleKeyEvent(views::Textfield* textfield,
OmniboxPopupModel::TAB_SWITCH) { OmniboxPopupModel::TAB_SWITCH) {
popup_view_->OpenMatch(WindowOpenDisposition::SWITCH_TO_TAB); popup_view_->OpenMatch(WindowOpenDisposition::SWITCH_TO_TAB);
} else { } else {
model()->AcceptInput(alt || command if (alt) {
? WindowOpenDisposition::NEW_FOREGROUND_TAB model()->AcceptInput(WindowOpenDisposition::NEW_FOREGROUND_TAB,
: WindowOpenDisposition::CURRENT_TAB, false);
false); } else if (command) {
model()->AcceptInput(WindowOpenDisposition::NEW_BACKGROUND_TAB,
false);
} else {
model()->AcceptInput(WindowOpenDisposition::CURRENT_TAB, false);
}
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment