blob: 0b694014f7535ef3f256bbcd129ea85b7127392f [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]2e8b52c2011-11-22 00:07:139#include "remoting/protocol/channel_dispatcher_base.h"
[email protected]409ac612011-11-18 04:05:5710#include "remoting/protocol/input_stub.h"
11
[email protected]409ac612011-11-18 04:05:5712namespace remoting {
13namespace protocol {
14
15class BufferedSocketWriter;
[email protected]409ac612011-11-18 04:05:5716
17// ClientEventDispatcher manages the event channel on the client
18// side. It implements InputStub for outgoing input messages.
[email protected]2e8b52c2011-11-22 00:07:1319class ClientEventDispatcher : public ChannelDispatcherBase, public InputStub {
[email protected]409ac612011-11-18 04:05:5720 public:
21 ClientEventDispatcher();
22 virtual ~ClientEventDispatcher();
23
[email protected]409ac612011-11-18 04:05:5724 // InputStub implementation.
[email protected]6a6fe8062011-11-19 00:06:0225 virtual void InjectKeyEvent(const KeyEvent& 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.
30 virtual void OnInitialized() OVERRIDE;
31
[email protected]409ac612011-11-18 04:05:5732 private:
33 scoped_refptr<BufferedSocketWriter> writer_;
34
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_