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_WIN_H_ | 5 #ifndef REMOTING_HOST_EVENT_EXECUTOR_WIN_H_ |
6 #define REMOTING_HOST_EVENT_EXECUTOR_WIN_H_ | 6 #define REMOTING_HOST_EVENT_EXECUTOR_WIN_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/task.h" | 10 #include "base/task.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "remoting/protocol/input_stub.h" | 13 #include "remoting/host/event_executor.h" |
14 | |
15 class MessageLoop; | |
16 | 14 |
17 namespace remoting { | 15 namespace remoting { |
18 | 16 |
19 class Capturer; | |
20 class KeyEvent; | 17 class KeyEvent; |
21 class MouseDownEvent; | 18 class MouseDownEvent; |
22 class MouseSetPositionEvent; | 19 class MouseSetPositionEvent; |
23 class MouseUpEvent; | 20 class MouseUpEvent; |
24 class MouseWheelEvent; | 21 class MouseWheelEvent; |
25 | 22 |
26 // A class to generate events on Windows. | 23 // A class to generate events on Windows. |
27 class EventExecutorWin : public protocol::InputStub { | 24 class EventExecutorWin : public EventExecutor { |
28 public: | 25 public: |
29 EventExecutorWin(MessageLoop* message_loop, Capturer* capturer); | 26 EventExecutorWin(MessageLoop* message_loop, Capturer* capturer); |
30 virtual ~EventExecutorWin(); | 27 virtual ~EventExecutorWin(); |
31 | 28 |
32 virtual void InjectKeyEvent(const KeyEvent* event, Task* done); | 29 virtual void InjectKeyEvent(const KeyEvent* event, Task* done); |
33 virtual void InjectMouseEvent(const MouseEvent* event, Task* done); | 30 virtual void InjectMouseEvent(const MouseEvent* event, Task* done); |
34 | 31 |
35 private: | 32 private: |
36 void HandleMouseSetPosition(const MouseSetPositionEvent& event); | 33 void HandleMouseSetPosition(const MouseSetPositionEvent& event); |
37 void HandleMouseWheel(const MouseWheelEvent& event); | 34 void HandleMouseWheel(const MouseWheelEvent& event); |
38 void HandleMouseButtonDown(const MouseDownEvent& event); | 35 void HandleMouseButtonDown(const MouseDownEvent& event); |
39 void HandleMouseButtonUp(const MouseUpEvent& event); | 36 void HandleMouseButtonUp(const MouseUpEvent& event); |
40 void HandleKey(const KeyEvent& event); | 37 void HandleKey(const KeyEvent& event); |
41 | 38 |
42 MessageLoop* message_loop_; | 39 MessageLoop* message_loop_; |
43 Capturer* capturer_; | 40 Capturer* capturer_; |
44 | 41 |
45 DISALLOW_COPY_AND_ASSIGN(EventExecutorWin); | 42 DISALLOW_COPY_AND_ASSIGN(EventExecutorWin); |
46 }; | 43 }; |
47 | 44 |
48 } // namespace remoting | 45 } // namespace remoting |
49 | 46 |
50 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::EventExecutorWin); | 47 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::EventExecutorWin); |
51 | 48 |
52 #endif // REMOTING_HOST_EVENT_EXECUTOR_WIN_H_ | 49 #endif // REMOTING_HOST_EVENT_EXECUTOR_WIN_H_ |
OLD | NEW |