Chromium Code Reviews| Index: ui/views/controls/textfield/textfield.h |
| diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h |
| index 3bb770bc6891e0dbcd3169b3e1e915614fcd05e0..5f4249a7c4f6edb4e86bf01c9f7218720bca530c 100644 |
| --- a/ui/views/controls/textfield/textfield.h |
| +++ b/ui/views/controls/textfield/textfield.h |
| @@ -303,8 +303,8 @@ class VIEWS_EXPORT Textfield : public View, |
| base::i18n::TextDirection direction) override; |
| void ExtendSelectionAndDelete(size_t before, size_t after) override; |
| void EnsureCaretInRect(const gfx::Rect& rect) override; |
| - bool IsEditCommandEnabled(int command_id) const override; |
| - void SetEditCommandForNextKeyEvent(int command_id) override; |
| + bool IsEditCommandEnabled(ui::TextEditCommand command) const override; |
| + void SetEditCommandForNextKeyEvent(ui::TextEditCommand command) override; |
| protected: |
| // Inserts or appends a character in response to an IME operation. |
| @@ -318,8 +318,8 @@ class VIEWS_EXPORT Textfield : public View, |
| // Get the text from the selection clipboard. |
| virtual base::string16 GetSelectionClipboardText() const; |
| - // Executes the given text editing command. |
| - virtual void ExecuteEditCommand(int command_id); |
| + // Executes the given |command|. |
| + virtual void ExecuteEditCommand(ui::TextEditCommand command); |
|
sky
2016/06/16 17:00:37
ExecuteTextEditCommand?
karandeepb
2016/06/17 02:39:03
Done.
|
| private: |
| friend class TextfieldTestApi; |
| @@ -395,11 +395,12 @@ class VIEWS_EXPORT Textfield : public View, |
| // This is the current listener for events from this Textfield. |
| TextfieldController* controller_; |
| - // If non-zero, an edit command to execute on the next key event. When set, |
| - // the key event is still passed to |controller_|, but otherwise ignored in |
| - // favor of the edit command. Set via SetEditCommandForNextKeyEvent() during |
| - // dispatch of that key event (see comment in TextInputClient). |
| - int scheduled_edit_command_; |
| + // An edit command to execute on the next key event. When set to a valid |
| + // value, the key event is still passed to |controller_|, but otherwise |
| + // ignored in favor of the edit command. Set via |
| + // SetEditCommandForNextKeyEvent() during dispatch of that key event (see |
| + // comment in TextInputClient). |
| + ui::TextEditCommand scheduled_edit_command_; |
| // True if this Textfield cannot accept input and is read-only. |
| bool read_only_; |