[email protected] | b9fd01ba | 2012-02-28 01:50:40 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | // IPC messages for resource loading. |
[email protected] | a17df45d | 2013-02-15 11:12:46 | [diff] [blame] | 6 | // |
| 7 | // NOTE: All messages must send an |int request_id| as their first parameter. |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 8 | |
[email protected] | e503a12 | 2011-03-17 18:20:52 | [diff] [blame] | 9 | // Multiply-included message file, hence no include guard. |
[email protected] | 9cc992b | 2013-07-17 06:30:36 | [diff] [blame] | 10 | #include "base/memory/shared_memory.h" |
[email protected] | 71ed8e02 | 2013-07-25 14:39:57 | [diff] [blame] | 11 | #include "base/process/process.h" |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 12 | #include "content/common/content_param_traits_macros.h" |
[email protected] | 14f154a | 2014-03-11 16:24:41 | [diff] [blame] | 13 | #include "content/common/resource_request_body.h" |
[email protected] | 19a5c744 | 2011-10-21 20:00:41 | [diff] [blame] | 14 | #include "content/public/common/common_param_traits.h" |
[email protected] | 2336ffe | 2011-11-24 01:23:34 | [diff] [blame] | 15 | #include "content/public/common/resource_response.h" |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 16 | #include "ipc/ipc_message_macros.h" |
[email protected] | a9344092d | 2013-02-27 00:56:45 | [diff] [blame] | 17 | #include "net/base/request_priority.h" |
[email protected] | 92a98df9 | 2013-06-06 02:47:42 | [diff] [blame] | 18 | #include "net/http/http_response_info.h" |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 19 | |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 20 | #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
| 21 | #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
| 22 | |
[email protected] | ec29880 | 2013-03-27 16:45:07 | [diff] [blame] | 23 | namespace net { |
| 24 | struct LoadTimingInfo; |
| 25 | } |
| 26 | |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 27 | namespace webkit_glue { |
| 28 | struct ResourceDevToolsInfo; |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | namespace IPC { |
| 32 | |
| 33 | template <> |
| 34 | struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { |
| 35 | typedef scoped_refptr<net::HttpResponseHeaders> param_type; |
| 36 | static void Write(Message* m, const param_type& p); |
| 37 | static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 38 | static void Log(const param_type& p, std::string* l); |
| 39 | }; |
| 40 | |
| 41 | template <> |
[email protected] | 2b4ae17 | 2013-07-11 01:46:20 | [diff] [blame] | 42 | struct CONTENT_EXPORT ParamTraits<webkit_common::DataElement> { |
| 43 | typedef webkit_common::DataElement param_type; |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 44 | static void Write(Message* m, const param_type& p); |
| 45 | static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 46 | static void Log(const param_type& p, std::string* l); |
| 47 | }; |
| 48 | |
| 49 | template <> |
| 50 | struct ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> > { |
| 51 | typedef scoped_refptr<webkit_glue::ResourceDevToolsInfo> param_type; |
| 52 | static void Write(Message* m, const param_type& p); |
| 53 | static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 54 | static void Log(const param_type& p, std::string* l); |
| 55 | }; |
| 56 | |
| 57 | template <> |
[email protected] | ec29880 | 2013-03-27 16:45:07 | [diff] [blame] | 58 | struct ParamTraits<net::LoadTimingInfo> { |
| 59 | typedef net::LoadTimingInfo param_type; |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 60 | static void Write(Message* m, const param_type& p); |
| 61 | static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 62 | static void Log(const param_type& p, std::string* l); |
| 63 | }; |
| 64 | |
| 65 | template <> |
[email protected] | 14f154a | 2014-03-11 16:24:41 | [diff] [blame] | 66 | struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { |
| 67 | typedef scoped_refptr<content::ResourceRequestBody> param_type; |
[email protected] | 9d8ea30 | 2012-09-25 15:04:22 | [diff] [blame] | 68 | static void Write(Message* m, const param_type& p); |
| 69 | static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 70 | static void Log(const param_type& p, std::string* l); |
| 71 | }; |
| 72 | |
| 73 | } // namespace IPC |
| 74 | |
| 75 | #endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
| 76 | |
| 77 | |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 78 | #define IPC_MESSAGE_START ResourceMsgStart |
[email protected] | 03ff5e5 | 2011-09-30 00:28:14 | [diff] [blame] | 79 | #undef IPC_MESSAGE_EXPORT |
| 80 | #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 81 | |
[email protected] | 92a98df9 | 2013-06-06 02:47:42 | [diff] [blame] | 82 | IPC_ENUM_TRAITS_MAX_VALUE( \ |
| 83 | net::HttpResponseInfo::ConnectionInfo, \ |
| 84 | net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS - 1) |
| 85 | |
[email protected] | 2336ffe | 2011-11-24 01:23:34 | [diff] [blame] | 86 | IPC_STRUCT_TRAITS_BEGIN(content::ResourceResponseHead) |
[email protected] | 0bf419d1 | 2014-05-28 01:02:23 | [diff] [blame^] | 87 | IPC_STRUCT_TRAITS_PARENT(content::ResourceResponseInfo) |
[email protected] | 2756a8e | 2012-09-07 18:24:29 | [diff] [blame] | 88 | IPC_STRUCT_TRAITS_MEMBER(error_code) |
[email protected] | d43d2e11 | 2012-08-07 01:10:19 | [diff] [blame] | 89 | IPC_STRUCT_TRAITS_MEMBER(request_start) |
| 90 | IPC_STRUCT_TRAITS_MEMBER(response_start) |
[email protected] | 2336ffe | 2011-11-24 01:23:34 | [diff] [blame] | 91 | IPC_STRUCT_TRAITS_END() |
| 92 | |
| 93 | IPC_STRUCT_TRAITS_BEGIN(content::SyncLoadResult) |
| 94 | IPC_STRUCT_TRAITS_PARENT(content::ResourceResponseHead) |
| 95 | IPC_STRUCT_TRAITS_MEMBER(final_url) |
| 96 | IPC_STRUCT_TRAITS_MEMBER(data) |
| 97 | IPC_STRUCT_TRAITS_END() |
| 98 | |
[email protected] | 0bf419d1 | 2014-05-28 01:02:23 | [diff] [blame^] | 99 | IPC_STRUCT_TRAITS_BEGIN(content::ResourceResponseInfo) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 100 | IPC_STRUCT_TRAITS_MEMBER(request_time) |
| 101 | IPC_STRUCT_TRAITS_MEMBER(response_time) |
| 102 | IPC_STRUCT_TRAITS_MEMBER(headers) |
| 103 | IPC_STRUCT_TRAITS_MEMBER(mime_type) |
| 104 | IPC_STRUCT_TRAITS_MEMBER(charset) |
| 105 | IPC_STRUCT_TRAITS_MEMBER(security_info) |
| 106 | IPC_STRUCT_TRAITS_MEMBER(content_length) |
[email protected] | dfd68217 | 2011-04-13 19:57:25 | [diff] [blame] | 107 | IPC_STRUCT_TRAITS_MEMBER(encoded_data_length) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 108 | IPC_STRUCT_TRAITS_MEMBER(appcache_id) |
| 109 | IPC_STRUCT_TRAITS_MEMBER(appcache_manifest_url) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 110 | IPC_STRUCT_TRAITS_MEMBER(load_timing) |
| 111 | IPC_STRUCT_TRAITS_MEMBER(devtools_info) |
| 112 | IPC_STRUCT_TRAITS_MEMBER(download_file_path) |
| 113 | IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_spdy) |
| 114 | IPC_STRUCT_TRAITS_MEMBER(was_npn_negotiated) |
| 115 | IPC_STRUCT_TRAITS_MEMBER(was_alternate_protocol_available) |
[email protected] | 92a98df9 | 2013-06-06 02:47:42 | [diff] [blame] | 116 | IPC_STRUCT_TRAITS_MEMBER(connection_info) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 117 | IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_proxy) |
[email protected] | b9fd01ba | 2012-02-28 01:50:40 | [diff] [blame] | 118 | IPC_STRUCT_TRAITS_MEMBER(npn_negotiated_protocol) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 119 | IPC_STRUCT_TRAITS_MEMBER(socket_address) |
| 120 | IPC_STRUCT_TRAITS_END() |
| 121 | |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 122 | // Parameters for a resource request. |
| 123 | IPC_STRUCT_BEGIN(ResourceHostMsg_Request) |
| 124 | // The request method: GET, POST, etc. |
| 125 | IPC_STRUCT_MEMBER(std::string, method) |
| 126 | |
| 127 | // The requested URL. |
| 128 | IPC_STRUCT_MEMBER(GURL, url) |
| 129 | |
| 130 | // Usually the URL of the document in the top-level window, which may be |
| 131 | // checked by the third-party cookie blocking policy. Leaving it empty may |
| 132 | // lead to undesired cookie blocking. Third-party cookie blocking can be |
| 133 | // bypassed by setting first_party_for_cookies = url, but this should ideally |
| 134 | // only be done if there really is no way to determine the correct value. |
| 135 | IPC_STRUCT_MEMBER(GURL, first_party_for_cookies) |
| 136 | |
| 137 | // The referrer to use (may be empty). |
| 138 | IPC_STRUCT_MEMBER(GURL, referrer) |
| 139 | |
[email protected] | d5a5034 | 2011-12-05 21:56:52 | [diff] [blame] | 140 | // The referrer policy to use. |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 141 | IPC_STRUCT_MEMBER(blink::WebReferrerPolicy, referrer_policy) |
[email protected] | d5a5034 | 2011-12-05 21:56:52 | [diff] [blame] | 142 | |
[email protected] | 48ed261 | 2014-01-21 00:30:57 | [diff] [blame] | 143 | // The frame's visiblity state. |
| 144 | IPC_STRUCT_MEMBER(blink::WebPageVisibilityState, visiblity_state) |
| 145 | |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 146 | // Additional HTTP request headers. |
| 147 | IPC_STRUCT_MEMBER(std::string, headers) |
| 148 | |
| 149 | // net::URLRequest load flags (0 by default). |
| 150 | IPC_STRUCT_MEMBER(int, load_flags) |
| 151 | |
| 152 | // Process ID from which this request originated, or zero if it originated |
| 153 | // in the renderer itself. |
[email protected] | 01cb1991 | 2013-09-11 19:13:03 | [diff] [blame] | 154 | // If kDirectNPAPIRequests isn't specified, then plugin requests get routed |
| 155 | // through the renderer and and this holds the pid of the plugin process. |
| 156 | // Otherwise this holds the render_process_id of the view that has the plugin. |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 157 | IPC_STRUCT_MEMBER(int, origin_pid) |
| 158 | |
| 159 | // What this resource load is for (main frame, sub-frame, sub-resource, |
| 160 | // object). |
| 161 | IPC_STRUCT_MEMBER(ResourceType::Type, resource_type) |
| 162 | |
[email protected] | 102ab68 | 2013-02-05 19:45:32 | [diff] [blame] | 163 | // The priority of this request. |
[email protected] | a9344092d | 2013-02-27 00:56:45 | [diff] [blame] | 164 | IPC_STRUCT_MEMBER(net::RequestPriority, priority) |
[email protected] | 102ab68 | 2013-02-05 19:45:32 | [diff] [blame] | 165 | |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 166 | // Used by plugin->browser requests to get the correct net::URLRequestContext. |
| 167 | IPC_STRUCT_MEMBER(uint32, request_context) |
| 168 | |
| 169 | // Indicates which frame (or worker context) the request is being loaded into, |
| 170 | // or kNoHostId. |
| 171 | IPC_STRUCT_MEMBER(int, appcache_host_id) |
| 172 | |
[email protected] | c4c091f | 2014-03-07 13:06:13 | [diff] [blame] | 173 | // Indicates which frame (or worker context) the request is being loaded into, |
| 174 | // or kInvalidServiceWorkerProviderId. |
| 175 | IPC_STRUCT_MEMBER(int, service_worker_provider_id) |
| 176 | |
[email protected] | e3e402c | 2012-08-21 13:57:42 | [diff] [blame] | 177 | // Optional resource request body (may be null). |
[email protected] | 14f154a | 2014-03-11 16:24:41 | [diff] [blame] | 178 | IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>, |
[email protected] | e3e402c | 2012-08-21 13:57:42 | [diff] [blame] | 179 | request_body) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 180 | |
| 181 | IPC_STRUCT_MEMBER(bool, download_to_file) |
| 182 | |
| 183 | // True if the request was user initiated. |
| 184 | IPC_STRUCT_MEMBER(bool, has_user_gesture) |
[email protected] | 418da61 | 2011-07-21 19:01:52 | [diff] [blame] | 185 | |
[email protected] | 60eca4eb | 2013-12-06 00:02:16 | [diff] [blame] | 186 | // The routing id of the RenderFrame. |
| 187 | IPC_STRUCT_MEMBER(int, render_frame_id) |
| 188 | |
[email protected] | 418da61 | 2011-07-21 19:01:52 | [diff] [blame] | 189 | // True if |frame_id| is the main frame of a RenderView. |
| 190 | IPC_STRUCT_MEMBER(bool, is_main_frame) |
| 191 | |
[email protected] | 79a7028 | 2014-03-03 21:29:35 | [diff] [blame] | 192 | // True if |parent_render_frame_id| is the main frame of a RenderView. |
[email protected] | 91043a823 | 2011-11-04 16:41:19 | [diff] [blame] | 193 | IPC_STRUCT_MEMBER(bool, parent_is_main_frame) |
| 194 | |
| 195 | // Identifies the parent frame of the frame that sent the request. |
| 196 | // -1 if unknown / invalid. |
[email protected] | 79a7028 | 2014-03-03 21:29:35 | [diff] [blame] | 197 | IPC_STRUCT_MEMBER(int, parent_render_frame_id) |
[email protected] | 91043a823 | 2011-11-04 16:41:19 | [diff] [blame] | 198 | |
[email protected] | 2905f74 | 2011-10-13 03:51:58 | [diff] [blame] | 199 | IPC_STRUCT_MEMBER(content::PageTransition, transition_type) |
[email protected] | 4ad5d77d | 2011-12-03 02:00:48 | [diff] [blame] | 200 | |
[email protected] | 4972fc8 | 2013-11-19 04:33:42 | [diff] [blame] | 201 | // For navigations, whether this navigation should replace the current session |
| 202 | // history entry on commit. |
| 203 | IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
| 204 | |
[email protected] | 4ad5d77d | 2011-12-03 02:00:48 | [diff] [blame] | 205 | // The following two members identify a previous request that has been |
| 206 | // created before this navigation has been transferred to a new render view. |
| 207 | // This serves the purpose of recycling the old request. |
| 208 | // Unless this refers to a transferred navigation, these values are -1 and -1. |
| 209 | IPC_STRUCT_MEMBER(int, transferred_request_child_id) |
| 210 | IPC_STRUCT_MEMBER(int, transferred_request_request_id) |
[email protected] | 8074478 | 2012-05-04 01:47:00 | [diff] [blame] | 211 | |
| 212 | // Whether or not we should allow the URL to download. |
| 213 | IPC_STRUCT_MEMBER(bool, allow_download) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 214 | IPC_STRUCT_END() |
| 215 | |
[email protected] | dcbe3df | 2014-02-06 23:08:37 | [diff] [blame] | 216 | // Parameters for a ResourceMsg_RequestComplete |
| 217 | IPC_STRUCT_BEGIN(ResourceMsg_RequestCompleteData) |
| 218 | // The error code. |
| 219 | IPC_STRUCT_MEMBER(int, error_code) |
| 220 | |
| 221 | // Was ignored by the request handler. |
| 222 | IPC_STRUCT_MEMBER(bool, was_ignored_by_handler) |
| 223 | |
| 224 | // A copy of the data requested exists in the cache. |
| 225 | IPC_STRUCT_MEMBER(bool, exists_in_cache) |
| 226 | |
| 227 | // Serialized security info; see content/common/ssl_status_serialization.h. |
| 228 | IPC_STRUCT_MEMBER(std::string, security_info) |
| 229 | |
| 230 | // Time the request completed. |
| 231 | IPC_STRUCT_MEMBER(base::TimeTicks, completion_time) |
[email protected] | c8c56758 | 2014-02-10 12:54:57 | [diff] [blame] | 232 | |
| 233 | // Total amount of data received from the network. |
| 234 | IPC_STRUCT_MEMBER(int64, encoded_data_length) |
[email protected] | dcbe3df | 2014-02-06 23:08:37 | [diff] [blame] | 235 | IPC_STRUCT_END() |
| 236 | |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 237 | // Resource messages sent from the browser to the renderer. |
| 238 | |
| 239 | // Sent when the headers are available for a resource request. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 240 | IPC_MESSAGE_CONTROL2(ResourceMsg_ReceivedResponse, |
| 241 | int /* request_id */, |
| 242 | content::ResourceResponseHead) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 243 | |
| 244 | // Sent when cached metadata from a resource request is ready. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 245 | IPC_MESSAGE_CONTROL2(ResourceMsg_ReceivedCachedMetadata, |
| 246 | int /* request_id */, |
| 247 | std::vector<char> /* data */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 248 | |
| 249 | // Sent as upload progress is being made. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 250 | IPC_MESSAGE_CONTROL3(ResourceMsg_UploadProgress, |
| 251 | int /* request_id */, |
| 252 | int64 /* position */, |
| 253 | int64 /* size */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 254 | |
| 255 | // Sent when the request has been redirected. The receiver is expected to |
| 256 | // respond with either a FollowRedirect message (if the redirect is to be |
| 257 | // followed) or a CancelRequest message (if it should not be followed). |
[email protected] | b97fc38 | 2014-05-14 20:06:34 | [diff] [blame] | 258 | IPC_MESSAGE_CONTROL4(ResourceMsg_ReceivedRedirect, |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 259 | int /* request_id */, |
| 260 | GURL /* new_url */, |
[email protected] | b97fc38 | 2014-05-14 20:06:34 | [diff] [blame] | 261 | GURL /* new_first_party_for_cookies */, |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 262 | content::ResourceResponseHead) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 263 | |
[email protected] | f0fa1ab | 2012-09-18 06:28:38 | [diff] [blame] | 264 | // Sent to set the shared memory buffer to be used to transmit response data to |
| 265 | // the renderer. Subsequent DataReceived messages refer to byte ranges in the |
| 266 | // shared memory buffer. The shared memory buffer should be retained by the |
| 267 | // renderer until the resource request completes. |
| 268 | // |
| 269 | // NOTE: The shared memory handle should already be mapped into the process |
| 270 | // that receives this message. |
| 271 | // |
[email protected] | 9d9387e | 2013-01-12 16:55:08 | [diff] [blame] | 272 | // TODO(darin): The |renderer_pid| parameter is just a temporary parameter, |
| 273 | // added to help in debugging crbug/160401. |
| 274 | // |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 275 | IPC_MESSAGE_CONTROL4(ResourceMsg_SetDataBuffer, |
| 276 | int /* request_id */, |
| 277 | base::SharedMemoryHandle /* shm_handle */, |
| 278 | int /* shm_size */, |
| 279 | base::ProcessId /* renderer_pid */) |
[email protected] | f0fa1ab | 2012-09-18 06:28:38 | [diff] [blame] | 280 | |
| 281 | // Sent when some data from a resource request is ready. The data offset and |
| 282 | // length specify a byte range into the shared memory buffer provided by the |
| 283 | // SetDataBuffer message. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 284 | IPC_MESSAGE_CONTROL4(ResourceMsg_DataReceived, |
| 285 | int /* request_id */, |
| 286 | int /* data_offset */, |
| 287 | int /* data_length */, |
| 288 | int /* encoded_data_length */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 289 | |
| 290 | // Sent when some data from a resource request has been downloaded to |
| 291 | // file. This is only called in the 'download_to_file' case and replaces |
| 292 | // ResourceMsg_DataReceived in the call sequence in that case. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 293 | IPC_MESSAGE_CONTROL3(ResourceMsg_DataDownloaded, |
| 294 | int /* request_id */, |
| 295 | int /* data_len */, |
| 296 | int /* encoded_data_length */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 297 | |
| 298 | // Sent when the request has been completed. |
[email protected] | dcbe3df | 2014-02-06 23:08:37 | [diff] [blame] | 299 | IPC_MESSAGE_CONTROL2(ResourceMsg_RequestComplete, |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 300 | int /* request_id */, |
[email protected] | dcbe3df | 2014-02-06 23:08:37 | [diff] [blame] | 301 | ResourceMsg_RequestCompleteData) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 302 | |
| 303 | // Resource messages sent from the renderer to the browser. |
| 304 | |
| 305 | // Makes a resource request via the browser. |
[email protected] | 5636d90 | 2014-05-13 23:19:10 | [diff] [blame] | 306 | IPC_MESSAGE_CONTROL3(ResourceHostMsg_RequestResource, |
| 307 | int /* routing_id */, |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 308 | int /* request_id */, |
| 309 | ResourceHostMsg_Request) |
| 310 | |
| 311 | // Cancels a resource request with the ID given as the parameter. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 312 | IPC_MESSAGE_CONTROL1(ResourceHostMsg_CancelRequest, |
| 313 | int /* request_id */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 314 | |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 315 | // Follows a redirect that occured for the resource request with the ID given |
| 316 | // as the parameter. |
[email protected] | b97fc38 | 2014-05-14 20:06:34 | [diff] [blame] | 317 | IPC_MESSAGE_CONTROL1(ResourceHostMsg_FollowRedirect, |
| 318 | int /* request_id */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 319 | |
| 320 | // Makes a synchronous resource request via the browser. |
| 321 | IPC_SYNC_MESSAGE_ROUTED2_1(ResourceHostMsg_SyncLoad, |
| 322 | int /* request_id */, |
| 323 | ResourceHostMsg_Request, |
[email protected] | 2336ffe | 2011-11-24 01:23:34 | [diff] [blame] | 324 | content::SyncLoadResult) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 325 | |
| 326 | // Sent when the renderer process is done processing a DataReceived |
| 327 | // message. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 328 | IPC_MESSAGE_CONTROL1(ResourceHostMsg_DataReceived_ACK, |
| 329 | int /* request_id */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 330 | |
| 331 | // Sent when the renderer has processed a DataDownloaded message. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 332 | IPC_MESSAGE_CONTROL1(ResourceHostMsg_DataDownloaded_ACK, |
| 333 | int /* request_id */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 334 | |
| 335 | // Sent by the renderer process to acknowledge receipt of a |
| 336 | // UploadProgress message. |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 337 | IPC_MESSAGE_CONTROL1(ResourceHostMsg_UploadProgress_ACK, |
| 338 | int /* request_id */) |
[email protected] | 94dc971d | 2011-03-05 19:08:32 | [diff] [blame] | 339 | |
| 340 | // Sent when the renderer process deletes a resource loader. |
| 341 | IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
| 342 | int /* request_id */) |
[email protected] | a9344092d | 2013-02-27 00:56:45 | [diff] [blame] | 343 | |
| 344 | // Sent by the renderer when a resource request changes priority. |
[email protected] | ed038bf | 2014-04-07 22:02:39 | [diff] [blame] | 345 | IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
[email protected] | f465319 | 2013-09-06 19:24:05 | [diff] [blame] | 346 | int /* request_id */, |
[email protected] | ed038bf | 2014-04-07 22:02:39 | [diff] [blame] | 347 | net::RequestPriority, |
| 348 | int /* intra_priority_value */) |