Index: remoting/protocol/host_control_dispatcher.cc |
diff --git a/remoting/protocol/host_control_dispatcher.cc b/remoting/protocol/host_control_dispatcher.cc |
index db041b4c5510e7b0b87c1c7612d72380fa50d4b3..a213ac6eeb3090c2cb5c29982420b425bb41fd6d 100644 |
--- a/remoting/protocol/host_control_dispatcher.cc |
+++ b/remoting/protocol/host_control_dispatcher.cc |
@@ -32,6 +32,13 @@ void HostControlDispatcher::OnInitialized() { |
writer_.Init(channel(), BufferedSocketWriter::WriteFailedCallback()); |
} |
+void HostControlDispatcher::SetCapabilities( |
+ const Capabilities& capabilities) { |
+ ControlMessage message; |
+ message.mutable_capabilities()->CopyFrom(capabilities); |
+ writer_.Write(SerializeAndFrameMessage(message), base::Closure()); |
+} |
+ |
void HostControlDispatcher::InjectClipboardEvent(const ClipboardEvent& event) { |
ControlMessage message; |
message.mutable_clipboard_event()->CopyFrom(event); |
@@ -60,6 +67,8 @@ void HostControlDispatcher::OnMessageReceived( |
host_stub_->ControlVideo(message->video_control()); |
} else if (message->has_audio_control()) { |
host_stub_->ControlAudio(message->audio_control()); |
+ } else if (message->has_capabilities()) { |
+ host_stub_->SetCapabilities(message->capabilities()); |
} else { |
LOG(WARNING) << "Unknown control message received."; |
} |