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

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

Issue 12792013: Instant extended: Remove suggest commit on lost focus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update another test Created 7 years, 9 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/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 7c43e06e2f237258354e806bed41ba0ca6ab2d37..97060fcca1944ac53133804fdeeb530ec008c268 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -369,8 +369,6 @@ void OmniboxViewMac::ApplyCaretVisibility() {
}
void OmniboxViewMac::SetText(const string16& display_text) {
- // If we are setting the text directly, there cannot be any suggest text.
- SetInstantSuggestion(string16());
SetTextInternal(display_text);
}
@@ -495,7 +493,6 @@ void OmniboxViewMac::OnTemporaryTextMaybeChanged(const string16& display_text,
if (save_original_selection)
saved_temporary_selection_ = GetSelectedRange();
- SetInstantSuggestion(string16());
SetWindowTextAndCaretPos(display_text, display_text.size(), false, false);
if (notify_text_changed)
model()->OnChanged();
@@ -503,10 +500,6 @@ void OmniboxViewMac::OnTemporaryTextMaybeChanged(const string16& display_text,
}
void OmniboxViewMac::OnStartingIME() {
- // Reset the suggest text just before starting an IME composition session,
- // otherwise the IME composition may be interrupted when the suggest text
- // gets reset by the IME composition change.
- SetInstantSuggestion(string16());
}
bool OmniboxViewMac::OnInlineAutocompleteTextMaybeChanged(
@@ -648,15 +641,6 @@ void OmniboxViewMac::OnDidEndEditing() {
}
bool OmniboxViewMac::OnDoCommandBySelector(SEL cmd) {
- if (cmd != @selector(moveRight:) &&
- cmd != @selector(insertTab:) &&
- cmd != @selector(insertTabIgnoringFieldEditor:)) {
- // Reset the suggest text for any change other than key right or tab.
- // TODO(rohitrao): This is here to prevent complications when editing text.
- // See if this can be removed.
- SetInstantSuggestion(string16());
- }
-
if (cmd == @selector(deleteForward:))
delete_was_pressed_ = true;

Powered by Google App Engine
This is Rietveld 408576698