OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common/resource_response.h" | 9 #include "content/common/resource_response.h" |
10 #include "content/public/common/common_param_traits.h" | 10 #include "content/public/common/common_param_traits.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 // Identifies the parent frame of the frame that sent the request. | 109 // Identifies the parent frame of the frame that sent the request. |
110 // -1 if unknown / invalid. | 110 // -1 if unknown / invalid. |
111 IPC_STRUCT_MEMBER(int64, parent_frame_id) | 111 IPC_STRUCT_MEMBER(int64, parent_frame_id) |
112 | 112 |
113 IPC_STRUCT_MEMBER(content::PageTransition, transition_type) | 113 IPC_STRUCT_MEMBER(content::PageTransition, transition_type) |
114 IPC_STRUCT_END() | 114 IPC_STRUCT_END() |
115 | 115 |
116 // Resource messages sent from the browser to the renderer. | 116 // Resource messages sent from the browser to the renderer. |
117 | 117 |
118 // Sent when the headers are available for a resource request. | 118 // Sent when the headers are available for a resource request. |
119 IPC_MESSAGE_ROUTED2(ResourceMsg_ReceivedResponse, | 119 IPC_MESSAGE_ROUTED4(ResourceMsg_ReceivedResponse, |
120 int /* request_id */, | 120 int /* request_id */, |
121 ResourceResponseHead) | 121 ResourceResponseHead, |
| 122 base::TimeTicks /* start_time */, |
| 123 base::TimeTicks /* end_time */) |
122 | 124 |
123 // Sent when cached metadata from a resource request is ready. | 125 // Sent when cached metadata from a resource request is ready. |
124 IPC_MESSAGE_ROUTED2(ResourceMsg_ReceivedCachedMetadata, | 126 IPC_MESSAGE_ROUTED2(ResourceMsg_ReceivedCachedMetadata, |
125 int /* request_id */, | 127 int /* request_id */, |
126 std::vector<char> /* data */) | 128 std::vector<char> /* data */) |
127 | 129 |
128 // Sent as upload progress is being made. | 130 // Sent as upload progress is being made. |
129 IPC_MESSAGE_ROUTED3(ResourceMsg_UploadProgress, | 131 IPC_MESSAGE_ROUTED3(ResourceMsg_UploadProgress, |
130 int /* request_id */, | 132 int /* request_id */, |
131 int64 /* position */, | 133 int64 /* position */, |
132 int64 /* size */) | 134 int64 /* size */) |
133 | 135 |
134 // Sent when the request has been redirected. The receiver is expected to | 136 // Sent when the request has been redirected. The receiver is expected to |
135 // respond with either a FollowRedirect message (if the redirect is to be | 137 // respond with either a FollowRedirect message (if the redirect is to be |
136 // followed) or a CancelRequest message (if it should not be followed). | 138 // followed) or a CancelRequest message (if it should not be followed). |
137 IPC_MESSAGE_ROUTED3(ResourceMsg_ReceivedRedirect, | 139 IPC_MESSAGE_ROUTED5(ResourceMsg_ReceivedRedirect, |
138 int /* request_id */, | 140 int /* request_id */, |
139 GURL /* new_url */, | 141 GURL /* new_url */, |
140 ResourceResponseHead) | 142 ResourceResponseHead, |
| 143 base::TimeTicks /* start_time */, |
| 144 base::TimeTicks /* end_time */) |
141 | 145 |
142 // Sent when some data from a resource request is ready. The handle should | 146 // Sent when some data from a resource request is ready. The handle should |
143 // already be mapped into the process that receives this message. | 147 // already be mapped into the process that receives this message. |
144 IPC_MESSAGE_ROUTED4(ResourceMsg_DataReceived, | 148 IPC_MESSAGE_ROUTED4(ResourceMsg_DataReceived, |
145 int /* request_id */, | 149 int /* request_id */, |
146 base::SharedMemoryHandle /* data */, | 150 base::SharedMemoryHandle /* data */, |
147 int /* data_len */, | 151 int /* data_len */, |
148 int /* encoded_data_length */) | 152 int /* encoded_data_length */) |
149 | 153 |
150 // Sent when some data from a resource request has been downloaded to | 154 // Sent when some data from a resource request has been downloaded to |
151 // file. This is only called in the 'download_to_file' case and replaces | 155 // file. This is only called in the 'download_to_file' case and replaces |
152 // ResourceMsg_DataReceived in the call sequence in that case. | 156 // ResourceMsg_DataReceived in the call sequence in that case. |
153 IPC_MESSAGE_ROUTED2(ResourceMsg_DataDownloaded, | 157 IPC_MESSAGE_ROUTED2(ResourceMsg_DataDownloaded, |
154 int /* request_id */, | 158 int /* request_id */, |
155 int /* data_len */) | 159 int /* data_len */) |
156 | 160 |
157 // Sent when the request has been completed. | 161 // Sent when the request has been completed. |
158 IPC_MESSAGE_ROUTED4(ResourceMsg_RequestComplete, | 162 IPC_MESSAGE_ROUTED4(ResourceMsg_RequestComplete, |
159 int /* request_id */, | 163 int /* request_id */, |
160 net::URLRequestStatus /* status */, | 164 net::URLRequestStatus /* status */, |
161 std::string /* security info */, | 165 std::string /* security info */, |
162 base::Time /* completion_time */) | 166 base::TimeTicks /* completion_time */) |
163 | 167 |
164 // Resource messages sent from the renderer to the browser. | 168 // Resource messages sent from the renderer to the browser. |
165 | 169 |
166 // Makes a resource request via the browser. | 170 // Makes a resource request via the browser. |
167 IPC_MESSAGE_ROUTED2(ResourceHostMsg_RequestResource, | 171 IPC_MESSAGE_ROUTED2(ResourceHostMsg_RequestResource, |
168 int /* request_id */, | 172 int /* request_id */, |
169 ResourceHostMsg_Request) | 173 ResourceHostMsg_Request) |
170 | 174 |
171 // Cancels a resource request with the ID given as the parameter. | 175 // Cancels a resource request with the ID given as the parameter. |
172 IPC_MESSAGE_ROUTED1(ResourceHostMsg_CancelRequest, | 176 IPC_MESSAGE_ROUTED1(ResourceHostMsg_CancelRequest, |
(...skipping 29 matching lines...) Expand all Loading... |
202 int /* request_id */) | 206 int /* request_id */) |
203 | 207 |
204 // Sent by the renderer process to acknowledge receipt of a | 208 // Sent by the renderer process to acknowledge receipt of a |
205 // UploadProgress message. | 209 // UploadProgress message. |
206 IPC_MESSAGE_ROUTED1(ResourceHostMsg_UploadProgress_ACK, | 210 IPC_MESSAGE_ROUTED1(ResourceHostMsg_UploadProgress_ACK, |
207 int /* request_id */) | 211 int /* request_id */) |
208 | 212 |
209 // Sent when the renderer process deletes a resource loader. | 213 // Sent when the renderer process deletes a resource loader. |
210 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 214 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
211 int /* request_id */) | 215 int /* request_id */) |
OLD | NEW |