| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ | 5 #ifndef REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ |
| 6 #define REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ | 6 #define REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "remoting/protocol/buffered_socket_writer.h" | 9 #include "remoting/protocol/buffered_socket_writer.h" |
| 10 #include "remoting/protocol/channel_dispatcher_base.h" | 10 #include "remoting/protocol/channel_dispatcher_base.h" |
| 11 #include "remoting/protocol/clipboard_stub.h" | 11 #include "remoting/protocol/clipboard_stub.h" |
| 12 #include "remoting/protocol/cursor_shape_stub.h" |
| 12 #include "remoting/protocol/host_stub.h" | 13 #include "remoting/protocol/host_stub.h" |
| 13 #include "remoting/protocol/message_reader.h" | 14 #include "remoting/protocol/message_reader.h" |
| 14 | 15 |
| 15 namespace remoting { | 16 namespace remoting { |
| 16 namespace protocol { | 17 namespace protocol { |
| 17 | 18 |
| 18 class ClientStub; | 19 class ClientStub; |
| 19 class ControlMessage; | 20 class ControlMessage; |
| 20 class Session; | 21 class Session; |
| 21 | 22 |
| 22 // ClientControlDispatcher dispatches incoming messages on the control | 23 // ClientControlDispatcher dispatches incoming messages on the control |
| 23 // channel to ClientStub or ClipboardStub, and also implements ClipboardStub | 24 // channel to ClientStub, ClipboardStub or CursorShapeStub. |
| 24 // and HostStub for outgoing messages. | 25 // It also implements ClipboardStub and HostStub for outgoing messages. |
| 25 class ClientControlDispatcher : public ChannelDispatcherBase, | 26 class ClientControlDispatcher : public ChannelDispatcherBase, |
| 26 public ClipboardStub, | 27 public ClipboardStub, |
| 27 public HostStub { | 28 public HostStub { |
| 28 public: | 29 public: |
| 29 ClientControlDispatcher(); | 30 ClientControlDispatcher(); |
| 30 virtual ~ClientControlDispatcher(); | 31 virtual ~ClientControlDispatcher(); |
| 31 | 32 |
| 32 // ClipboardStub implementation. | 33 // ClipboardStub implementation. |
| 33 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; | 34 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; |
| 34 | 35 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 61 ProtobufMessageReader<ControlMessage> reader_; | 62 ProtobufMessageReader<ControlMessage> reader_; |
| 62 BufferedSocketWriter writer_; | 63 BufferedSocketWriter writer_; |
| 63 | 64 |
| 64 DISALLOW_COPY_AND_ASSIGN(ClientControlDispatcher); | 65 DISALLOW_COPY_AND_ASSIGN(ClientControlDispatcher); |
| 65 }; | 66 }; |
| 66 | 67 |
| 67 } // namespace protocol | 68 } // namespace protocol |
| 68 } // namespace remoting | 69 } // namespace remoting |
| 69 | 70 |
| 70 #endif // REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ | 71 #endif // REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ |
| OLD | NEW |