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

Unified Diff: ui/base/ime/input_method_auralinux.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/ime_input_context_handler_interface.h ('k') | ui/base/ime/input_method_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_auralinux.cc
diff --git a/ui/base/ime/input_method_auralinux.cc b/ui/base/ime/input_method_auralinux.cc
index c5c0d5ef92600d9cfaa503985ce406ce58072679..08ec50bdc22f902b1eefda6d94da01f84343ec82 100644
--- a/ui/base/ime/input_method_auralinux.cc
+++ b/ui/base/ime/input_method_auralinux.cc
@@ -65,6 +65,20 @@ void InputMethodAuraLinux::DispatchKeyEvent(ui::KeyEvent* event) {
return;
}
+ if (!event->HasNativeEvent() && sending_key_event_) {
+ // Faked key events that are sent from input.ime.sendKeyEvents.
+ ui::EventDispatchDetails details = DispatchKeyEventPostIME(event);
+ if (details.dispatcher_destroyed || details.target_destroyed ||
+ event->stopped_propagation()) {
+ return;
+ }
+ if ((event->is_char() || event->GetDomKey().IsCharacter()) &&
+ event->type() == ui::ET_KEY_PRESSED) {
+ GetTextInputClient()->InsertChar(*event);
+ }
+ return;
+ }
+
suppress_next_result_ = false;
composition_changed_ = false;
result_text_.clear();
« no previous file with comments | « ui/base/ime/ime_input_context_handler_interface.h ('k') | ui/base/ime/input_method_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698