blob: 577e12da3e45fe6601a192e243d705b08fee9b91 [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
avi5a080f012015-12-22 23:15:438#include "base/macros.h"
[email protected]409ac612011-11-18 04:05:579#include "base/memory/ref_counted.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();
dcheng562aba52014-10-21 12:30:1421 ~ClientEventDispatcher() override;
[email protected]409ac612011-11-18 04:05:5722
[email protected]409ac612011-11-18 04:05:5723 // InputStub implementation.
dcheng562aba52014-10-21 12:30:1424 void InjectKeyEvent(const KeyEvent& event) override;
25 void InjectTextEvent(const TextEvent& event) override;
26 void InjectMouseEvent(const MouseEvent& event) override;
rkuroiwa0e68803f2015-02-26 19:41:4227 void InjectTouchEvent(const TouchEvent& event) override;
[email protected]409ac612011-11-18 04:05:5728
[email protected]409ac612011-11-18 04:05:5729 private:
dcheng0765c492016-04-06 22:41:5330 void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override;
sergeyud8af2ca2016-01-30 03:04:3631
[email protected]409ac612011-11-18 04:05:5732 DISALLOW_COPY_AND_ASSIGN(ClientEventDispatcher);
33};
34
35} // namespace protocol
36} // namespace remoting
37
[email protected]a4605c52012-03-03 01:12:1038#endif // REMOTING_PROTOCOL_CLIENT_EVENT_DISPATCHER_H_