[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] | a3464dca | 2012-05-24 01:27:09 | [diff] [blame] | 9 | #include "remoting/protocol/buffered_socket_writer.h" |
[email protected] | 2e8b52c | 2011-11-22 00:07:13 | [diff] [blame] | 10 | #include "remoting/protocol/channel_dispatcher_base.h" |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 11 | #include "remoting/protocol/input_stub.h" |
12 | |||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 13 | namespace remoting { |
14 | namespace protocol { | ||||
15 | |||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 16 | // ClientEventDispatcher manages the event channel on the client |
17 | // side. It implements InputStub for outgoing input messages. | ||||
[email protected] | 2e8b52c | 2011-11-22 00:07:13 | [diff] [blame] | 18 | class ClientEventDispatcher : public ChannelDispatcherBase, public InputStub { |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 19 | public: |
20 | ClientEventDispatcher(); | ||||
21 | virtual ~ClientEventDispatcher(); | ||||
22 | |||||
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 23 | // InputStub implementation. |
mostynb | 11d989c | 2014-10-08 16:58:09 | [diff] [blame] | 24 | virtual void InjectKeyEvent(const KeyEvent& event) override; |
25 | virtual void InjectTextEvent(const TextEvent& 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. | ||||
mostynb | 11d989c | 2014-10-08 16:58:09 | [diff] [blame] | 30 | virtual void OnInitialized() override; |
[email protected] | 2e8b52c | 2011-11-22 00:07:13 | [diff] [blame] | 31 | |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 32 | private: |
[email protected] | a3464dca | 2012-05-24 01:27:09 | [diff] [blame] | 33 | BufferedSocketWriter writer_; |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 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_ |