diff options
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_gtk.h')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h index 66c7541..dc09d91 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h @@ -488,9 +488,24 @@ class AutocompleteEditViewGtk : public AutocompleteEditView, // Was the delete key pressed with an empty selection at the end of the edit? bool delete_at_end_pressed_; + // Indicates if we are handling a key press event. + bool handling_key_press_; + + // Indicates if omnibox's content maybe changed by a key press event, so that + // we need to call OnAfterPossibleChange() after handling the event. + // This flag should be set for changes directly caused by a key press event, + // including changes to content text, selection range and preedit string. + // Changes caused by function calls like SetUserText() should not affect this + // flag. + bool content_maybe_changed_by_key_press_; + #if GTK_CHECK_VERSION(2, 20, 0) // Stores the text being composed by the input method. std::wstring preedit_; + + // Tracking preedit state before and after a possible change. We don't need to + // track preedit_'s content, as it'll be treated as part of text content. + size_t preedit_size_before_change_; #endif // The view that is going to be focused next. Only valid while handling |