Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: remoting/protocol/host_control_dispatcher.cc

Issue 22477006: Added JsonMessage to the control channel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/host_control_dispatcher.cc
diff --git a/remoting/protocol/host_control_dispatcher.cc b/remoting/protocol/host_control_dispatcher.cc
index b979e36060d8999b7e99df86e2367cf193d9a0b5..10af3444c30d3e1b2b457fc15d9c1b5377843785 100644
--- a/remoting/protocol/host_control_dispatcher.cc
+++ b/remoting/protocol/host_control_dispatcher.cc
@@ -46,6 +46,12 @@ void HostControlDispatcher::SetPairingResponse(
writer_.Write(SerializeAndFrameMessage(message), base::Closure());
}
+void HostControlDispatcher::ProcessHostJson(const JsonMessage& json_message) {
+ ControlMessage message;
+ message.mutable_json_message()->CopyFrom(json_message);
+ writer_.Write(SerializeAndFrameMessage(message), base::Closure());
+}
+
void HostControlDispatcher::InjectClipboardEvent(const ClipboardEvent& event) {
ControlMessage message;
message.mutable_clipboard_event()->CopyFrom(event);
@@ -78,6 +84,8 @@ void HostControlDispatcher::OnMessageReceived(
host_stub_->SetCapabilities(message->capabilities());
} else if (message->has_pairing_request()) {
host_stub_->RequestPairing(message->pairing_request());
+ } else if (message->has_json_message()) {
+ host_stub_->ProcessClientJson(message->json_message());
} else {
LOG(WARNING) << "Unknown control message received.";
}

Powered by Google App Engine
This is Rietveld 408576698