[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 | |
avi | 5a080f01 | 2015-12-22 23:15:43 | [diff] [blame] | 8 | #include "base/macros.h" |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 9 | #include "base/memory/ref_counted.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(); | ||||
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 21 | ~ClientEventDispatcher() override; |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 22 | |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 23 | // InputStub implementation. |
dcheng | 562aba5 | 2014-10-21 12:30:14 | [diff] [blame] | 24 | void InjectKeyEvent(const KeyEvent& event) override; |
25 | void InjectTextEvent(const TextEvent& event) override; | ||||
26 | void InjectMouseEvent(const MouseEvent& event) override; | ||||
rkuroiwa | 0e68803f | 2015-02-26 19:41:42 | [diff] [blame] | 27 | void InjectTouchEvent(const TouchEvent& event) override; |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 28 | |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 29 | private: |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 30 | void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override; |
sergeyu | d8af2ca | 2016-01-30 03:04:36 | [diff] [blame] | 31 | |
[email protected] | 409ac61 | 2011-11-18 04:05:57 | [diff] [blame] | 32 | DISALLOW_COPY_AND_ASSIGN(ClientEventDispatcher); |
33 | }; | ||||
34 | |||||
35 | } // namespace protocol | ||||
36 | } // namespace remoting | ||||
37 | |||||
[email protected] | a4605c5 | 2012-03-03 01:12:10 | [diff] [blame] | 38 | #endif // REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_ |