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/resource_request_body.h" | 13 #include "content/common/resource_request_body.h" |
| 14 #include "content/common/service_worker/service_worker_types.h" |
14 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
15 #include "content/public/common/resource_response.h" | 16 #include "content/public/common/resource_response.h" |
16 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
17 #include "net/base/request_priority.h" | 18 #include "net/base/request_priority.h" |
18 #include "net/http/http_response_info.h" | 19 #include "net/http/http_response_info.h" |
19 #include "net/url_request/redirect_info.h" | 20 #include "net/url_request/redirect_info.h" |
20 | 21 |
21 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 22 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
22 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 23 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
23 | 24 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 78 |
78 | 79 |
79 #define IPC_MESSAGE_START ResourceMsgStart | 80 #define IPC_MESSAGE_START ResourceMsgStart |
80 #undef IPC_MESSAGE_EXPORT | 81 #undef IPC_MESSAGE_EXPORT |
81 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 82 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
82 | 83 |
83 IPC_ENUM_TRAITS_MAX_VALUE( \ | 84 IPC_ENUM_TRAITS_MAX_VALUE( \ |
84 net::HttpResponseInfo::ConnectionInfo, \ | 85 net::HttpResponseInfo::ConnectionInfo, \ |
85 net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS - 1) | 86 net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS - 1) |
86 | 87 |
| 88 IPC_ENUM_TRAITS_MAX_VALUE(content::FetchRequestMode, |
| 89 content::FETCH_REQUEST_MODE_LAST) |
| 90 |
87 IPC_STRUCT_TRAITS_BEGIN(content::ResourceResponseHead) | 91 IPC_STRUCT_TRAITS_BEGIN(content::ResourceResponseHead) |
88 IPC_STRUCT_TRAITS_PARENT(content::ResourceResponseInfo) | 92 IPC_STRUCT_TRAITS_PARENT(content::ResourceResponseInfo) |
89 IPC_STRUCT_TRAITS_MEMBER(request_start) | 93 IPC_STRUCT_TRAITS_MEMBER(request_start) |
90 IPC_STRUCT_TRAITS_MEMBER(response_start) | 94 IPC_STRUCT_TRAITS_MEMBER(response_start) |
91 IPC_STRUCT_TRAITS_END() | 95 IPC_STRUCT_TRAITS_END() |
92 | 96 |
93 IPC_STRUCT_TRAITS_BEGIN(content::SyncLoadResult) | 97 IPC_STRUCT_TRAITS_BEGIN(content::SyncLoadResult) |
94 IPC_STRUCT_TRAITS_PARENT(content::ResourceResponseHead) | 98 IPC_STRUCT_TRAITS_PARENT(content::ResourceResponseHead) |
95 IPC_STRUCT_TRAITS_MEMBER(error_code) | 99 IPC_STRUCT_TRAITS_MEMBER(error_code) |
96 IPC_STRUCT_TRAITS_MEMBER(final_url) | 100 IPC_STRUCT_TRAITS_MEMBER(final_url) |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // or kAppCacheNoHostId. | 188 // or kAppCacheNoHostId. |
185 IPC_STRUCT_MEMBER(int, appcache_host_id) | 189 IPC_STRUCT_MEMBER(int, appcache_host_id) |
186 | 190 |
187 // Indicates which frame (or worker context) the request is being loaded into, | 191 // Indicates which frame (or worker context) the request is being loaded into, |
188 // or kInvalidServiceWorkerProviderId. | 192 // or kInvalidServiceWorkerProviderId. |
189 IPC_STRUCT_MEMBER(int, service_worker_provider_id) | 193 IPC_STRUCT_MEMBER(int, service_worker_provider_id) |
190 | 194 |
191 // True if the request should not be handled by the ServiceWorker. | 195 // True if the request should not be handled by the ServiceWorker. |
192 IPC_STRUCT_MEMBER(bool, skip_service_worker) | 196 IPC_STRUCT_MEMBER(bool, skip_service_worker) |
193 | 197 |
| 198 // The request mode passed to the ServiceWorker. |
| 199 IPC_STRUCT_MEMBER(content::FetchRequestMode, fetch_request_mode) |
| 200 |
194 // Optional resource request body (may be null). | 201 // Optional resource request body (may be null). |
195 IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>, | 202 IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>, |
196 request_body) | 203 request_body) |
197 | 204 |
198 IPC_STRUCT_MEMBER(bool, download_to_file) | 205 IPC_STRUCT_MEMBER(bool, download_to_file) |
199 | 206 |
200 // True if the request was user initiated. | 207 // True if the request was user initiated. |
201 IPC_STRUCT_MEMBER(bool, has_user_gesture) | 208 IPC_STRUCT_MEMBER(bool, has_user_gesture) |
202 | 209 |
203 // True if load timing data should be collected for request. | 210 // True if load timing data should be collected for request. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 365 |
359 // Sent when the renderer process deletes a resource loader. | 366 // Sent when the renderer process deletes a resource loader. |
360 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 367 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
361 int /* request_id */) | 368 int /* request_id */) |
362 | 369 |
363 // Sent by the renderer when a resource request changes priority. | 370 // Sent by the renderer when a resource request changes priority. |
364 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, | 371 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
365 int /* request_id */, | 372 int /* request_id */, |
366 net::RequestPriority, | 373 net::RequestPriority, |
367 int /* intra_priority_value */) | 374 int /* intra_priority_value */) |
OLD | NEW |