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

Issue 2957173004: Make DispatchKeyEventPostIME() asynchronous.

Created:
3 years, 5 months ago by Hadi
Modified:
3 years, 4 months ago
Reviewers:
Shu Chen, James Su, sadrul, sky
CC:
chromium-reviews, nona+watch_chromium.org, James Su, shuchen+watch_chromium.org, yusukes+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make DispatchKeyEventPostIME() asynchronous. This change: - Adds an overloaded version of InputMethodDelegate::DispatchKeyEventPostIME() with a callback option. - Uses the async version of DispatchKeyEventPostIME() in InputMethodChromeOS. - Adds ui.mojom.TextInputClient.DispatchKeyEventPostIME(). This is because DispatchKeyEventPostIME() isn't really *Post* IME, and calls to it are sometimes intervened with the logic in InputMethodChromeOS to provide KeyDown and KeyUp events in addition to KeyPress events to textfields. This CL calls ui.mojom.TextInputClient.DispatchKeyEventPostIME() in these cases and continues the logic after the dispatch finishes in the client side. BUG=723792

Patch Set 1 #

Patch Set 2 : Make ProcessFilteredKeyPressEvent async. #

Patch Set 3 : . #

Patch Set 4 : Fix input_method_chromeos_unittest #

Patch Set 5 : simplify. #

Patch Set 6 : Fix some more tests. #

Patch Set 7 : More code & some fixes. #

Patch Set 8 : Fixed crash in tests. #

Patch Set 9 : cleanup. #

Patch Set 10 : cleanup. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -89 lines) Patch
M chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/ime_driver/input_method_bridge_chromeos_unittest.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/ime_driver/remote_text_input_client.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -1 line 0 comments Download
M chrome/browser/ui/views/ime_driver/remote_text_input_client.cc View 1 2 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
M services/ui/ime/ime_unittest.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M services/ui/public/interfaces/ime/ime.mojom View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M ui/aura/mus/input_method_mus.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -14 lines 0 comments Download
M ui/aura/mus/input_method_mus_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M ui/aura/mus/text_input_client_impl.h View 1 2 3 4 5 6 3 chunks +7 lines, -1 line 0 comments Download
M ui/aura/mus/text_input_client_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +16 lines, -2 lines 0 comments Download
M ui/base/ime/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/ime/input_method_base.h View 2 chunks +2 lines, -1 line 0 comments Download
M ui/base/ime/input_method_chromeos.h View 1 2 2 chunks +27 lines, -7 lines 0 comments Download
M ui/base/ime/input_method_chromeos.cc View 1 2 3 4 5 6 7 8 chunks +95 lines, -54 lines 3 comments Download
M ui/base/ime/input_method_chromeos_unittest.cc View 1 2 3 2 chunks +13 lines, -7 lines 0 comments Download
M ui/base/ime/input_method_delegate.h View 1 chunk +4 lines, -0 lines 1 comment Download
A ui/base/ime/input_method_delegate.cc View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (33 generated)
Hadi
PTAL. Since I'm leaving Google in couple of days, I probably won't be able to ...
3 years, 5 months ago (2017-07-05 19:31:35 UTC) #31
Shu Chen
https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_delegate.h File ui/base/ime/input_method_delegate.h (right): https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_delegate.h#newcode28 ui/base/ime/input_method_delegate.h:28: virtual ui::EventDispatchDetails DispatchKeyEventPostIME( Anything makes you decide not to ...
3 years, 5 months ago (2017-07-06 03:38:42 UTC) #34
Shu Chen
https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_chromeos.cc File ui/base/ime/input_method_chromeos.cc (right): https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_chromeos.cc#newcode136 ui/base/ime/input_method_chromeos.cc:136: ProcessKeyEventPostIME(event, std::move(ack_callback), false, is_handled); Here removes the original checks: ...
3 years, 5 months ago (2017-07-07 01:01:11 UTC) #35
Shu Chen
I'm concerned that this cl can easily cause regressions to CJK input methods. I found ...
3 years, 5 months ago (2017-07-07 01:14:20 UTC) #36
Shu Chen
Btw, I don't prefer the double async design like this: ProcessFilteredKeyPressEvent -> DispatchKeyEventPostIME [async]-> PostProcessFilteredKeyPressEvent ...
3 years, 5 months ago (2017-07-07 01:22:19 UTC) #37
Shu Chen
https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_chromeos.cc File ui/base/ime/input_method_chromeos.cc (right): https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_chromeos.cc#newcode330 ui/base/ime/input_method_chromeos.cc:330: return ProcessFilteredKeyPressEvent(event, std::move(ack_callback)); Is this a potential dead loop? ...
3 years, 5 months ago (2017-07-07 01:24:25 UTC) #38
Shu Chen
https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_chromeos.cc File ui/base/ime/input_method_chromeos.cc (right): https://codereview.chromium.org/2957173004/diff/180001/ui/base/ime/input_method_chromeos.cc#newcode330 ui/base/ime/input_method_chromeos.cc:330: return ProcessFilteredKeyPressEvent(event, std::move(ack_callback)); Is this a potential dead loop? ...
3 years, 5 months ago (2017-07-07 01:24:26 UTC) #39
Shu Chen
3 years, 5 months ago (2017-07-07 01:28:01 UTC) #41
+suzhe@ for his insight.

Powered by Google App Engine
This is Rietveld 408576698