blob: 35c8dddb78233663557d47434d522752d5353f4b [file] [log] [blame]
[email protected]a4605c52012-03-03 01:12:101// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]409ac612011-11-18 04:05:572// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]a4605c52012-03-03 01:12:105#ifndef REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_
6#define REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_
[email protected]409ac612011-11-18 04:05:577
[email protected]409ac612011-11-18 04:05:578#include "base/memory/ref_counted.h"
[email protected]a3464dca2012-05-24 01:27:099#include "remoting/protocol/buffered_socket_writer.h"
[email protected]2e8b52c2011-11-22 00:07:1310#include "remoting/protocol/channel_dispatcher_base.h"
[email protected]409ac612011-11-18 04:05:5711#include "remoting/protocol/input_stub.h"
12
[email protected]409ac612011-11-18 04:05:5713namespace remoting {
14namespace protocol {
15
[email protected]409ac612011-11-18 04:05:5716// ClientEventDispatcher manages the event channel on the client
17// side. It implements InputStub for outgoing input messages.
[email protected]2e8b52c2011-11-22 00:07:1318class ClientEventDispatcher : public ChannelDispatcherBase, public InputStub {
[email protected]409ac612011-11-18 04:05:5719 public:
20 ClientEventDispatcher();
21 virtual ~ClientEventDispatcher();
22
[email protected]409ac612011-11-18 04:05:5723 // InputStub implementation.
mostynb11d989c2014-10-08 16:58:0924 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]409ac612011-11-18 04:05:5727
[email protected]2e8b52c2011-11-22 00:07:1328 protected:
29 // ChannelDispatcherBase overrides.
mostynb11d989c2014-10-08 16:58:0930 virtual void OnInitialized() override;
[email protected]2e8b52c2011-11-22 00:07:1331
[email protected]409ac612011-11-18 04:05:5732 private:
[email protected]a3464dca2012-05-24 01:27:0933 BufferedSocketWriter writer_;
[email protected]409ac612011-11-18 04:05:5734
35 DISALLOW_COPY_AND_ASSIGN(ClientEventDispatcher);
36};
37
38} // namespace protocol
39} // namespace remoting
40
[email protected]a4605c52012-03-03 01:12:1041#endif // REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_