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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // IPC messages for resource loading. 5 // IPC messages for resource loading.
6 6
7 // Multiply-included message file, hence no include guard. 7 // Multiply-included message file, hence no include guard.
8 #include "base/shared_memory.h" 8 #include "base/shared_memory.h"
9 #include "content/public/common/common_param_traits.h" 9 #include "content/public/common/common_param_traits.h"
10 #include "content/public/common/resource_response.h" 10 #include "content/public/common/resource_response.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 int64 /* size */) 149 int64 /* size */)
150 150
151 // Sent when the request has been redirected. The receiver is expected to 151 // Sent when the request has been redirected. The receiver is expected to
152 // respond with either a FollowRedirect message (if the redirect is to be 152 // respond with either a FollowRedirect message (if the redirect is to be
153 // followed) or a CancelRequest message (if it should not be followed). 153 // followed) or a CancelRequest message (if it should not be followed).
154 IPC_MESSAGE_ROUTED3(ResourceMsg_ReceivedRedirect, 154 IPC_MESSAGE_ROUTED3(ResourceMsg_ReceivedRedirect,
155 int /* request_id */, 155 int /* request_id */,
156 GURL /* new_url */, 156 GURL /* new_url */,
157 content::ResourceResponseHead) 157 content::ResourceResponseHead)
158 158
159 // Sent when some data from a resource request is ready. The handle should 159 // Sent to set the shared memory buffer to be used to transmit response data to
160 // already be mapped into the process that receives this message. 160 // the renderer. Subsequent DataReceived messages refer to byte ranges in the
161 // shared memory buffer. The shared memory buffer should be retained by the
162 // renderer until the resource request completes.
163 //
164 // NOTE: The shared memory handle should already be mapped into the process
165 // that receives this message.
166 //
167 IPC_MESSAGE_ROUTED3(ResourceMsg_SetDataBuffer,
168 int /* request_id */,
169 base::SharedMemoryHandle /* shm_handle */,
170 int /* shm_size */)
171
172 // Sent when some data from a resource request is ready. The data offset and
173 // length specify a byte range into the shared memory buffer provided by the
174 // SetDataBuffer message.
161 IPC_MESSAGE_ROUTED4(ResourceMsg_DataReceived, 175 IPC_MESSAGE_ROUTED4(ResourceMsg_DataReceived,
162 int /* request_id */, 176 int /* request_id */,
163 base::SharedMemoryHandle /* data */, 177 int /* data_offset */,
164 int /* data_len */, 178 int /* data_length */,
165 int /* encoded_data_length */) 179 int /* encoded_data_length */)
166 180
167 // Sent when some data from a resource request has been downloaded to 181 // Sent when some data from a resource request has been downloaded to
168 // file. This is only called in the 'download_to_file' case and replaces 182 // file. This is only called in the 'download_to_file' case and replaces
169 // ResourceMsg_DataReceived in the call sequence in that case. 183 // ResourceMsg_DataReceived in the call sequence in that case.
170 IPC_MESSAGE_ROUTED2(ResourceMsg_DataDownloaded, 184 IPC_MESSAGE_ROUTED2(ResourceMsg_DataDownloaded,
171 int /* request_id */, 185 int /* request_id */,
172 int /* data_len */) 186 int /* data_len */)
173 187
174 // Sent when the request has been completed. 188 // Sent when the request has been completed.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 int /* request_id */) 227 int /* request_id */)
214 228
215 // Sent by the renderer process to acknowledge receipt of a 229 // Sent by the renderer process to acknowledge receipt of a
216 // UploadProgress message. 230 // UploadProgress message.
217 IPC_MESSAGE_ROUTED1(ResourceHostMsg_UploadProgress_ACK, 231 IPC_MESSAGE_ROUTED1(ResourceHostMsg_UploadProgress_ACK,
218 int /* request_id */) 232 int /* request_id */)
219 233
220 // Sent when the renderer process deletes a resource loader. 234 // Sent when the renderer process deletes a resource loader.
221 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, 235 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile,
222 int /* request_id */) 236 int /* request_id */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698