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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 68103008: Hide IME autocompletion when Omnibox popup closes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a comment. Created 7 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/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index c924997a00ef5f3a5018011fa70c02cb5e914552..a3025409c2cfc461c1fe0f16f69ec0d30ffda2fe 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -1020,6 +1020,7 @@ void OmniboxEditModel::OnPopupDataChanged(
has_temporary_text_ = true;
original_url_ = *destination_for_temporary_text_change;
inline_autocomplete_text_.clear();
+ view_->OnInlineAutocompleteTextCleared();
}
if (control_key_state_ == DOWN_WITHOUT_CHANGE) {
// Arrowing around the popup cancels control-enter.
@@ -1038,6 +1039,8 @@ void OmniboxEditModel::OnPopupDataChanged(
bool call_controller_onchanged = true;
inline_autocomplete_text_ = text;
+ if (inline_autocomplete_text_.empty())
+ view_->OnInlineAutocompleteTextCleared();
string16 user_text = user_input_in_progress_ ? user_text_ : permanent_text_;
if (keyword_state_changed && KeywordIsSelected()) {
@@ -1218,6 +1221,7 @@ void OmniboxEditModel::InternalSetUserText(const string16& text) {
user_text_ = text;
just_deleted_text_ = false;
inline_autocomplete_text_.clear();
+ view_->OnInlineAutocompleteTextCleared();
}
bool OmniboxEditModel::KeywordIsSelected() const {
« no previous file with comments | « chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698