OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "remoting/host/event_executor_win.h" | 5 #include "remoting/host/event_executor_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include "base/keyboard_codes.h" | 8 #include "base/keyboard_codes.h" |
9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
10 | 10 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 } | 348 } |
349 | 349 |
350 EventExecutorWin::EventExecutorWin() { | 350 EventExecutorWin::EventExecutorWin() { |
351 } | 351 } |
352 | 352 |
353 EventExecutorWin::~EventExecutorWin() { | 353 EventExecutorWin::~EventExecutorWin() { |
354 } | 354 } |
355 | 355 |
356 void EventExecutorWin::HandleInputEvents(ClientMessageList* messages) { | 356 void EventExecutorWin::HandleInputEvents(ClientMessageList* messages) { |
357 for (size_t i = 0; i < messages->size(); ++i) { | 357 for (size_t i = 0; i < messages->size(); ++i) { |
358 ClientMessage* msg = (*messages)[i]; | 358 ChromotingClientMessage* msg = (*messages)[i]; |
359 if (msg->has_mouse_set_position_event()) { | 359 if (msg->has_mouse_set_position_event()) { |
360 mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, | 360 mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, |
361 static_cast<int>((msg->mouse_set_position_event().x() * 65535)), | 361 static_cast<int>((msg->mouse_set_position_event().x() * 65535)), |
362 static_cast<int>((msg->mouse_set_position_event().y() * 65535)), | 362 static_cast<int>((msg->mouse_set_position_event().y() * 65535)), |
363 0, 0); | 363 0, 0); |
364 } else if (msg->has_mouse_move_event()) { | 364 } else if (msg->has_mouse_move_event()) { |
365 mouse_event(MOUSEEVENTF_MOVE, | 365 mouse_event(MOUSEEVENTF_MOVE, |
366 msg->mouse_move_event().offset_x(), | 366 msg->mouse_move_event().offset_x(), |
367 msg->mouse_move_event().offset_y(), 0, 0); | 367 msg->mouse_move_event().offset_y(), 0, 0); |
368 } else if (msg->has_mouse_wheel_event()) { | 368 } else if (msg->has_mouse_wheel_event()) { |
(...skipping 27 matching lines...) Expand all Loading... |
396 NULL); | 396 NULL); |
397 } | 397 } |
398 } | 398 } |
399 } | 399 } |
400 // We simply delete all messages. | 400 // We simply delete all messages. |
401 // TODO(hclam): Delete messages processed. | 401 // TODO(hclam): Delete messages processed. |
402 STLDeleteElements<ClientMessageList>(messages); | 402 STLDeleteElements<ClientMessageList>(messages); |
403 } | 403 } |
404 | 404 |
405 } // namespace remoting | 405 } // namespace remoting |
OLD | NEW |