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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 2510373003: Cleanup: Remove "gray text" logic from Omnibox (Closed)
Patch Set: mac Created 4 years, 1 month 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/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 2347ee76077324f58e45c892ad65515e78de9bcf..23429ec526daee87546488efd8a8eb2804bfada5 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -536,16 +536,6 @@ gfx::NativeView OmniboxViewViews::GetRelativeWindowForPopup() const {
return GetWidget()->GetTopLevelWidget()->GetNativeView();
}
-void OmniboxViewViews::SetGrayTextAutocompletion(const base::string16& input) {
- if (location_bar_view_)
- location_bar_view_->SetGrayTextAutocompletion(input);
-}
-
-base::string16 OmniboxViewViews::GetGrayTextAutocompletion() const {
- return location_bar_view_ ?
- location_bar_view_->GetGrayTextAutocompletion() : base::string16();
-}
-
int OmniboxViewViews::GetWidth() const {
return location_bar_view_ ? location_bar_view_->width() : 0;
}
@@ -967,21 +957,6 @@ bool OmniboxViewViews::HandleKeyEvent(views::Textfield* textfield,
model()->ClearKeyword();
return true;
- // Handle the right-arrow key for LTR text and the left-arrow key for RTL
- // text if there is gray text that needs to be committed.
- case ui::VKEY_RIGHT:
- if (GetCursorPosition() == text().length() &&
- GetTextDirection() == base::i18n::LEFT_TO_RIGHT) {
- return model()->CommitSuggestedText();
- }
- break;
- case ui::VKEY_LEFT:
- if (GetCursorPosition() == text().length() &&
- GetTextDirection() == base::i18n::RIGHT_TO_LEFT) {
- return model()->CommitSuggestedText();
- }
- break;
-
default:
break;
}

Powered by Google App Engine
This is Rietveld 408576698