Chromium Code Reviews| Index: remoting/protocol/client_control_dispatcher.h |
| diff --git a/remoting/protocol/client_control_dispatcher.h b/remoting/protocol/client_control_dispatcher.h |
| index d7acac1f27a1bfac20c26d77207f5fd805079530..7b5f56db216cb29662c714685c526fd37e703033 100644 |
| --- a/remoting/protocol/client_control_dispatcher.h |
| +++ b/remoting/protocol/client_control_dispatcher.h |
| @@ -20,8 +20,8 @@ class BufferedSocketWriter; |
| class Session; |
| // ClientControlDispatcher dispatches incoming messages on the control |
| -// channel to ClientStub, and also implements ClipboardStub and HostStub for |
| -// outgoing messages. |
| +// channel to ClientStub or ClipboardStub, and also implements ClipboardStub |
| +// and HostStub for outgoing messages. |
| class ClientControlDispatcher : public ChannelDispatcherBase, |
| public ClipboardStub, |
| public HostStub { |
| @@ -32,11 +32,18 @@ class ClientControlDispatcher : public ChannelDispatcherBase, |
| // ClipboardStub implementation. |
| virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; |
| - // Sets ClientStub that will be called for each incoming control |
| - // message. Doesn't take ownership of |client_stub|. It must outlive |
| + // Sets the ClientStub that will be called for each incoming control |
| + // message. Doesn't take ownership of |client_stub|, which must outlive |
| // this dispatcher. |
| void set_client_stub(ClientStub* client_stub) { client_stub_ = client_stub; } |
| + // Sets the ClipboardStub that will be called for each incoming clipboard |
| + // message. Doesn't take ownership of |clipboard_stub|, which must outlive |
|
Wez
2012/03/30 22:20:15
nit: Could just say "|clipboard_stub| must outlive
simonmorris
2012/03/30 22:36:07
Done.
|
| + // this dispatcher. |
| + void set_clipboard_stub(ClipboardStub* clipboard_stub) { |
| + clipboard_stub_ = clipboard_stub; |
| + } |
| + |
| protected: |
| // ChannelDispatcherBase overrides. |
| virtual void OnInitialized() OVERRIDE; |
| @@ -46,6 +53,7 @@ class ClientControlDispatcher : public ChannelDispatcherBase, |
| const base::Closure& done_task); |
| ClientStub* client_stub_; |
| + ClipboardStub* clipboard_stub_; |
| ProtobufMessageReader<ControlMessage> reader_; |
| scoped_refptr<BufferedSocketWriter> writer_; |