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

Unified Diff: remoting/host/client_connection.h

Issue 2963003: Changing UpdateStreamPacket protobuf definition for chromoting (Closed)
Patch Set: fixed comments Created 10 years, 5 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/client/x11_view.cc ('k') | remoting/host/client_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_connection.h
diff --git a/remoting/host/client_connection.h b/remoting/host/client_connection.h
index 3e85cc97c03d929a7df444983d5d3d9b1ac1f060..c647eb67efe2a719aff1777c729bfa7003f4db53 100644
--- a/remoting/host/client_connection.h
+++ b/remoting/host/client_connection.h
@@ -62,6 +62,12 @@ class ClientConnection : public base::RefCountedThreadSafe<ClientConnection>,
virtual ~ClientConnection();
+ // Creates a DataBuffer object that wraps around HostMessage. The DataBuffer
+ // object will be responsible for serializing and framing the message.
+ // DataBuffer will also own |msg| after this call.
+ static scoped_refptr<media::DataBuffer> CreateWireFormatDataBuffer(
+ const HostMessage* msg);
+
virtual void set_jingle_channel(JingleChannel* channel) {
channel_ = channel;
}
@@ -75,10 +81,15 @@ class ClientConnection : public base::RefCountedThreadSafe<ClientConnection>,
// Notifies the viewer the start of an update stream.
virtual void SendBeginUpdateStreamMessage();
- // Send encoded update stream data to the viewer. The viewer
- // should not take ownership of the data.
+ // Send encoded update stream data to the viewer.
+ //
+ // |data| is the actual bytes in wire format. That means it is fully framed
+ // and serialized from a HostMessage. This is a special case only for
+ // UpdateStreamPacket to reduce the amount of memory copies.
+ //
+ // |data| should be created by calling to
+ // CreateWireFormatDataBuffer(HostMessage).
virtual void SendUpdateStreamPacketMessage(
- const UpdateStreamPacketHeader* header,
scoped_refptr<media::DataBuffer> data);
// Notifies the viewer the update stream has ended.
« no previous file with comments | « remoting/client/x11_view.cc ('k') | remoting/host/client_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698