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

Unified Diff: ui/views/controls/textfield/textfield.h

Issue 2027133002: Modify ui::TextInputClient to use ui::TextEditCommand enum in place of resource ids. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor4_up_down_mac
Patch Set: Address review comments. Created 4 years, 6 months 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
« no previous file with comments | « ui/views/controls/prefix_selector.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1ccdd08c53fc5f2b6d727bc1b2fa646a1fb1b964 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 IsTextEditCommandEnabled(ui::TextEditCommand command) const override;
+ void SetTextEditCommandForNextKeyEvent(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 ExecuteTextEditCommand(ui::TextEditCommand command);
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
+ // 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_;
« no previous file with comments | « ui/views/controls/prefix_selector.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698