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

Unified Diff: remoting/protocol/host_control_dispatcher.cc

Issue 1649063003: Add MessagePipe interface. Use it in ChannelDispatcherBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simple_parser
Patch Set: Created 4 years, 11 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_video_dispatcher_unittest.cc ('k') | remoting/protocol/host_event_dispatcher.cc » ('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 fb8aee94188bc111745ec09d893eef012fd2c32e..627eb7e7d3f0eacebe33ace7a531bee01101fb3b 100644
--- a/remoting/protocol/host_control_dispatcher.cc
+++ b/remoting/protocol/host_control_dispatcher.cc
@@ -6,11 +6,13 @@
#include "base/callback_helpers.h"
#include "net/socket/stream_socket.h"
+#include "remoting/base/compound_buffer.h"
#include "remoting/base/constants.h"
#include "remoting/proto/control.pb.h"
#include "remoting/proto/internal.pb.h"
#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/host_stub.h"
+#include "remoting/protocol/message_pipe.h"
#include "remoting/protocol/message_serialization.h"
namespace remoting {
@@ -24,34 +26,34 @@ void HostControlDispatcher::SetCapabilities(
const Capabilities& capabilities) {
ControlMessage message;
message.mutable_capabilities()->CopyFrom(capabilities);
- writer()->Write(SerializeAndFrameMessage(message), base::Closure());
+ message_pipe()->Send(&message, base::Closure());
}
void HostControlDispatcher::SetPairingResponse(
const PairingResponse& pairing_response) {
ControlMessage message;
message.mutable_pairing_response()->CopyFrom(pairing_response);
- writer()->Write(SerializeAndFrameMessage(message), base::Closure());
+ message_pipe()->Send(&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());
+ message_pipe()->Send(&control_message, base::Closure());
}
void HostControlDispatcher::InjectClipboardEvent(const ClipboardEvent& event) {
ControlMessage message;
message.mutable_clipboard_event()->CopyFrom(event);
- writer()->Write(SerializeAndFrameMessage(message), base::Closure());
+ message_pipe()->Send(&message, base::Closure());
}
void HostControlDispatcher::SetCursorShape(
const CursorShapeInfo& cursor_shape) {
ControlMessage message;
message.mutable_cursor_shape()->CopyFrom(cursor_shape);
- writer()->Write(SerializeAndFrameMessage(message), base::Closure());
+ message_pipe()->Send(&message, base::Closure());
}
void HostControlDispatcher::OnIncomingMessage(
« no previous file with comments | « remoting/protocol/client_video_dispatcher_unittest.cc ('k') | remoting/protocol/host_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698