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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 9417032: Enabled pressing TAB to traverse through the Omnibox results (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index e0e883162004a5756202c8e392e982dd320c2f26..a0145c72bd16cf390b57b1c6582f766378dd3883 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1017,10 +1017,9 @@ std::string LocationBarView::GetClassName() const {
bool LocationBarView::SkipDefaultKeyEventProcessing(
const views::KeyEvent& event) {
#if defined(OS_WIN)
- bool views_omnibox = views::Widget::IsPureViews();
if (views::FocusManager::IsTabTraversalKeyEvent(event)) {
- if (HasValidSuggestText()) {
- // Return true so that the edit sees the tab and commits the suggestion.
+ if (location_entry_->model()->popup_model()->IsOpen()) {
+ // Return true so that the edit sees the tab and moves the selection.
return true;
}
if (keyword_hint_view_->visible() && !event.IsShiftDown()) {
@@ -1028,12 +1027,6 @@ bool LocationBarView::SkipDefaultKeyEventProcessing(
return true;
}
-#if !defined(USE_AURA)
- // If the caret is not at the end, then tab moves the caret to the end.
- if (!views_omnibox && !GetOmniboxViewWin()->IsCaretAtEnd())
- return true;
-#endif
-
// Tab while showing instant commits instant immediately.
// Return true so that focus traversal isn't attempted. The edit ends
// up doing nothing in this case.
@@ -1042,7 +1035,7 @@ bool LocationBarView::SkipDefaultKeyEventProcessing(
}
#if !defined(USE_AURA)
- if (!views_omnibox)
+ if (!views::Widget::IsPureViews())
return GetOmniboxViewWin()->SkipDefaultKeyEventProcessing(event);
#endif
NOTIMPLEMENTED();
« no previous file with comments | « chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698