Index: remoting/protocol/client_input_dispatcher.h |
diff --git a/remoting/protocol/client_input_dispatcher.h b/remoting/protocol/client_input_dispatcher.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cadaf49b38f37ae5abc1ce6daee196f7a0741918 |
--- /dev/null |
+++ b/remoting/protocol/client_input_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_CLINET_INPUT_DISPATCHER_H_ |
Wez
2011/11/17 01:51:56
typo: CLINET
Sergey Ulanov
2011/11/17 19:29:06
Done.
|
+#define REMOTING_PROTOCOL_CLINET_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; |
+ |
+// ClientInputDispatcher manages event channel on the client side. It |
+// implements InputStub for outgoing input messages. |
Wez
2011/11/17 01:51:56
This comment should probably more closely mirror w
Sergey Ulanov
2011/11/17 19:29:06
currently client doesn't receive any messages on t
|
+class ClientInputDispatcher : public InputStub { |
Wez
2011/11/17 01:51:56
This actually manages the whole event channel, not
Sergey Ulanov
2011/11/17 19:29:06
Renamed it to ClientEventDispatcher.
|
+ public: |
+ explicit ClientInputDispatcher(base::MessageLoopProxy* message_loop); |
Wez
2011/11/17 01:51:56
How is MessageLoopProxy used?
Sergey Ulanov
2011/11/17 19:29:06
removed it.
|
+ virtual ~ClientInputDispatcher(); |
+ |
+ void Init(Session* session); |
Wez
2011/11/17 01:51:56
How is session used? Who owns it?
Sergey Ulanov
2011/11/17 19:29:06
Done.
|
+ |
+ void Close(); |
Wez
2011/11/17 01:51:56
What is this used for?
Sergey Ulanov
2011/11/17 19:29:06
Removed
|
+ |
+ // InputStub implementation. |
+ virtual void InjectKeyEvent(const KeyEvent& event); |
+ virtual void InjectMouseEvent(const MouseEvent& event); |
+ |
+ private: |
+ scoped_refptr<BufferedSocketWriter> writer_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ClientInputDispatcher); |
+}; |
+ |
+} // namespace protocol |
+} // namespace remoting |
+ |
+#endif // REMOTING_PROTOCOL_CLINET_INPUT_DISPATCHER_H_ |