| 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_linux.h" | 5 #include "remoting/host/event_executor_linux.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 #include <X11/keysym.h> | 8 #include <X11/keysym.h> |
| 9 #include <X11/extensions/XTest.h> | 9 #include <X11/extensions/XTest.h> |
| 10 | 10 |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 LOG(ERROR) << "Unable to close the Xlib Display."; | 347 LOG(ERROR) << "Unable to close the Xlib Display."; |
| 348 } | 348 } |
| 349 display_ = NULL; | 349 display_ = NULL; |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 | 352 |
| 353 EventExecutorLinux::EventExecutorLinux( | 353 EventExecutorLinux::EventExecutorLinux( |
| 354 MessageLoopForUI* message_loop, Capturer* capturer) | 354 MessageLoopForUI* message_loop, Capturer* capturer) |
| 355 : message_loop_(message_loop), | 355 : message_loop_(message_loop), |
| 356 capturer_(capturer), | 356 capturer_(capturer), |
| 357 pimpl_(new EventExecutorLinuxPimpl(this, message_loop->get_display())) { | 357 pimpl_(new EventExecutorLinuxPimpl(this, message_loop->GetDisplay())) { |
| 358 CHECK(pimpl_->Init()); | 358 CHECK(pimpl_->Init()); |
| 359 } | 359 } |
| 360 | 360 |
| 361 EventExecutorLinux::~EventExecutorLinux() { | 361 EventExecutorLinux::~EventExecutorLinux() { |
| 362 } | 362 } |
| 363 | 363 |
| 364 void EventExecutorLinux::InjectKeyEvent(const KeyEvent* event, Task* done) { | 364 void EventExecutorLinux::InjectKeyEvent(const KeyEvent* event, Task* done) { |
| 365 if (MessageLoop::current() != message_loop_) { | 365 if (MessageLoop::current() != message_loop_) { |
| 366 message_loop_->PostTask( | 366 message_loop_->PostTask( |
| 367 FROM_HERE, | 367 FROM_HERE, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 387 done->Run(); | 387 done->Run(); |
| 388 delete done; | 388 delete done; |
| 389 } | 389 } |
| 390 | 390 |
| 391 protocol::InputStub* CreateEventExecutor(MessageLoopForUI* message_loop, | 391 protocol::InputStub* CreateEventExecutor(MessageLoopForUI* message_loop, |
| 392 Capturer* capturer) { | 392 Capturer* capturer) { |
| 393 return new EventExecutorLinux(message_loop, capturer); | 393 return new EventExecutorLinux(message_loop, capturer); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace remoting | 396 } // namespace remoting |
| OLD | NEW |