Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4214)

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm

Issue 12221124: Omnibox Mac: Always allow up and down arrow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
index fbeb402a777c302f81387ff2449a4b741602d156..62cb4e969f636b4279a3826ee067735aee2b92bd 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -705,20 +705,19 @@ bool OmniboxViewMac::OnDoCommandBySelector(SEL cmd) {
if (cmd == @selector(deleteForward:))
delete_was_pressed_ = true;
- // Don't intercept up/down-arrow or backtab if the popup isn't open.
- if (model()->popup_model()->IsOpen()) {
- if (cmd == @selector(moveDown:)) {
- model()->OnUpOrDownKeyPressed(1);
- return true;
- }
+ if (cmd == @selector(moveDown:)) {
+ model()->OnUpOrDownKeyPressed(1);
+ return true;
+ }
- if (cmd == @selector(moveUp:)) {
- model()->OnUpOrDownKeyPressed(-1);
- return true;
- }
+ if (cmd == @selector(moveUp:)) {
+ model()->OnUpOrDownKeyPressed(-1);
+ return true;
+ }
- // If instant extended is then allow users to press tab to select results
- // from the omnibox popup.
+ if (model()->popup_model()->IsOpen()) {
+ // If instant extended is enabled then allow users to press tab to select
+ // results from the omnibox popup.
BOOL enableTabAutocomplete =
chrome::search::IsInstantExtendedAPIEnabled(model()->profile());
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698