Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/remote_window_tree_host_win.h" | 5 #include "ui/aura/remote_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool RemoteWindowTreeHostWin::OnMessageReceived(const IPC::Message& message) { | 143 bool RemoteWindowTreeHostWin::OnMessageReceived(const IPC::Message& message) { |
| 144 bool handled = true; | 144 bool handled = true; |
| 145 IPC_BEGIN_MESSAGE_MAP(RemoteWindowTreeHostWin, message) | 145 IPC_BEGIN_MESSAGE_MAP(RemoteWindowTreeHostWin, message) |
| 146 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved) | 146 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved) |
| 147 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton) | 147 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton) |
| 148 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown) | 148 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown) |
| 149 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyUp, OnKeyUp) | 149 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyUp, OnKeyUp) |
| 150 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_Character, OnChar) | 150 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_Character, OnChar) |
| 151 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_CharacterForNextKeyEvent, | |
| 152 OnCharForNextKeyEvent) | |
| 151 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_WindowActivated, | 153 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_WindowActivated, |
| 152 OnWindowActivated) | 154 OnWindowActivated) |
| 153 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_EdgeGesture, OnEdgeGesture) | 155 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_EdgeGesture, OnEdgeGesture) |
| 154 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchDown, | 156 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchDown, |
| 155 OnTouchDown) | 157 OnTouchDown) |
| 156 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchUp, | 158 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchUp, |
| 157 OnTouchUp) | 159 OnTouchUp) |
| 158 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchMoved, | 160 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_TouchMoved, |
| 159 OnTouchMoved) | 161 OnTouchMoved) |
| 160 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetCursorPosAck, | 162 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetCursorPosAck, |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 362 } | 364 } |
| 363 | 365 |
| 364 void RemoteWindowTreeHostWin::OnChar(uint32 key_code, | 366 void RemoteWindowTreeHostWin::OnChar(uint32 key_code, |
| 365 uint32 repeat_count, | 367 uint32 repeat_count, |
| 366 uint32 scan_code, | 368 uint32 scan_code, |
| 367 uint32 flags) { | 369 uint32 flags) { |
| 368 DispatchKeyboardMessage(ui::ET_KEY_PRESSED, key_code, repeat_count, | 370 DispatchKeyboardMessage(ui::ET_KEY_PRESSED, key_code, repeat_count, |
| 369 scan_code, flags, true); | 371 scan_code, flags, true); |
| 370 } | 372 } |
| 371 | 373 |
| 374 void RemoteWindowTreeHostWin::OnCharForNextKeyEvent(uint32 key_code, | |
| 375 uint32 repeat_count, | |
| 376 uint32 scan_code, | |
| 377 uint32 flags) { | |
| 378 ui::RemoteInputMethodPrivateWin* remote_input_method_private = | |
|
jln (very slow on Chromium)
2015/08/17 21:35:07
It's unfortunate that none of the IPC parameters a
Shu Chen
2015/08/18 08:49:41
Done. I've removed the unused parameters.
| |
| 379 GetRemoteInputMethodPrivate(); | |
| 380 if (remote_input_method_private) { | |
| 381 remote_input_method_private->OnCharForNextKeyEvent( | |
| 382 static_cast<base::char16>(key_code)); | |
| 383 } | |
| 384 } | |
| 385 | |
| 372 void RemoteWindowTreeHostWin::OnWindowActivated(bool repaint) { | 386 void RemoteWindowTreeHostWin::OnWindowActivated(bool repaint) { |
| 373 OnHostActivated(); | 387 OnHostActivated(); |
| 374 if (repaint && compositor()) | 388 if (repaint && compositor()) |
| 375 compositor()->ScheduleFullRedraw(); | 389 compositor()->ScheduleFullRedraw(); |
| 376 } | 390 } |
| 377 | 391 |
| 378 void RemoteWindowTreeHostWin::OnEdgeGesture() { | 392 void RemoteWindowTreeHostWin::OnEdgeGesture() { |
| 379 ui::GestureEvent event( | 393 ui::GestureEvent event( |
| 380 0, | 394 0, |
| 381 0, | 395 0, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 505 } | 519 } |
| 506 | 520 |
| 507 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { | 521 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { |
| 508 if (flags == event_flags_) | 522 if (flags == event_flags_) |
| 509 return; | 523 return; |
| 510 event_flags_ = flags; | 524 event_flags_ = flags; |
| 511 SetVirtualKeyStates(event_flags_); | 525 SetVirtualKeyStates(event_flags_); |
| 512 } | 526 } |
| 513 | 527 |
| 514 } // namespace aura | 528 } // namespace aura |
| OLD | NEW |