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

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

Issue 6252003: Accept keyword by pressing space. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 e7906c7d0842bd01a0f8591e81acaacaebd6ed7b..a0a25b2e0b58e67663d72decdfe8acb57d27ede3 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -903,6 +903,10 @@ std::wstring LocationBarView::GetTitle() const {
return UTF16ToWideHack(GetTabContentsFromDelegate(delegate_)->GetTitle());
}
+bool LocationBarView::IsKeywordHintVisible() const {
+ return keyword_hint_view_->IsVisible();
+}
+
int LocationBarView::AvailableWidth(int location_bar_width) {
return location_bar_width - location_entry_->TextWidth();
}
@@ -1058,7 +1062,7 @@ bool LocationBarView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
// Return true so that the edit sees the tab and commits the suggestion.
return true;
}
- if (keyword_hint_view_->IsVisible() && !e.IsShiftDown()) {
+ if (IsKeywordHintVisible() && !e.IsShiftDown()) {
// Return true so the edit gets the tab event and enters keyword mode.
return true;
}

Powered by Google App Engine
This is Rietveld 408576698