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

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: Rebase 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
« no previous file with comments | « remoting/protocol/host_control_dispatcher.h ('k') | remoting/protocol/host_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..26f09fc3e55e780f41cbf70d6327f1bd28a81976 100644
--- a/remoting/protocol/host_control_dispatcher.cc
+++ b/remoting/protocol/host_control_dispatcher.cc
@@ -46,6 +46,13 @@ void HostControlDispatcher::SetPairingResponse(
writer_.Write(SerializeAndFrameMessage(message), base::Closure());
}
+void HostControlDispatcher::DeliverHostMessage(
+ const ExtensionMessage& message) {
+ ControlMessage control_message;
+ control_message.mutable_extension_message()->CopyFrom(message);
+ writer_.Write(SerializeAndFrameMessage(control_message), base::Closure());
+}
+
void HostControlDispatcher::InjectClipboardEvent(const ClipboardEvent& event) {
ControlMessage message;
message.mutable_clipboard_event()->CopyFrom(event);
@@ -78,6 +85,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_extension_message()) {
+ host_stub_->DeliverClientMessage(message->extension_message());
} else {
LOG(WARNING) << "Unknown control message received.";
}
« no previous file with comments | « remoting/protocol/host_control_dispatcher.h ('k') | remoting/protocol/host_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698