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 | 10 |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 | 12 |
13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
14 #include "base/process/process.h" | 14 #include "base/process/process.h" |
15 #include "content/common/content_param_traits_macros.h" | 15 #include "content/common/content_param_traits_macros.h" |
16 #include "content/common/navigation_params.h" | 16 #include "content/common/navigation_params.h" |
17 #include "content/common/resource_request_body.h" | 17 #include "content/common/resource_request_body.h" |
18 #include "content/common/service_worker/service_worker_types.h" | 18 #include "content/common/service_worker/service_worker_types.h" |
19 #include "content/public/common/common_param_traits.h" | 19 #include "content/public/common/common_param_traits.h" |
20 #include "content/public/common/resource_response.h" | 20 #include "content/public/common/resource_response.h" |
21 #include "ipc/ipc_message_macros.h" | 21 #include "ipc/ipc_message_macros.h" |
22 #include "net/base/request_priority.h" | 22 #include "net/base/request_priority.h" |
| 23 #include "net/cert/signed_certificate_timestamp.h" |
23 #include "net/http/http_response_info.h" | 24 #include "net/http/http_response_info.h" |
24 #include "net/nqe/network_quality_estimator.h" | 25 #include "net/nqe/network_quality_estimator.h" |
| 26 #include "net/ssl/signed_certificate_timestamp_and_status.h" |
25 #include "net/url_request/redirect_info.h" | 27 #include "net/url_request/redirect_info.h" |
26 | 28 |
27 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 29 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
28 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 30 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
29 | 31 |
30 namespace net { | 32 namespace net { |
31 struct LoadTimingInfo; | 33 struct LoadTimingInfo; |
32 } | 34 } |
33 | 35 |
34 namespace content { | 36 namespace content { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { | 87 struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { |
86 typedef scoped_refptr<content::ResourceRequestBody> param_type; | 88 typedef scoped_refptr<content::ResourceRequestBody> param_type; |
87 static void GetSize(base::PickleSizer* s, const param_type& p); | 89 static void GetSize(base::PickleSizer* s, const param_type& p); |
88 static void Write(base::Pickle* m, const param_type& p); | 90 static void Write(base::Pickle* m, const param_type& p); |
89 static bool Read(const base::Pickle* m, | 91 static bool Read(const base::Pickle* m, |
90 base::PickleIterator* iter, | 92 base::PickleIterator* iter, |
91 param_type* r); | 93 param_type* r); |
92 static void Log(const param_type& p, std::string* l); | 94 static void Log(const param_type& p, std::string* l); |
93 }; | 95 }; |
94 | 96 |
| 97 template <> |
| 98 struct ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>> { |
| 99 typedef scoped_refptr<net::ct::SignedCertificateTimestamp> param_type; |
| 100 static void GetSize(base::PickleSizer* s, const param_type& p); |
| 101 static void Write(base::Pickle* m, const param_type& p); |
| 102 static bool Read(const base::Pickle* m, |
| 103 base::PickleIterator* iter, |
| 104 param_type* r); |
| 105 static void Log(const param_type& p, std::string* l); |
| 106 }; |
| 107 |
95 } // namespace IPC | 108 } // namespace IPC |
96 | 109 |
97 #endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 110 #endif // CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
98 | 111 |
99 | 112 |
100 #define IPC_MESSAGE_START ResourceMsgStart | 113 #define IPC_MESSAGE_START ResourceMsgStart |
101 #undef IPC_MESSAGE_EXPORT | 114 #undef IPC_MESSAGE_EXPORT |
102 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 115 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
103 | 116 |
104 IPC_ENUM_TRAITS_MAX_VALUE( \ | 117 IPC_ENUM_TRAITS_MAX_VALUE( \ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 IPC_STRUCT_TRAITS_MEMBER(was_fallback_required_by_service_worker) | 170 IPC_STRUCT_TRAITS_MEMBER(was_fallback_required_by_service_worker) |
158 IPC_STRUCT_TRAITS_MEMBER(original_url_via_service_worker) | 171 IPC_STRUCT_TRAITS_MEMBER(original_url_via_service_worker) |
159 IPC_STRUCT_TRAITS_MEMBER(response_type_via_service_worker) | 172 IPC_STRUCT_TRAITS_MEMBER(response_type_via_service_worker) |
160 IPC_STRUCT_TRAITS_MEMBER(service_worker_start_time) | 173 IPC_STRUCT_TRAITS_MEMBER(service_worker_start_time) |
161 IPC_STRUCT_TRAITS_MEMBER(service_worker_ready_time) | 174 IPC_STRUCT_TRAITS_MEMBER(service_worker_ready_time) |
162 IPC_STRUCT_TRAITS_MEMBER(is_in_cache_storage) | 175 IPC_STRUCT_TRAITS_MEMBER(is_in_cache_storage) |
163 IPC_STRUCT_TRAITS_MEMBER(cache_storage_cache_name) | 176 IPC_STRUCT_TRAITS_MEMBER(cache_storage_cache_name) |
164 IPC_STRUCT_TRAITS_MEMBER(proxy_server) | 177 IPC_STRUCT_TRAITS_MEMBER(proxy_server) |
165 IPC_STRUCT_TRAITS_MEMBER(is_using_lofi) | 178 IPC_STRUCT_TRAITS_MEMBER(is_using_lofi) |
166 IPC_STRUCT_TRAITS_MEMBER(effective_connection_type) | 179 IPC_STRUCT_TRAITS_MEMBER(effective_connection_type) |
| 180 IPC_STRUCT_TRAITS_MEMBER(signed_certificate_timestamps) |
167 IPC_STRUCT_TRAITS_END() | 181 IPC_STRUCT_TRAITS_END() |
168 | 182 |
169 IPC_STRUCT_TRAITS_BEGIN(net::RedirectInfo) | 183 IPC_STRUCT_TRAITS_BEGIN(net::RedirectInfo) |
170 IPC_STRUCT_TRAITS_MEMBER(status_code) | 184 IPC_STRUCT_TRAITS_MEMBER(status_code) |
171 IPC_STRUCT_TRAITS_MEMBER(new_method) | 185 IPC_STRUCT_TRAITS_MEMBER(new_method) |
172 IPC_STRUCT_TRAITS_MEMBER(new_url) | 186 IPC_STRUCT_TRAITS_MEMBER(new_url) |
173 IPC_STRUCT_TRAITS_MEMBER(new_first_party_for_cookies) | 187 IPC_STRUCT_TRAITS_MEMBER(new_first_party_for_cookies) |
174 IPC_STRUCT_TRAITS_MEMBER(new_referrer) | 188 IPC_STRUCT_TRAITS_MEMBER(new_referrer) |
175 IPC_STRUCT_TRAITS_MEMBER(referred_token_binding_host) | 189 IPC_STRUCT_TRAITS_MEMBER(referred_token_binding_host) |
176 IPC_STRUCT_TRAITS_END() | 190 IPC_STRUCT_TRAITS_END() |
177 | 191 |
| 192 IPC_STRUCT_TRAITS_BEGIN(net::SignedCertificateTimestampAndStatus) |
| 193 IPC_STRUCT_TRAITS_MEMBER(sct) |
| 194 IPC_STRUCT_TRAITS_MEMBER(status) |
| 195 IPC_STRUCT_TRAITS_END() |
| 196 |
| 197 IPC_ENUM_TRAITS_MAX_VALUE(net::ct::SCTVerifyStatus, net::ct::SCT_STATUS_MAX) |
| 198 |
178 // Parameters for a resource request. | 199 // Parameters for a resource request. |
179 IPC_STRUCT_BEGIN(ResourceHostMsg_Request) | 200 IPC_STRUCT_BEGIN(ResourceHostMsg_Request) |
180 // The request method: GET, POST, etc. | 201 // The request method: GET, POST, etc. |
181 IPC_STRUCT_MEMBER(std::string, method) | 202 IPC_STRUCT_MEMBER(std::string, method) |
182 | 203 |
183 // The requested URL. | 204 // The requested URL. |
184 IPC_STRUCT_MEMBER(GURL, url) | 205 IPC_STRUCT_MEMBER(GURL, url) |
185 | 206 |
186 // Usually the URL of the document in the top-level window, which may be | 207 // Usually the URL of the document in the top-level window, which may be |
187 // checked by the third-party cookie blocking policy. Leaving it empty may | 208 // checked by the third-party cookie blocking policy. Leaving it empty may |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 473 |
453 // Sent when the renderer process deletes a resource loader. | 474 // Sent when the renderer process deletes a resource loader. |
454 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 475 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
455 int /* request_id */) | 476 int /* request_id */) |
456 | 477 |
457 // Sent by the renderer when a resource request changes priority. | 478 // Sent by the renderer when a resource request changes priority. |
458 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, | 479 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
459 int /* request_id */, | 480 int /* request_id */, |
460 net::RequestPriority, | 481 net::RequestPriority, |
461 int /* intra_priority_value */) | 482 int /* intra_priority_value */) |
OLD | NEW |