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

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

Issue 1657593007: Implement chrome.input.ime.setComposition/commitText API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 4248975079f4b41df274933d05cbcfadf8eebd50..fc8eec5382a55e8dd9fd47d546de227c5e792b8f 100644
--- a/ui/base/ime/input_method_auralinux.cc
+++ b/ui/base/ime/input_method_auralinux.cc
@@ -90,6 +90,9 @@ void InputMethodAuraLinux::DispatchKeyEvent(ui::KeyEvent* event) {
if (text_input_type_ != TEXT_INPUT_TYPE_PASSWORD &&
GetEngine() && GetEngine()->IsInterestedInKeyEvent() &&
(!filtered || NeedInsertChar())) {
+ // Make true that we don't handle IME API calling of setComposition and
+ // commitText while the extension is processing key event.
+ handling_key_event_ = true;
ui::IMEEngineHandlerInterface::KeyEventDoneCallback callback =
base::Bind(&InputMethodAuraLinux::ProcessKeyEventDone,
weak_ptr_factory_.GetWeakPtr(),
@@ -103,6 +106,8 @@ void InputMethodAuraLinux::DispatchKeyEvent(ui::KeyEvent* event) {
void InputMethodAuraLinux::ProcessKeyEventDone(ui::KeyEvent* event,
bool filtered,
bool is_handled) {
+ handling_key_event_ = false;
+
DCHECK(event);
if (is_handled)
return;

Powered by Google App Engine
This is Rietveld 408576698