OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PROTOCOL_INPUT_FILTER_H_ | 5 #ifndef REMOTING_PROTOCOL_INPUT_FILTER_H_ |
6 #define REMOTING_PROTOCOL_INPUT_FILTER_H_ | 6 #define REMOTING_PROTOCOL_INPUT_FILTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "remoting/protocol/input_stub.h" | 10 #include "remoting/protocol/input_stub.h" |
11 | 11 |
12 namespace remoting { | 12 namespace remoting { |
13 namespace protocol { | 13 namespace protocol { |
14 | 14 |
15 // Forwards input events to |input_stub|, iif |input_stub| is not NULL. | 15 // Forwards input events to |input_stub|, iif |input_stub| is not NULL. |
16 class InputFilter : public InputStub { | 16 class InputFilter : public InputStub { |
17 public: | 17 public: |
18 InputFilter(); | 18 InputFilter(); |
19 virtual ~InputFilter(); | 19 virtual ~InputFilter(); |
20 | 20 |
21 // Return the InputStub that events will be forwarded to. | 21 // Return the InputStub that events will be forwarded to. |
22 InputStub* input_stub() { return input_stub_; } | 22 InputStub* input_stub() { return input_stub_; } |
23 | 23 |
24 // Set the InputStub that events will be forwarded to. | 24 // Set the InputStub that events will be forwarded to. |
25 void set_input_stub(InputStub* input_stub) { | 25 void set_input_stub(InputStub* input_stub) { |
26 input_stub_ = input_stub; | 26 input_stub_ = input_stub; |
27 } | 27 } |
28 | 28 |
29 // InputStub interface. | 29 // InputStub interface. |
| 30 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; |
30 virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; | 31 virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; |
31 virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; | 32 virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; |
32 | 33 |
33 private: | 34 private: |
34 InputStub* input_stub_; | 35 InputStub* input_stub_; |
35 | 36 |
36 DISALLOW_COPY_AND_ASSIGN(InputFilter); | 37 DISALLOW_COPY_AND_ASSIGN(InputFilter); |
37 }; | 38 }; |
38 | 39 |
39 } // namespace protocol | 40 } // namespace protocol |
40 } // namespace remoting | 41 } // namespace remoting |
41 | 42 |
42 #endif // REMOTING_PROTOCOL_INPUT_FILTER_H_ | 43 #endif // REMOTING_PROTOCOL_INPUT_FILTER_H_ |
OLD | NEW |