| 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/basictypes.h" |
| 11 #include "remoting/protocol/input_stub.h" |
| 11 | 12 |
| 12 namespace remoting { | 13 namespace remoting { |
| 13 | 14 |
| 15 class Capturer; |
| 16 class ChromotingClientMessage; |
| 17 |
| 14 // A class to generate events on Windows. | 18 // A class to generate events on Windows. |
| 15 class EventExecutorWin : public EventExecutor { | 19 class EventExecutorWin : public protocol::InputStub { |
| 16 public: | 20 public: |
| 17 EventExecutorWin(Capturer* capturer); | 21 EventExecutorWin(Capturer* capturer); |
| 18 virtual ~EventExecutorWin(); | 22 virtual ~EventExecutorWin(); |
| 19 | 23 |
| 20 virtual void HandleInputEvent(ChromotingClientMessage* message); | 24 virtual void InjectKeyEvent(const KeyEvent* event, Task* done); |
| 25 virtual void InjectMouseEvent(const MouseEvent* event, Task* done); |
| 21 | 26 |
| 22 private: | 27 private: |
| 23 void HandleMouseSetPosition(ChromotingClientMessage* msg); | 28 void HandleMouseSetPosition(int x, int y, int width, int height); |
| 24 void HandleMouseMove(ChromotingClientMessage* msg); | 29 void HandleMouseMove(int offset_x, int offset_y); |
| 25 void HandleMouseWheel(ChromotingClientMessage* msg); | 30 void HandleMouseWheel(int offset_x, int offset_y); |
| 26 void HandleMouseButtonDown(ChromotingClientMessage* msg); | 31 void HandleMouseButtonDown(MouseButton button); |
| 27 void HandleMouseButtonUp(ChromotingClientMessage* msg); | 32 void HandleMouseButtonUp(MouseButton button); |
| 28 void HandleKey(ChromotingClientMessage* msg); | 33 void HandleKey(int key, bool down); |
| 34 |
| 35 Capturer* capturer_; |
| 29 | 36 |
| 30 DISALLOW_COPY_AND_ASSIGN(EventExecutorWin); | 37 DISALLOW_COPY_AND_ASSIGN(EventExecutorWin); |
| 31 }; | 38 }; |
| 32 | 39 |
| 33 } // namespace remoting | 40 } // namespace remoting |
| 34 | 41 |
| 35 #endif // REMOTING_HOST_EVENT_EXECUTOR_WIN_H_ | 42 #endif // REMOTING_HOST_EVENT_EXECUTOR_WIN_H_ |
| OLD | NEW |