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_HOST_CONTROL_DISPATCHER_H_ | 5 #ifndef REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ |
6 #define REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ | 6 #define REMOTING_PROTOCOL_HOST_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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // HostControlDispatcher dispatches incoming messages on the control | 27 // HostControlDispatcher dispatches incoming messages on the control |
28 // channel to HostStub or ClipboardStub, and also implements ClientStub and | 28 // channel to HostStub or ClipboardStub, and also implements ClientStub and |
29 // CursorShapeStub for outgoing messages. | 29 // CursorShapeStub for outgoing messages. |
30 class HostControlDispatcher : public ChannelDispatcherBase, | 30 class HostControlDispatcher : public ChannelDispatcherBase, |
31 public ClientStub { | 31 public ClientStub { |
32 public: | 32 public: |
33 HostControlDispatcher(); | 33 HostControlDispatcher(); |
34 virtual ~HostControlDispatcher(); | 34 virtual ~HostControlDispatcher(); |
35 | 35 |
| 36 // ClientStub implementation. |
| 37 virtual void SetCapabilities(const Capabilities& capabilities) OVERRIDE; |
| 38 |
36 // ClipboardStub implementation for sending clipboard data to client. | 39 // ClipboardStub implementation for sending clipboard data to client. |
37 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; | 40 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; |
38 | 41 |
39 // CursorShapeStub implementation for sending cursor shape to client. | 42 // CursorShapeStub implementation for sending cursor shape to client. |
40 virtual void SetCursorShape(const CursorShapeInfo& cursor_shape) OVERRIDE; | 43 virtual void SetCursorShape(const CursorShapeInfo& cursor_shape) OVERRIDE; |
41 | 44 |
42 // Sets the ClipboardStub that will be called for each incoming clipboard | 45 // Sets the ClipboardStub that will be called for each incoming clipboard |
43 // message. |clipboard_stub| must outlive this object. | 46 // message. |clipboard_stub| must outlive this object. |
44 void set_clipboard_stub(ClipboardStub* clipboard_stub) { | 47 void set_clipboard_stub(ClipboardStub* clipboard_stub) { |
45 clipboard_stub_ = clipboard_stub; | 48 clipboard_stub_ = clipboard_stub; |
(...skipping 17 matching lines...) Expand all Loading... |
63 ProtobufMessageReader<ControlMessage> reader_; | 66 ProtobufMessageReader<ControlMessage> reader_; |
64 BufferedSocketWriter writer_; | 67 BufferedSocketWriter writer_; |
65 | 68 |
66 DISALLOW_COPY_AND_ASSIGN(HostControlDispatcher); | 69 DISALLOW_COPY_AND_ASSIGN(HostControlDispatcher); |
67 }; | 70 }; |
68 | 71 |
69 } // namespace protocol | 72 } // namespace protocol |
70 } // namespace remoting | 73 } // namespace remoting |
71 | 74 |
72 #endif // REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ | 75 #endif // REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ |
OLD | NEW |