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

Unified Diff: ui/aura/remote_window_tree_host_win.cc

Issue 1267483003: Combine the WM_CHAR with WM_KEY* for key event flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed robliao@'s comments. Created 5 years, 4 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/aura/remote_window_tree_host_win.cc
diff --git a/ui/aura/remote_window_tree_host_win.cc b/ui/aura/remote_window_tree_host_win.cc
index 842598c823ffdafd851c9ebed9b692d8be36e67d..ebaf3c21e3e42f9c861da7c6603671ff62105532 100644
--- a/ui/aura/remote_window_tree_host_win.cc
+++ b/ui/aura/remote_window_tree_host_win.cc
@@ -148,6 +148,8 @@ bool RemoteWindowTreeHostWin::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyUp, OnKeyUp)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_Character, OnChar)
+ IPC_MESSAGE_HANDLER(MetroViewerHostMsg_CharacterForNextKeyEvent,
+ OnCharForNextKeyEvent)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_WindowActivated,
OnWindowActivated)
IPC_MESSAGE_HANDLER(MetroViewerHostMsg_EdgeGesture, OnEdgeGesture)
@@ -369,6 +371,18 @@ void RemoteWindowTreeHostWin::OnChar(uint32 key_code,
scan_code, flags, true);
}
+void RemoteWindowTreeHostWin::OnCharForNextKeyEvent(uint32 key_code,
+ uint32 repeat_count,
+ uint32 scan_code,
+ uint32 flags) {
+ ui::RemoteInputMethodPrivateWin* remote_input_method_private =
+ GetRemoteInputMethodPrivate();
+ if (remote_input_method_private) {
+ remote_input_method_private->OnCharForNextKeyEvent(
+ static_cast<base::char16>(key_code));
+ }
+}
+
void RemoteWindowTreeHostWin::OnWindowActivated(bool repaint) {
OnHostActivated();
if (repaint && compositor())

Powered by Google App Engine
This is Rietveld 408576698