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_H_ | 5 #ifndef REMOTING_HOST_EVENT_EXECUTOR_H_ |
6 #define REMOTING_HOST_EVENT_EXECUTOR_H_ | 6 #define REMOTING_HOST_EVENT_EXECUTOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "remoting/base/protocol_decoder.h" | 10 #include "remoting/base/protocol_decoder.h" |
11 | 11 |
12 namespace remoting { | 12 namespace remoting { |
13 | 13 |
| 14 class Capturer; |
| 15 |
14 // An interface that defines the behavior of an event executor object. | 16 // An interface that defines the behavior of an event executor object. |
15 // An event executor is to perform actions on the host machine. For example | 17 // An event executor is to perform actions on the host machine. For example |
16 // moving the mouse cursor, generating keyboard events and manipulating | 18 // moving the mouse cursor, generating keyboard events and manipulating |
17 // clipboards. | 19 // clipboards. |
18 class EventExecutor { | 20 class EventExecutor { |
19 public: | 21 public: |
20 EventExecutor() {} | 22 EventExecutor(Capturer* capturer) |
| 23 : capturer_(capturer) { |
| 24 } |
21 virtual ~EventExecutor() {} | 25 virtual ~EventExecutor() {} |
22 | 26 |
23 // Handles input events from ClientMessageList and removes them from the | 27 // Handles input events from ClientMessageList and removes them from the |
24 // list. | 28 // list. |
25 virtual void HandleInputEvents(ClientMessageList* messages) = 0; | 29 virtual void HandleInputEvents(ClientMessageList* messages) = 0; |
26 // TODO(hclam): Define actions for clipboards. | 30 // TODO(hclam): Define actions for clipboards. |
27 | 31 |
| 32 protected: |
| 33 Capturer* capturer_; |
| 34 |
28 private: | 35 private: |
29 DISALLOW_COPY_AND_ASSIGN(EventExecutor); | 36 DISALLOW_COPY_AND_ASSIGN(EventExecutor); |
30 }; | 37 }; |
31 | 38 |
32 } // namespace remoting | 39 } // namespace remoting |
33 | 40 |
34 #endif // REMOTING_HOST_EVENT_EXECUTOR_H_ | 41 #endif // REMOTING_HOST_EVENT_EXECUTOR_H_ |
OLD | NEW |