diff options
author | shuchen <shuchen@chromium.org> | 2015-10-08 11:43:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-08 18:44:10 +0000 |
commit | cb0b75575e1ebab71e76aaeb8784c18f95c0c145 (patch) | |
tree | 17f3b88d47d90936df443e50c95bfa14a6c6b5e9 /ui/base/ui_base_switches.h | |
parent | 2a9e4d1100e6b15d591f193c152bb705774c9c38 (diff) | |
download | chromium_src-cb0b75575e1ebab71e76aaeb8784c18f95c0c145.zip chromium_src-cb0b75575e1ebab71e76aaeb8784c18f95c0c145.tar.gz chromium_src-cb0b75575e1ebab71e76aaeb8784c18f95c0c145.tar.bz2 |
Combine the WM_CHAR with WM_KEY* for key event flow.
The combination is required for Chrome IMEs, which can do IME related actions based on the single event.
Chrome IME extension may wants to consume certain key events based on the character information of WM_CHAR messages. Holding WM_KEY* messages until WM_CHAR is processed by the IME extension is not feasible because there is no way to know wether there will or not be a WM_CHAR following the WM_KEY*.
What's more, with the combination, ui::KeyEvent::is_char() can be removed, can reduce the complexity for key event handling.
This cl will change a little for the order of message handling. e.g.
Original:
- WM_KEYDOWN received in message pump.
- TranslateMessage is called from message pump.
- WM_KEYDOWN is dispatched to HWNDMessageHandler.
- WM_KEYDOWN is dispatched to Chrome by IMF.
With this cl:
- WM_KEYDOWN received in message pump.
- WM_KEYDOWN is dispatched to HWNDMessageHandler.
- TranslateMessage is called from IMF.
- WM_KEYDOWN is dispatched to Chrome by IMF.
Also, this cl makes WM_CHAR messages (generated by WM_KEY*) never hit message pump & HWNDMessageHandler.
Note: the behavior changes by this cl is behind the flag merge-key-char-events, and the flag default is "disabled".
TBR=isherman@chromium.org
BUG=517773
TEST=No regressions for text inputing (including dead keys & CJK IMEs) in Windows 7 and Windows 8 metro.
Review URL: https://codereview.chromium.org/1267483003
Cr-Commit-Position: refs/heads/master@{#353106}
Diffstat (limited to 'ui/base/ui_base_switches.h')
-rw-r--r-- | ui/base/ui_base_switches.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h index 5b55fa7..0c02dbc 100644 --- a/ui/base/ui_base_switches.h +++ b/ui/base/ui_base_switches.h @@ -18,6 +18,11 @@ UI_BASE_EXPORT extern const char kDisableRemoteCoreAnimation[]; UI_BASE_EXPORT extern const char kShowMacOverlayBorders[]; #endif +#if defined(OS_WIN) +UI_BASE_EXPORT extern const char kDisableMergeKeyCharEvents[]; +UI_BASE_EXPORT extern const char kEnableMergeKeyCharEvents[]; +#endif + UI_BASE_EXPORT extern const char kDisableDwmComposition[]; UI_BASE_EXPORT extern const char kDisableIconNtp[]; UI_BASE_EXPORT extern const char kDisableTouchAdjustment[]; |