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

Unified Diff: remoting/protocol/client_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/client_control_dispatcher.h ('k') | remoting/protocol/client_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/client_control_dispatcher.cc
diff --git a/remoting/protocol/client_control_dispatcher.cc b/remoting/protocol/client_control_dispatcher.cc
index 8bb918efcb58f6591d37953a59f69f1d6ea5b41d..a42c3f628d8b08a78077407e8ee64ecdf0ca82c7 100644
--- a/remoting/protocol/client_control_dispatcher.cc
+++ b/remoting/protocol/client_control_dispatcher.cc
@@ -74,6 +74,13 @@ void ClientControlDispatcher::RequestPairing(
writer_.Write(SerializeAndFrameMessage(message), base::Closure());
}
+void ClientControlDispatcher::DeliverClientMessage(
+ const ExtensionMessage& message) {
+ ControlMessage control_message;
+ control_message.mutable_extension_message()->CopyFrom(message);
+ writer_.Write(SerializeAndFrameMessage(control_message), base::Closure());
+}
+
void ClientControlDispatcher::OnMessageReceived(
scoped_ptr<ControlMessage> message, const base::Closure& done_task) {
DCHECK(client_stub_);
@@ -88,6 +95,8 @@ void ClientControlDispatcher::OnMessageReceived(
client_stub_->SetCursorShape(message->cursor_shape());
} else if (message->has_pairing_response()) {
client_stub_->SetPairingResponse(message->pairing_response());
+ } else if (message->has_extension_message()) {
+ client_stub_->DeliverHostMessage(message->extension_message());
} else {
LOG(WARNING) << "Unknown control message received.";
}
« no previous file with comments | « remoting/protocol/client_control_dispatcher.h ('k') | remoting/protocol/client_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698