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

Unified Diff: ui/base/ime/text_input_client.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/base/ime/text_edit_commands.h ('k') | ui/base/ime/ui_base_ime.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/text_input_client.h
diff --git a/ui/base/ime/text_input_client.h b/ui/base/ime/text_input_client.h
index a3256be0b149e098686e63cc67bc7cf03d791e2f..1dfab43c67ad9e28827eb5d46d1bd333e0895916 100644
--- a/ui/base/ime/text_input_client.h
+++ b/ui/base/ime/text_input_client.h
@@ -24,6 +24,7 @@ class Rect;
namespace ui {
class KeyEvent;
+enum class TextEditCommand;
// An interface implemented by a View that needs text input support.
class UI_BASE_IME_EXPORT TextInputClient {
@@ -166,15 +167,15 @@ class UI_BASE_IME_EXPORT TextInputClient {
// http://crbug.com/360334
virtual void EnsureCaretInRect(const gfx::Rect& rect) = 0;
- // Returns true if |command_id| is currently allowed to be executed.
- virtual bool IsEditCommandEnabled(int command_id) const = 0;
+ // Returns true if |command| is currently allowed to be executed.
+ virtual bool IsTextEditCommandEnabled(TextEditCommand command) const = 0;
- // Execute the command specified by |command_id| on the next key event.
- // This allows a TextInputClient to be informed of a platform-independent edit
- // command that has been derived from the key event currently being dispatched
- // (but not yet sent to the TextInputClient). The edit command will take into
- // account any OS-specific, or user-specified, keybindings that may be set up.
- virtual void SetEditCommandForNextKeyEvent(int command_id) = 0;
+ // Execute |command| on the next key event. This allows a TextInputClient to
+ // be informed of a platform-independent edit command that has been derived
+ // from the key event currently being dispatched (but not yet sent to the
+ // TextInputClient). The edit command will take into account any OS-specific,
+ // or user-specified, keybindings that may be set up.
+ virtual void SetTextEditCommandForNextKeyEvent(TextEditCommand command) = 0;
};
} // namespace ui
« no previous file with comments | « ui/base/ime/text_edit_commands.h ('k') | ui/base/ime/ui_base_ime.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698