Chromium Code Reviews| Index: chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc |
| =================================================================== |
| --- chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc (revision 117356) |
| +++ chrome/browser/ui/gtk/omnibox/omnibox_view_gtk.cc (working copy) |
| @@ -555,16 +555,22 @@ |
| bool update_popup) { |
| model_->SetUserText(text); |
| // TODO(deanm): something about selection / focus change here. |
| - SetWindowTextAndCaretPos(display_text, display_text.length()); |
| - if (update_popup) |
| - UpdatePopup(); |
| - TextChanged(); |
| + SetWindowTextAndCaretPos(display_text, display_text.length(), update_popup, |
| + true); |
| } |
| void OmniboxViewGtk::SetWindowTextAndCaretPos(const string16& text, |
| - size_t caret_pos) { |
| + size_t caret_pos, |
| + bool update_popup, |
| + bool notify_text_changed) { |
| CharRange range(static_cast<int>(caret_pos), static_cast<int>(caret_pos)); |
| SetTextAndSelectedRange(text, range); |
| + |
| + if (update_popup) |
| + UpdatePopup(); |
| + |
| + if (notify_text_changed) |
| + TextChanged(); |
| } |
| void OmniboxViewGtk::SetForcedQuery() { |
| @@ -639,7 +645,7 @@ |
| saved_temporary_selection_ = GetSelection(); |
| StartUpdatingHighlightedText(); |
| - SetWindowTextAndCaretPos(display_text, display_text.length()); |
| + SetWindowTextAndCaretPos(display_text, display_text.length(), false, false); |
| FinishUpdatingHighlightedText(); |
| TextChanged(); |
|
aaron.randolph
2012/01/14 04:25:34
It looks like this could probably be removed and t
Peter Kasting
2012/01/18 18:41:31
I looked at this with one of the GTK guys and neit
|
| } |