[email protected] | a4605c5 | 2012-03-03 01:12:10 | [diff] [blame^] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | a4605c5 | 2012-03-03 01:12:10 | [diff] [blame^] | 5 | #ifndef REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_ |
6 | #define REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_ | ||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 7 | |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 8 | #include "base/memory/ref_counted.h" |
[email protected] | 2e8b52c | 2011-11-22 00:07:13 | [diff] [blame] | 9 | #include "remoting/protocol/channel_dispatcher_base.h" |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 10 | #include "remoting/protocol/input_stub.h" |
11 | |||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 12 | namespace remoting { |
13 | namespace protocol { | ||||
14 | |||||
15 | class BufferedSocketWriter; | ||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 16 | |
17 | // ClientEventDispatcher manages the event channel on the client | ||||
18 | // side. It implements InputStub for outgoing input messages. | ||||
[email protected] | 2e8b52c | 2011-11-22 00:07:13 | [diff] [blame] | 19 | class ClientEventDispatcher : public ChannelDispatcherBase, public InputStub { |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 20 | public: |
21 | ClientEventDispatcher(); | ||||
22 | virtual ~ClientEventDispatcher(); | ||||
23 | |||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 24 | // InputStub implementation. |
[email protected] | 6a6fe806 | 2011-11-19 00:06:02 | [diff] [blame] | 25 | virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; |
26 | virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; | ||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 27 | |
[email protected] | 2e8b52c | 2011-11-22 00:07:13 | [diff] [blame] | 28 | protected: |
29 | // ChannelDispatcherBase overrides. | ||||
30 | virtual void OnInitialized() OVERRIDE; | ||||
31 | |||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 32 | private: |
33 | scoped_refptr<BufferedSocketWriter> writer_; | ||||
34 | |||||
35 | DISALLOW_COPY_AND_ASSIGN(ClientEventDispatcher); | ||||
36 | }; | ||||
37 | |||||
38 | } // namespace protocol | ||||
39 | } // namespace remoting | ||||
40 | |||||
[email protected] | a4605c5 | 2012-03-03 01:12:10 | [diff] [blame^] | 41 | #endif // REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_ |