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

Unified Diff: ui/base/ime/input_method_win.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
« ui/base/ime/input_method_base.h ('K') | « ui/base/ime/input_method_chromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/ime/input_method_win.cc
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc
index 6ac7e6f1219d2dc86704a87e8ce44893cfe2b7d8..176f7111bd5e137cfeb92072782a2e93ed6abee1 100644
--- a/ui/base/ime/input_method_win.cc
+++ b/ui/base/ime/input_method_win.cc
@@ -178,6 +178,9 @@ void InputMethodWin::DispatchKeyEvent(ui::KeyEvent* event) {
switches::kDisableMergeKeyCharEvents) &&
char_msgs.size() <= 1 && GetEngine() &&
GetEngine()->IsInterestedInKeyEvent()) {
+ // 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(
&InputMethodWin::ProcessKeyEventDone, weak_ptr_factory_.GetWeakPtr(),
base::Owned(new ui::KeyEvent(*event)),
@@ -191,6 +194,7 @@ void InputMethodWin::DispatchKeyEvent(ui::KeyEvent* event) {
void InputMethodWin::ProcessKeyEventDone(ui::KeyEvent* event,
const std::vector<MSG>* char_msgs,
bool is_handled) {
+ handling_key_event_ = false;
DCHECK(event);
if (is_handled)
return;
« ui/base/ime/input_method_base.h ('K') | « ui/base/ime/input_method_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698