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