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

Issue 1257603006: Refactoring for the InputMethod & InputMethodDelegate interfaces. (Closed)

Created:
5 years, 4 months ago by Shu Chen
Modified:
5 years, 4 months ago
Reviewers:
sadrul, James Su, oshima, yukawa
CC:
chromium-reviews, tdanderson+views_chromium.org, sadrul, yusukes+watch_chromium.org, tfarina, shuchen+watch_chromium.org, nona+watch_chromium.org, oshima+watch_chromium.org, kalyank, James Su, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactoring for the InputMethod & InputMethodDelegate interfaces. 1) DispatchKeyEvent returns void type instead of bool, as it is not used. 2) DispatchKeyEventPostIME returns EventDispatchDetails, so that the caller (InputMethod) can know whether its being destroyed after the call of DispatchKeyEventPostIME. 3) Both DispatchKeyEvent & DispatchKeyEventPostIME takes ui::KeyEvent* as the parameter, so that the stopped_propagation() state can be carried over. Note: this cl doesn't try to change any existing behaviors/logics, except one thing: The cl https://codereview.chromium.org/1236923003 may introduce a potential regression which this cl tries to fix: DesktopWindowTreeHostWin::DispatchKeyEventPostIME() always call event->StopPropagation(). However, HWNDMessageHandler::OnKeyEvent() relies on the event.handled() state to correctly call SetMsgHandled(FALSE). This cl remove the StopPropagation() call in DesktopWindowTreeHostWin::DispatchKeyEventPostIME() and let InputMethodWin/RemoteInputMethodWin call it as appropriate. TBR=sky@chromium.org BUG=513917, 474828 TEST=Trybots green. Committed: https://crrev.com/59c2a2cf79038dd2bcae5c45300a6a50de4ac9fd Cr-Commit-Position: refs/heads/master@{#341704}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : fixed compiling errors on Mac. #

Patch Set 6 : removed StopPropagation call in DWTHWin. #

Patch Set 7 : rebased. #

Patch Set 8 : fixed some compiling erros. #

Patch Set 9 : fixed compiling errors on chromeos. #

Total comments: 2

Patch Set 10 : addressed comments. #

Patch Set 11 : fix test failures on windows. #

Total comments: 20

Patch Set 12 : addressed some comments. #

Patch Set 13 : #

Total comments: 8

Patch Set 14 : addressed comments. #

Patch Set 15 : rebased. #

Patch Set 16 : Trybots green. #

Total comments: 4

Patch Set 17 : nits. #

Total comments: 2

Patch Set 18 : addressed Sadrul's comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+430 lines, -381 lines) Patch
M ash/display/window_tree_host_manager.h View 1 chunk +2 lines, -1 line 0 comments Download
M ash/display/window_tree_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M ash/host/ash_remote_window_tree_host_win.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ash/host/ash_remote_window_tree_host_win.cc View 1 2 3 1 chunk +6 lines, -8 lines 0 comments Download
M ash/host/ash_window_tree_host_ozone.cc View 2 chunks +8 lines, -9 lines 0 comments Download
M ash/host/ash_window_tree_host_unified.h View 1 chunk +2 lines, -1 line 0 comments Download
M ash/host/ash_window_tree_host_unified.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -8 lines 0 comments Download
M ash/host/ash_window_tree_host_win.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M ash/host/ash_window_tree_host_x11.h View 1 chunk +2 lines, -1 line 0 comments Download
M ash/host/ash_window_tree_host_x11.cc View 1 chunk +6 lines, -7 lines 0 comments Download
M ash/ime/input_method_event_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/input_method/input_method_engine.cc View 1 chunk +1 line, -1 line 0 comments Download
M mandoline/ui/aura/input_method_mandoline.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M mandoline/ui/aura/input_method_mandoline.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +12 lines, -10 lines 0 comments Download
M mandoline/ui/aura/native_widget_view_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -2 lines 0 comments Download
M ui/aura/window_tree_host.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/aura/window_tree_host.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M ui/base/ime/dummy_input_method.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/dummy_input_method.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ui/base/ime/input_method.h View 1 chunk +1 line, -2 lines 0 comments Download
M ui/base/ime/input_method_auralinux.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +2 lines, -8 lines 0 comments Download
M ui/base/ime/input_method_auralinux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 13 chunks +60 lines, -46 lines 0 comments Download
M ui/base/ime/input_method_auralinux_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 32 chunks +84 lines, -58 lines 0 comments Download
M ui/base/ime/input_method_base.h View 2 chunks +3 lines, -1 line 0 comments Download
M ui/base/ime/input_method_base.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M ui/base/ime/input_method_base_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/input_method_chromeos.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +8 lines, -7 lines 0 comments Download
M ui/base/ime/input_method_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +51 lines, -48 lines 0 comments Download
M ui/base/ime/input_method_chromeos_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +13 lines, -10 lines 0 comments Download
M ui/base/ime/input_method_delegate.h View 2 chunks +3 lines, -1 line 0 comments Download
M ui/base/ime/input_method_mac.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/input_method_mac.mm View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/ime/input_method_minimal.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/input_method_minimal.cc View 1 chunk +11 lines, -10 lines 0 comments Download
M ui/base/ime/input_method_win.h View 2 3 chunks +2 lines, -9 lines 0 comments Download
M ui/base/ime/input_method_win.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +19 lines, -25 lines 0 comments Download
M ui/base/ime/mock_input_method.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/base/ime/mock_input_method.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/ime/remote_input_method_win.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +16 lines, -17 lines 0 comments Download
M ui/base/ime/remote_input_method_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 14 chunks +50 lines, -31 lines 0 comments Download
M ui/keyboard/keyboard_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -5 lines 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 2 3 4 5 6 7 5 chunks +14 lines, -13 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 62 (20 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/100001
5 years, 4 months ago (2015-07-30 09:05:28 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/50967) ios_rel_device_ninja on ...
5 years, 4 months ago (2015-07-30 09:07:14 UTC) #4
Shu Chen
Guys, can you please review this cl? yukawa@/suzhe@ for general IME related stuff. sadrul@ for ...
5 years, 4 months ago (2015-07-30 09:08:26 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/120001
5 years, 4 months ago (2015-07-30 09:22:32 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/97939)
5 years, 4 months ago (2015-07-30 09:36:45 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/140001
5 years, 4 months ago (2015-07-30 09:44:13 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/160001
5 years, 4 months ago (2015-07-30 09:59:36 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/115520)
5 years, 4 months ago (2015-07-30 10:42:44 UTC) #16
oshima
changes in ash looks mechanical, so I'll approve if yukawa@/suzhe@ are happy with the change/design.
5 years, 4 months ago (2015-07-30 15:26:38 UTC) #17
yukawa
Strategy sounds good to me. I'm fine if James is OK for this change. One ...
5 years, 4 months ago (2015-07-30 18:11:40 UTC) #18
Shu Chen
https://codereview.chromium.org/1257603006/diff/160001/ui/base/ime/remote_input_method_win_unittest.cc File ui/base/ime/remote_input_method_win_unittest.cc (right): https://codereview.chromium.org/1257603006/diff/160001/ui/base/ime/remote_input_method_win_unittest.cc#newcode520 ui/base/ime/remote_input_method_win_unittest.cc:520: input_method->DispatchKeyEvent(&native_keydown); On 2015/07/30 18:11:39, yukawa wrote: > Does it ...
5 years, 4 months ago (2015-07-31 01:18:47 UTC) #19
yukawa
On 2015/07/31 01:18:47, Shu Chen wrote: > https://codereview.chromium.org/1257603006/diff/160001/ui/base/ime/remote_input_method_win_unittest.cc > File ui/base/ime/remote_input_method_win_unittest.cc (right): > > https://codereview.chromium.org/1257603006/diff/160001/ui/base/ime/remote_input_method_win_unittest.cc#newcode520 ...
5 years, 4 months ago (2015-07-31 01:25:44 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/200001
5 years, 4 months ago (2015-07-31 03:11:33 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/22858)
5 years, 4 months ago (2015-07-31 05:32:06 UTC) #24
oshima
ash/ lgtm. one question. https://codereview.chromium.org/1257603006/diff/200001/ui/base/ime/input_method_delegate.h File ui/base/ime/input_method_delegate.h (right): https://codereview.chromium.org/1257603006/diff/200001/ui/base/ime/input_method_delegate.h#newcode15 ui/base/ime/input_method_delegate.h:15: namespace internal { just curious. ...
5 years, 4 months ago (2015-07-31 09:38:34 UTC) #25
James Su
https://codereview.chromium.org/1257603006/diff/200001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/200001/ui/base/ime/input_method_auralinux.cc#newcode76 ui/base/ime/input_method_auralinux.cc:76: SendFakeProcessKeyEvent(event->flags()); This method should return ui::EventDispatchDetails as well, and ...
5 years, 4 months ago (2015-07-31 11:43:58 UTC) #26
Shu Chen
https://codereview.chromium.org/1257603006/diff/200001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/200001/ui/base/ime/input_method_auralinux.cc#newcode76 ui/base/ime/input_method_auralinux.cc:76: SendFakeProcessKeyEvent(event->flags()); On 2015/07/31 11:43:57, James Su wrote: > This ...
5 years, 4 months ago (2015-08-03 01:44:48 UTC) #27
James Su
https://codereview.chromium.org/1257603006/diff/240001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/240001/ui/base/ime/input_method_auralinux.cc#newcode146 ui/base/ime/input_method_auralinux.cc:146: event->StopPropagation(); why this line is moved into this if ...
5 years, 4 months ago (2015-08-03 06:58:55 UTC) #28
Shu Chen
https://codereview.chromium.org/1257603006/diff/240001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/240001/ui/base/ime/input_method_auralinux.cc#newcode146 ui/base/ime/input_method_auralinux.cc:146: event->StopPropagation(); On 2015/08/03 06:58:55, James Su wrote: > why ...
5 years, 4 months ago (2015-08-03 07:03:55 UTC) #29
James Su
lgtm
5 years, 4 months ago (2015-08-03 07:10:21 UTC) #30
Shu Chen
Pinging... Sadrul, can you please take a look? Thanks The non-ime related changes under ui/... ...
5 years, 4 months ago (2015-08-04 01:25:08 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/260001
5 years, 4 months ago (2015-08-04 01:26:21 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/80768) ios_dbg_simulator_ninja on ...
5 years, 4 months ago (2015-08-04 01:28:38 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/280001
5 years, 4 months ago (2015-08-04 02:10:44 UTC) #37
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/117035)
5 years, 4 months ago (2015-08-04 02:33:23 UTC) #39
sadrul
The build failures and ui_base test failures on linux look related. Mind taking a look ...
5 years, 4 months ago (2015-08-04 03:00:18 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/300001
5 years, 4 months ago (2015-08-04 03:31:32 UTC) #42
Shu Chen
On 2015/08/04 03:00:18, sadrul wrote: > The build failures and ui_base test failures on linux ...
5 years, 4 months ago (2015-08-04 03:31:38 UTC) #43
Shu Chen
On 2015/08/04 03:31:38, Shu Chen wrote: > On 2015/08/04 03:00:18, sadrul wrote: > > The ...
5 years, 4 months ago (2015-08-04 03:47:59 UTC) #44
sadrul
https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc#newcode133 ui/base/ime/input_method_auralinux.cc:133: goto Exit; I don't think this needs to use ...
5 years, 4 months ago (2015-08-04 03:52:46 UTC) #45
Shu Chen
https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc#newcode133 ui/base/ime/input_method_auralinux.cc:133: goto Exit; On 2015/08/04 03:52:46, sadrul wrote: > I ...
5 years, 4 months ago (2015-08-04 03:59:21 UTC) #46
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/94428)
5 years, 4 months ago (2015-08-04 04:46:55 UTC) #48
James Su
https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc#newcode133 ui/base/ime/input_method_auralinux.cc:133: goto Exit; How about: if (details.dispatcher_destroyed) { // Do ...
5 years, 4 months ago (2015-08-04 05:02:48 UTC) #49
Shu Chen
https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/300001/ui/base/ime/input_method_auralinux.cc#newcode133 ui/base/ime/input_method_auralinux.cc:133: goto Exit; On 2015/08/04 05:02:48, James Su wrote: > ...
5 years, 4 months ago (2015-08-04 05:09:31 UTC) #50
sadrul
lgtm https://codereview.chromium.org/1257603006/diff/320001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/320001/ui/base/ime/input_method_auralinux.cc#newcode130 ui/base/ime/input_method_auralinux.cc:130: // Do nothing when dipatcher is destroyed. This ...
5 years, 4 months ago (2015-08-04 07:15:59 UTC) #51
Shu Chen
https://codereview.chromium.org/1257603006/diff/320001/ui/base/ime/input_method_auralinux.cc File ui/base/ime/input_method_auralinux.cc (right): https://codereview.chromium.org/1257603006/diff/320001/ui/base/ime/input_method_auralinux.cc#newcode130 ui/base/ime/input_method_auralinux.cc:130: // Do nothing when dipatcher is destroyed. On 2015/08/04 ...
5 years, 4 months ago (2015-08-04 07:36:11 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/340001
5 years, 4 months ago (2015-08-04 07:36:51 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/84629)
5 years, 4 months ago (2015-08-04 07:46:58 UTC) #57
Shu Chen
TBR'ing sky@ for mechanical changes of mandoline.
5 years, 4 months ago (2015-08-04 08:28:47 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1257603006/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1257603006/340001
5 years, 4 months ago (2015-08-04 08:29:07 UTC) #60
commit-bot: I haz the power
Committed patchset #18 (id:340001)
5 years, 4 months ago (2015-08-04 09:48:43 UTC) #61
commit-bot: I haz the power
5 years, 4 months ago (2015-08-04 09:49:24 UTC) #62
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/59c2a2cf79038dd2bcae5c45300a6a50de4ac9fd
Cr-Commit-Position: refs/heads/master@{#341704}

Powered by Google App Engine
This is Rietveld 408576698