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..3f3c13421b5981b80bc6273eefb3764f49d743d7 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,16 @@ 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 |
- // this dispatcher. |
+ // Sets the ClientStub that will be called for each incoming control |
+ // message. |client_stub| must outlive this object. |
void set_client_stub(ClientStub* client_stub) { client_stub_ = client_stub; } |
+ // Sets the ClipboardStub that will be called for each incoming clipboard |
+ // message. |clipboard_stub| must outlive this object. |
+ void set_clipboard_stub(ClipboardStub* clipboard_stub) { |
+ clipboard_stub_ = clipboard_stub; |
+ } |
+ |
protected: |
// ChannelDispatcherBase overrides. |
virtual void OnInitialized() OVERRIDE; |
@@ -46,6 +51,7 @@ class ClientControlDispatcher : public ChannelDispatcherBase, |
const base::Closure& done_task); |
ClientStub* client_stub_; |
+ ClipboardStub* clipboard_stub_; |
ProtobufMessageReader<ControlMessage> reader_; |
scoped_refptr<BufferedSocketWriter> writer_; |