Index: remoting/protocol/host_control_dispatcher.cc |
diff --git a/remoting/protocol/host_control_dispatcher.cc b/remoting/protocol/host_control_dispatcher.cc |
index 44f302cac06c9f8ebda194bffc910ca77ebd3b3b..d3210a60da6cb04bb192f3c5d458fe9057ea434d 100644 |
--- a/remoting/protocol/host_control_dispatcher.cc |
+++ b/remoting/protocol/host_control_dispatcher.cc |
@@ -10,6 +10,7 @@ |
#include "remoting/proto/control.pb.h" |
#include "remoting/proto/internal.pb.h" |
#include "remoting/protocol/buffered_socket_writer.h" |
+#include "remoting/protocol/clipboard_stub.h" |
#include "remoting/protocol/host_stub.h" |
#include "remoting/protocol/util.h" |
@@ -18,6 +19,7 @@ namespace protocol { |
HostControlDispatcher::HostControlDispatcher() |
: ChannelDispatcherBase(kControlChannelName), |
+ clipboard_stub_(NULL), |
host_stub_(NULL), |
writer_(new BufferedSocketWriter(base::MessageLoopProxy::current())) { |
} |
@@ -34,9 +36,16 @@ void HostControlDispatcher::OnInitialized() { |
void HostControlDispatcher::OnMessageReceived( |
ControlMessage* message, const base::Closure& done_task) { |
+ DCHECK(clipboard_stub_); |
DCHECK(host_stub_); |
- LOG(WARNING) << "Unknown control message received."; |
- done_task.Run(); |
+ |
+ base::ScopedClosureRunner done_runner(done_task); |
+ |
+ if (message->has_clipboard_event()) { |
+ clipboard_stub_->InjectClipboardEvent(message->clipboard_event()); |
+ } else { |
+ LOG(WARNING) << "Unknown control message received."; |
+ } |
} |
} // namespace protocol |