| 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 #ifndef REMOTING_HOST_EVENT_EXECUTOR_LINUX_H_ | 5 #ifndef REMOTING_HOST_EVENT_EXECUTOR_LINUX_H_ |
| 6 #define REMOTING_HOST_EVENT_EXECUTOR_LINUX_H_ | 6 #define REMOTING_HOST_EVENT_EXECUTOR_LINUX_H_ |
| 7 | 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/ref_counted.h" |
| 11 #include "base/basictypes.h" |
| 8 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 9 #include "remoting/host/event_executor.h" | 13 #include "remoting/protocol/input_stub.h" |
| 14 |
| 15 namespace base { |
| 16 class MessageLoopProxy; |
| 17 } // namespace base |
| 10 | 18 |
| 11 namespace remoting { | 19 namespace remoting { |
| 12 | 20 |
| 21 class Capturer; |
| 22 class ChromotingClientMessage; |
| 13 class EventExecutorLinuxPimpl; | 23 class EventExecutorLinuxPimpl; |
| 14 | 24 |
| 15 // A class to generate events on Linux. | 25 // A class to generate events on Linux. |
| 16 class EventExecutorLinux : public EventExecutor { | 26 class EventExecutorLinux : public protocol::InputStub { |
| 17 public: | 27 public: |
| 18 EventExecutorLinux(Capturer* capturer); | 28 EventExecutorLinux(scoped_refptr<base::MessageLoopProxy> message_loop, |
| 29 Capturer* capturer); |
| 19 virtual ~EventExecutorLinux(); | 30 virtual ~EventExecutorLinux(); |
| 20 | 31 |
| 21 virtual void HandleInputEvent(ChromotingClientMessage* message); | 32 virtual void InjectKeyEvent(const KeyEvent* event, Task* done); |
| 33 virtual void InjectMouseEvent(const MouseEvent* event, Task* done); |
| 22 | 34 |
| 23 private: | 35 private: |
| 36 scoped_refptr<base::MessageLoopProxy> message_loop_; |
| 37 Capturer* capturer_; |
| 24 scoped_ptr<EventExecutorLinuxPimpl> pimpl_; | 38 scoped_ptr<EventExecutorLinuxPimpl> pimpl_; |
| 25 | 39 |
| 26 DISALLOW_COPY_AND_ASSIGN(EventExecutorLinux); | 40 DISALLOW_COPY_AND_ASSIGN(EventExecutorLinux); |
| 27 }; | 41 }; |
| 28 | 42 |
| 29 } // namespace remoting | 43 } // namespace remoting |
| 30 | 44 |
| 31 #endif // REMOTING_HOST_EVENT_EXECUTOR_LINUX_H_ | 45 #endif // REMOTING_HOST_EVENT_EXECUTOR_LINUX_H_ |
| OLD | NEW |