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

Unified Diff: content/common/resource_messages.h

Issue 10911297: Modify AsyncResourceHandler to use a single shared memory buffer (in ring (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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: content/common/resource_messages.h
===================================================================
--- content/common/resource_messages.h (revision 157294)
+++ content/common/resource_messages.h (working copy)
@@ -156,12 +156,26 @@
GURL /* new_url */,
content::ResourceResponseHead)
-// Sent when some data from a resource request is ready. The handle should
-// already be mapped into the process that receives this message.
+// Sent to set the shared memory buffer to be used to transmit response data to
+// the renderer. Subsequent DataReceived messages refer to byte ranges in the
+// shared memory buffer. The shared memory buffer should be retained by the
+// renderer until the resource request completes.
+//
+// NOTE: The shared memory handle should already be mapped into the process
+// that receives this message.
+//
+IPC_MESSAGE_ROUTED3(ResourceMsg_SetDataBuffer,
+ int /* request_id */,
+ base::SharedMemoryHandle /* shm_handle */,
+ int /* shm_size */)
+
+// Sent when some data from a resource request is ready. The data offset and
+// length specify a byte range into the shared memory buffer provided by the
+// SetDataBuffer message.
IPC_MESSAGE_ROUTED4(ResourceMsg_DataReceived,
int /* request_id */,
- base::SharedMemoryHandle /* data */,
- int /* data_len */,
+ int /* data_offset */,
+ int /* data_length */,
int /* encoded_data_length */)
// Sent when some data from a resource request has been downloaded to

Powered by Google App Engine
This is Rietveld 408576698