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