Chromium Code Reviews| Index: remoting/protocol/client_event_dispatcher.h |
| diff --git a/remoting/protocol/client_event_dispatcher.h b/remoting/protocol/client_event_dispatcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ce3759d5e9bfb3ff8d3b067ed235109a505d5993 |
| --- /dev/null |
| +++ b/remoting/protocol/client_event_dispatcher.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_PROTOCOL_CLIENT_INPUT_DISPATCHER_H_ |
| +#define REMOTING_PROTOCOL_CLIENT_INPUT_DISPATCHER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/ref_counted.h" |
| +#include "remoting/protocol/input_stub.h" |
| + |
| +namespace base { |
| +class MessageLoopProxy; |
| +} // namespace base |
| + |
| +namespace remoting { |
| +namespace protocol { |
| + |
| +class BufferedSocketWriter; |
| +class Session; |
| + |
| +// ClientEventDispatcher manages the event channel on the client |
| +// side. It implements InputStub for outgoing input messages. |
| +class ClientEventDispatcher : public InputStub { |
| + public: |
| + ClientEventDispatcher(); |
| + virtual ~ClientEventDispatcher(); |
| + |
| + // Initialize the event channel and the dispatcher for the |
| + // |session|. |
|
Wez
2011/11/17 22:30:22
nit: Clarify that |session| must outlive the dispa
Sergey Ulanov
2011/11/17 22:48:08
I moved this method to ChannelDispatcher in the ne
|
| + void Init(Session* session); |
| + |
| + // InputStub implementation. |
| + virtual void InjectKeyEvent(const KeyEvent& event); |
| + virtual void InjectMouseEvent(const MouseEvent& event); |
| + |
| + private: |
| + scoped_refptr<BufferedSocketWriter> writer_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ClientEventDispatcher); |
| +}; |
| + |
| +} // namespace protocol |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_PROTOCOL_CLIENT_INPUT_DISPATCHER_H_ |