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

Unified Diff: ui/base/ime/input_method_base.cc

Issue 1771173002: Implement input.ime.sendKeyEvents API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failure. Created 4 years, 9 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/input_method_base.h ('k') | ui/base/ime/input_method_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_base.cc
diff --git a/ui/base/ime/input_method_base.cc b/ui/base/ime/input_method_base.cc
index e4af2e847995cdde30ed6120aaecff569a8052bb..d66cb94b60da6258d3b13bbb165de02ef2e86c25 100644
--- a/ui/base/ime/input_method_base.cc
+++ b/ui/base/ime/input_method_base.cc
@@ -17,7 +17,9 @@
namespace ui {
InputMethodBase::InputMethodBase()
- : delegate_(nullptr), text_input_client_(nullptr) {}
+ : sending_key_event_(false),
+ delegate_(nullptr),
+ text_input_client_(nullptr) {}
InputMethodBase::~InputMethodBase() {
FOR_EACH_OBSERVER(InputMethodObserver,
@@ -195,4 +197,10 @@ void InputMethodBase::UpdateCompositionText(const CompositionText& composition_,
void InputMethodBase::DeleteSurroundingText(int32_t offset, uint32_t length) {}
+void InputMethodBase::SendKeyEvent(KeyEvent* event) {
+ sending_key_event_ = true;
+ DispatchKeyEvent(event);
+ sending_key_event_ = false;
+}
+
} // namespace ui
« no previous file with comments | « ui/base/ime/input_method_base.h ('k') | ui/base/ime/input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698