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

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

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/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 09319ed476ebee085d02719a6f7c6a029062be86..5f76afe1b2bf7464edeb55512aefdcc1bde6c0b6 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -716,19 +716,6 @@ gfx::NativeView OmniboxViewMac::GetRelativeWindowForPopup() const {
return NULL;
}
-void OmniboxViewMac::SetGrayTextAutocompletion(
- const base::string16& suggest_text) {
- if (suggest_text == suggest_text_)
Peter Kasting 2016/11/21 21:11:43 suggest_text_ should go away, I assume.
Marc Treib 2016/11/22 10:35:30 Done.
- return;
- suggest_text_ = suggest_text;
- [field_ setGrayTextAutocompletion:base::SysUTF16ToNSString(suggest_text)
- textColor:SuggestTextColor()];
-}
-
-base::string16 OmniboxViewMac::GetGrayTextAutocompletion() const {
- return suggest_text_;
-}
-
int OmniboxViewMac::GetTextWidth() const {
// Not used on mac.
NOTREACHED();
@@ -817,15 +804,6 @@ bool OmniboxViewMac::OnDoCommandBySelector(SEL cmd) {
}
}
- if (cmd == @selector(moveRight:)) {
- // Only commit suggested text if the cursor is all the way to the right and
- // there is no selection.
- if (suggest_text_.length() > 0 && IsCaretAtEnd()) {
- model()->CommitSuggestedText();
- return true;
- }
- }
-
if (cmd == @selector(scrollPageDown:)) {
model()->OnUpOrDownKeyPressed(model()->result().size());
return true;

Powered by Google App Engine
This is Rietveld 408576698