OLD | NEW |
---|---|
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 // NOTE: All messages must send an |int request_id| as their first parameter. | 7 // NOTE: All messages must send an |int request_id| as their first parameter. |
8 | 8 |
9 // Multiply-included message file, hence no include guard. | 9 // Multiply-included message file, hence no include guard. |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
11 #include "base/process/process.h" | 11 #include "base/process/process.h" |
12 #include "content/common/content_param_traits_macros.h" | 12 #include "content/common/content_param_traits_macros.h" |
13 #include "content/common/navigation_params.h" | |
13 #include "content/common/resource_request_body.h" | 14 #include "content/common/resource_request_body.h" |
14 #include "content/common/service_worker/service_worker_types.h" | 15 #include "content/common/service_worker/service_worker_types.h" |
15 #include "content/public/common/common_param_traits.h" | 16 #include "content/public/common/common_param_traits.h" |
16 #include "content/public/common/resource_response.h" | 17 #include "content/public/common/resource_response.h" |
17 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
18 #include "net/base/request_priority.h" | 19 #include "net/base/request_priority.h" |
19 #include "net/http/http_response_info.h" | 20 #include "net/http/http_response_info.h" |
20 #include "net/url_request/redirect_info.h" | 21 #include "net/url_request/redirect_info.h" |
21 | 22 |
22 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 23 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_proxy) | 129 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_proxy) |
129 IPC_STRUCT_TRAITS_MEMBER(npn_negotiated_protocol) | 130 IPC_STRUCT_TRAITS_MEMBER(npn_negotiated_protocol) |
130 IPC_STRUCT_TRAITS_MEMBER(socket_address) | 131 IPC_STRUCT_TRAITS_MEMBER(socket_address) |
131 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_service_worker) | 132 IPC_STRUCT_TRAITS_MEMBER(was_fetched_via_service_worker) |
132 IPC_STRUCT_TRAITS_MEMBER(was_fallback_required_by_service_worker) | 133 IPC_STRUCT_TRAITS_MEMBER(was_fallback_required_by_service_worker) |
133 IPC_STRUCT_TRAITS_MEMBER(original_url_via_service_worker) | 134 IPC_STRUCT_TRAITS_MEMBER(original_url_via_service_worker) |
134 IPC_STRUCT_TRAITS_MEMBER(response_type_via_service_worker) | 135 IPC_STRUCT_TRAITS_MEMBER(response_type_via_service_worker) |
135 IPC_STRUCT_TRAITS_MEMBER(service_worker_start_time) | 136 IPC_STRUCT_TRAITS_MEMBER(service_worker_start_time) |
136 IPC_STRUCT_TRAITS_MEMBER(service_worker_ready_time) | 137 IPC_STRUCT_TRAITS_MEMBER(service_worker_ready_time) |
137 IPC_STRUCT_TRAITS_MEMBER(proxy_server) | 138 IPC_STRUCT_TRAITS_MEMBER(proxy_server) |
139 IPC_STRUCT_TRAITS_MEMBER(is_lofi) | |
138 IPC_STRUCT_TRAITS_END() | 140 IPC_STRUCT_TRAITS_END() |
139 | 141 |
140 IPC_STRUCT_TRAITS_BEGIN(net::RedirectInfo) | 142 IPC_STRUCT_TRAITS_BEGIN(net::RedirectInfo) |
141 IPC_STRUCT_TRAITS_MEMBER(status_code) | 143 IPC_STRUCT_TRAITS_MEMBER(status_code) |
142 IPC_STRUCT_TRAITS_MEMBER(new_method) | 144 IPC_STRUCT_TRAITS_MEMBER(new_method) |
143 IPC_STRUCT_TRAITS_MEMBER(new_url) | 145 IPC_STRUCT_TRAITS_MEMBER(new_url) |
144 IPC_STRUCT_TRAITS_MEMBER(new_first_party_for_cookies) | 146 IPC_STRUCT_TRAITS_MEMBER(new_first_party_for_cookies) |
145 IPC_STRUCT_TRAITS_MEMBER(new_referrer) | 147 IPC_STRUCT_TRAITS_MEMBER(new_referrer) |
146 IPC_STRUCT_TRAITS_END() | 148 IPC_STRUCT_TRAITS_END() |
147 | 149 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 | 262 |
261 // The following two members identify a previous request that has been | 263 // The following two members identify a previous request that has been |
262 // created before this navigation has been transferred to a new render view. | 264 // created before this navigation has been transferred to a new render view. |
263 // This serves the purpose of recycling the old request. | 265 // This serves the purpose of recycling the old request. |
264 // Unless this refers to a transferred navigation, these values are -1 and -1. | 266 // Unless this refers to a transferred navigation, these values are -1 and -1. |
265 IPC_STRUCT_MEMBER(int, transferred_request_child_id) | 267 IPC_STRUCT_MEMBER(int, transferred_request_child_id) |
266 IPC_STRUCT_MEMBER(int, transferred_request_request_id) | 268 IPC_STRUCT_MEMBER(int, transferred_request_request_id) |
267 | 269 |
268 // Whether or not we should allow the URL to download. | 270 // Whether or not we should allow the URL to download. |
269 IPC_STRUCT_MEMBER(bool, allow_download) | 271 IPC_STRUCT_MEMBER(bool, allow_download) |
272 | |
273 // Whether or not to request a LoFi version of the resource or let the browser | |
274 // decide. | |
275 IPC_STRUCT_MEMBER(int, lofi_state) | |
davidben
2015/08/27 18:53:50
This needs to be an enum, not an int. The IPC logi
megjablon
2015/08/27 23:11:02
Is there a way for an IPC struct to have enums? I
megjablon
2015/09/09 20:54:16
Done.
| |
270 IPC_STRUCT_END() | 276 IPC_STRUCT_END() |
271 | 277 |
272 // Parameters for a ResourceMsg_RequestComplete | 278 // Parameters for a ResourceMsg_RequestComplete |
273 IPC_STRUCT_BEGIN(ResourceMsg_RequestCompleteData) | 279 IPC_STRUCT_BEGIN(ResourceMsg_RequestCompleteData) |
274 // The error code. | 280 // The error code. |
275 IPC_STRUCT_MEMBER(int, error_code) | 281 IPC_STRUCT_MEMBER(int, error_code) |
276 | 282 |
277 // Was ignored by the request handler. | 283 // Was ignored by the request handler. |
278 IPC_STRUCT_MEMBER(bool, was_ignored_by_handler) | 284 IPC_STRUCT_MEMBER(bool, was_ignored_by_handler) |
279 | 285 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
394 | 400 |
395 // Sent when the renderer process deletes a resource loader. | 401 // Sent when the renderer process deletes a resource loader. |
396 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 402 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
397 int /* request_id */) | 403 int /* request_id */) |
398 | 404 |
399 // Sent by the renderer when a resource request changes priority. | 405 // Sent by the renderer when a resource request changes priority. |
400 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, | 406 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
401 int /* request_id */, | 407 int /* request_id */, |
402 net::RequestPriority, | 408 net::RequestPriority, |
403 int /* intra_priority_value */) | 409 int /* intra_priority_value */) |
OLD | NEW |