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

Side by Side Diff: content/common/resource_messages.h

Issue 8680036: Move ResourceResponse struct into the Content API, since it's used in Chrome. While at it, I also... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add gypi changes Created 9 years, 1 month 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
« no previous file with comments | « content/common/resource_dispatcher_unittest.cc ('k') | content/common/resource_response.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
10 #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"
11 #include "ipc/ipc_message_macros.h" 11 #include "ipc/ipc_message_macros.h"
12 #include "net/base/upload_data.h" 12 #include "net/base/upload_data.h"
13 13
14 #define IPC_MESSAGE_START ResourceMsgStart 14 #define IPC_MESSAGE_START ResourceMsgStart
15 #undef IPC_MESSAGE_EXPORT 15 #undef IPC_MESSAGE_EXPORT
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
17 17
18 IPC_STRUCT_TRAITS_BEGIN(content::ResourceResponseHead)
19 IPC_STRUCT_TRAITS_PARENT(webkit_glue::ResourceResponseInfo)
20 IPC_STRUCT_TRAITS_MEMBER(status)
21 IPC_STRUCT_TRAITS_END()
22
23 IPC_STRUCT_TRAITS_BEGIN(content::SyncLoadResult)
24 IPC_STRUCT_TRAITS_PARENT(content::ResourceResponseHead)
25 IPC_STRUCT_TRAITS_MEMBER(final_url)
26 IPC_STRUCT_TRAITS_MEMBER(data)
27 IPC_STRUCT_TRAITS_END()
28
18 IPC_STRUCT_TRAITS_BEGIN(webkit_glue::ResourceResponseInfo) 29 IPC_STRUCT_TRAITS_BEGIN(webkit_glue::ResourceResponseInfo)
19 IPC_STRUCT_TRAITS_MEMBER(request_time) 30 IPC_STRUCT_TRAITS_MEMBER(request_time)
20 IPC_STRUCT_TRAITS_MEMBER(response_time) 31 IPC_STRUCT_TRAITS_MEMBER(response_time)
21 IPC_STRUCT_TRAITS_MEMBER(headers) 32 IPC_STRUCT_TRAITS_MEMBER(headers)
22 IPC_STRUCT_TRAITS_MEMBER(mime_type) 33 IPC_STRUCT_TRAITS_MEMBER(mime_type)
23 IPC_STRUCT_TRAITS_MEMBER(charset) 34 IPC_STRUCT_TRAITS_MEMBER(charset)
24 IPC_STRUCT_TRAITS_MEMBER(security_info) 35 IPC_STRUCT_TRAITS_MEMBER(security_info)
25 IPC_STRUCT_TRAITS_MEMBER(content_length) 36 IPC_STRUCT_TRAITS_MEMBER(content_length)
26 IPC_STRUCT_TRAITS_MEMBER(encoded_data_length) 37 IPC_STRUCT_TRAITS_MEMBER(encoded_data_length)
27 IPC_STRUCT_TRAITS_MEMBER(appcache_id) 38 IPC_STRUCT_TRAITS_MEMBER(appcache_id)
28 IPC_STRUCT_TRAITS_MEMBER(appcache_manifest_url) 39 IPC_STRUCT_TRAITS_MEMBER(appcache_manifest_url)
29 IPC_STRUCT_TRAITS_MEMBER(connection_id) 40 IPC_STRUCT_TRAITS_MEMBER(connection_id)
30 IPC_STRUCT_TRAITS_MEMBER(connection_reused) 41 IPC_STRUCT_TRAITS_MEMBER(connection_reused)
31 IPC_STRUCT_TRAITS_MEMBER(load_timing) 42 IPC_STRUCT_TRAITS_MEMBER(load_timing)
32 IPC_STRUCT_TRAITS_MEMBER(devtools_info) 43 IPC_STRUCT_TRAITS_MEMBER(devtools_info)
33 IPC_STRUCT_TRAITS_MEMBER(download_file_path) 44 IPC_STRUCT_TRAITS_MEMBER(download_file_path)
34 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_spdy) 45 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_spdy)
35 IPC_STRUCT_TRAITS_MEMBER(was_npn_negotiated) 46 IPC_STRUCT_TRAITS_MEMBER(was_npn_negotiated)
36 IPC_STRUCT_TRAITS_MEMBER(was_alternate_protocol_available) 47 IPC_STRUCT_TRAITS_MEMBER(was_alternate_protocol_available)
37 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_proxy) 48 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_proxy)
38 IPC_STRUCT_TRAITS_MEMBER(socket_address) 49 IPC_STRUCT_TRAITS_MEMBER(socket_address)
39 IPC_STRUCT_TRAITS_END() 50 IPC_STRUCT_TRAITS_END()
40 51
41 IPC_STRUCT_TRAITS_BEGIN(ResourceResponseHead)
42 IPC_STRUCT_TRAITS_PARENT(webkit_glue::ResourceResponseInfo)
43 IPC_STRUCT_TRAITS_MEMBER(status)
44 IPC_STRUCT_TRAITS_END()
45
46 IPC_STRUCT_TRAITS_BEGIN(SyncLoadResult)
47 IPC_STRUCT_TRAITS_PARENT(ResourceResponseHead)
48 IPC_STRUCT_TRAITS_MEMBER(final_url)
49 IPC_STRUCT_TRAITS_MEMBER(data)
50 IPC_STRUCT_TRAITS_END()
51
52 // Parameters for a resource request. 52 // Parameters for a resource request.
53 IPC_STRUCT_BEGIN(ResourceHostMsg_Request) 53 IPC_STRUCT_BEGIN(ResourceHostMsg_Request)
54 // The request method: GET, POST, etc. 54 // The request method: GET, POST, etc.
55 IPC_STRUCT_MEMBER(std::string, method) 55 IPC_STRUCT_MEMBER(std::string, method)
56 56
57 // The requested URL. 57 // The requested URL.
58 IPC_STRUCT_MEMBER(GURL, url) 58 IPC_STRUCT_MEMBER(GURL, url)
59 59
60 // Usually the URL of the document in the top-level window, which may be 60 // Usually the URL of the document in the top-level window, which may be
61 // checked by the third-party cookie blocking policy. Leaving it empty may 61 // checked by the third-party cookie blocking policy. Leaving it empty may
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_ROUTED2(ResourceMsg_ReceivedResponse,
120 int /* request_id */, 120 int /* request_id */,
121 ResourceResponseHead) 121 content::ResourceResponseHead)
122 122
123 // Sent when cached metadata from a resource request is ready. 123 // Sent when cached metadata from a resource request is ready.
124 IPC_MESSAGE_ROUTED2(ResourceMsg_ReceivedCachedMetadata, 124 IPC_MESSAGE_ROUTED2(ResourceMsg_ReceivedCachedMetadata,
125 int /* request_id */, 125 int /* request_id */,
126 std::vector<char> /* data */) 126 std::vector<char> /* data */)
127 127
128 // Sent as upload progress is being made. 128 // Sent as upload progress is being made.
129 IPC_MESSAGE_ROUTED3(ResourceMsg_UploadProgress, 129 IPC_MESSAGE_ROUTED3(ResourceMsg_UploadProgress,
130 int /* request_id */, 130 int /* request_id */,
131 int64 /* position */, 131 int64 /* position */,
132 int64 /* size */) 132 int64 /* size */)
133 133
134 // Sent when the request has been redirected. The receiver is expected to 134 // 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 135 // respond with either a FollowRedirect message (if the redirect is to be
136 // followed) or a CancelRequest message (if it should not be followed). 136 // followed) or a CancelRequest message (if it should not be followed).
137 IPC_MESSAGE_ROUTED3(ResourceMsg_ReceivedRedirect, 137 IPC_MESSAGE_ROUTED3(ResourceMsg_ReceivedRedirect,
138 int /* request_id */, 138 int /* request_id */,
139 GURL /* new_url */, 139 GURL /* new_url */,
140 ResourceResponseHead) 140 content::ResourceResponseHead)
141 141
142 // Sent when some data from a resource request is ready. The handle should 142 // Sent when some data from a resource request is ready. The handle should
143 // already be mapped into the process that receives this message. 143 // already be mapped into the process that receives this message.
144 IPC_MESSAGE_ROUTED4(ResourceMsg_DataReceived, 144 IPC_MESSAGE_ROUTED4(ResourceMsg_DataReceived,
145 int /* request_id */, 145 int /* request_id */,
146 base::SharedMemoryHandle /* data */, 146 base::SharedMemoryHandle /* data */,
147 int /* data_len */, 147 int /* data_len */,
148 int /* encoded_data_length */) 148 int /* encoded_data_length */)
149 149
150 // Sent when some data from a resource request has been downloaded to 150 // Sent when some data from a resource request has been downloaded to
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // as the parameter. 183 // as the parameter.
184 IPC_MESSAGE_ROUTED3(ResourceHostMsg_FollowRedirect, 184 IPC_MESSAGE_ROUTED3(ResourceHostMsg_FollowRedirect,
185 int /* request_id */, 185 int /* request_id */,
186 bool /* has_new_first_party_for_cookies */, 186 bool /* has_new_first_party_for_cookies */,
187 GURL /* new_first_party_for_cookies */) 187 GURL /* new_first_party_for_cookies */)
188 188
189 // Makes a synchronous resource request via the browser. 189 // Makes a synchronous resource request via the browser.
190 IPC_SYNC_MESSAGE_ROUTED2_1(ResourceHostMsg_SyncLoad, 190 IPC_SYNC_MESSAGE_ROUTED2_1(ResourceHostMsg_SyncLoad,
191 int /* request_id */, 191 int /* request_id */,
192 ResourceHostMsg_Request, 192 ResourceHostMsg_Request,
193 SyncLoadResult) 193 content::SyncLoadResult)
194 194
195 // Sent when the renderer process is done processing a DataReceived 195 // Sent when the renderer process is done processing a DataReceived
196 // message. 196 // message.
197 IPC_MESSAGE_ROUTED1(ResourceHostMsg_DataReceived_ACK, 197 IPC_MESSAGE_ROUTED1(ResourceHostMsg_DataReceived_ACK,
198 int /* request_id */) 198 int /* request_id */)
199 199
200 // Sent when the renderer has processed a DataDownloaded message. 200 // Sent when the renderer has processed a DataDownloaded message.
201 IPC_MESSAGE_ROUTED1(ResourceHostMsg_DataDownloaded_ACK, 201 IPC_MESSAGE_ROUTED1(ResourceHostMsg_DataDownloaded_ACK,
202 int /* request_id */) 202 int /* request_id */)
203 203
204 // Sent by the renderer process to acknowledge receipt of a 204 // Sent by the renderer process to acknowledge receipt of a
205 // UploadProgress message. 205 // UploadProgress message.
206 IPC_MESSAGE_ROUTED1(ResourceHostMsg_UploadProgress_ACK, 206 IPC_MESSAGE_ROUTED1(ResourceHostMsg_UploadProgress_ACK,
207 int /* request_id */) 207 int /* request_id */)
208 208
209 // Sent when the renderer process deletes a resource loader. 209 // Sent when the renderer process deletes a resource loader.
210 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, 210 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile,
211 int /* request_id */) 211 int /* request_id */)
OLDNEW
« no previous file with comments | « content/common/resource_dispatcher_unittest.cc ('k') | content/common/resource_response.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698