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 "remoting/host/event_executor.h" | 5 #include "remoting/host/event_executor.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
10 #include <X11/XF86keysym.h> | 10 #include <X11/XF86keysym.h> |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 if (event.has_wheel_offset_x() && event.wheel_offset_x() != 0) { | 391 if (event.has_wheel_offset_x() && event.wheel_offset_x() != 0) { |
392 int dx = event.wheel_offset_x(); | 392 int dx = event.wheel_offset_x(); |
393 InjectScrollWheelClicks(HorizontalScrollWheelToX11ButtonNumber(dx), | 393 InjectScrollWheelClicks(HorizontalScrollWheelToX11ButtonNumber(dx), |
394 abs(dx)); | 394 abs(dx)); |
395 } | 395 } |
396 } | 396 } |
397 | 397 |
398 } // namespace | 398 } // namespace |
399 | 399 |
400 EventExecutor* EventExecutor::Create(MessageLoop* message_loop, | 400 EventExecutor* EventExecutor::Create(MessageLoop* message_loop, |
| 401 base::MessageLoopProxy* io_message_loop, |
401 Capturer* capturer) { | 402 Capturer* capturer) { |
402 EventExecutorLinux* executor = new EventExecutorLinux(message_loop, capturer); | 403 EventExecutorLinux* executor = new EventExecutorLinux(message_loop, capturer); |
403 if (!executor->Init()) { | 404 if (!executor->Init()) { |
404 delete executor; | 405 delete executor; |
405 executor = NULL; | 406 executor = NULL; |
406 } | 407 } |
407 return executor; | 408 return executor; |
408 } | 409 } |
409 | 410 |
410 } // namespace remoting | 411 } // namespace remoting |
OLD | NEW |