| Index: ui/views/controls/textfield/textfield.h
|
| diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
|
| index 938d03de3cd055fd1a11782c3637b85ddd877140..56fdd9ccf4c535bc21c278842f2a794d0f30b279 100644
|
| --- a/ui/views/controls/textfield/textfield.h
|
| +++ b/ui/views/controls/textfield/textfield.h
|
| @@ -200,9 +200,6 @@ class VIEWS_EXPORT Textfield : public View,
|
| // Set the accessible name of the text field.
|
| void SetAccessibleName(const base::string16& name);
|
|
|
| - // Performs the action associated with the specified command id.
|
| - void ExecuteCommand(int command_id);
|
| -
|
| // Returns whether there is a drag operation originating from the textfield.
|
| bool HasTextBeingDragged();
|
|
|
| @@ -304,8 +301,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 IsTextEditCommandEnabled(ui::TextEditCommand command) const override;
|
| + void SetTextEditCommandForNextKeyEvent(ui::TextEditCommand command) override;
|
|
|
| protected:
|
| // Inserts or appends a character in response to an IME operation.
|
| @@ -319,6 +316,9 @@ class VIEWS_EXPORT Textfield : public View,
|
| // Get the text from the selection clipboard.
|
| virtual base::string16 GetSelectionClipboardText() const;
|
|
|
| + // Executes the given |command|.
|
| + virtual void ExecuteTextEditCommand(ui::TextEditCommand command);
|
| +
|
| private:
|
| friend class TextfieldTestApi;
|
|
|
| @@ -393,11 +393,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
|
| + // SetTextEditCommandForNextKeyEvent() during dispatch of that key event (see
|
| + // comment in TextInputClient).
|
| + ui::TextEditCommand scheduled_text_edit_command_;
|
|
|
| // True if this Textfield cannot accept input and is read-only.
|
| bool read_only_;
|
|
|