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.h" | 17 #include "content/common/resource_request.h" |
18 #include "content/common/resource_request_body_impl.h" | 18 #include "content/common/resource_request_body_impl.h" |
19 #include "content/common/resource_request_completion_status.h" | 19 #include "content/common/resource_request_completion_status.h" |
20 #include "content/common/service_worker/service_worker_types.h" | 20 #include "content/common/service_worker/service_worker_types.h" |
21 #include "content/public/common/common_param_traits.h" | 21 #include "content/public/common/common_param_traits.h" |
22 #include "content/public/common/resource_response.h" | 22 #include "content/public/common/resource_response.h" |
23 #include "ipc/ipc_message_macros.h" | 23 #include "ipc/ipc_message_macros.h" |
24 #include "net/base/request_priority.h" | 24 #include "net/base/request_priority.h" |
25 #include "net/cert/ct_policy_status.h" | |
25 #include "net/cert/signed_certificate_timestamp.h" | 26 #include "net/cert/signed_certificate_timestamp.h" |
26 #include "net/cert/signed_certificate_timestamp_and_status.h" | 27 #include "net/cert/signed_certificate_timestamp_and_status.h" |
27 #include "net/http/http_response_info.h" | 28 #include "net/http/http_response_info.h" |
28 #include "net/nqe/effective_connection_type.h" | 29 #include "net/nqe/effective_connection_type.h" |
30 #include "net/ssl/ssl_info.h" | |
29 #include "net/url_request/redirect_info.h" | 31 #include "net/url_request/redirect_info.h" |
30 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" | 32 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" |
31 | 33 |
32 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 34 #ifndef CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
33 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ | 35 #define CONTENT_COMMON_RESOURCE_MESSAGES_H_ |
34 | 36 |
35 namespace net { | 37 namespace net { |
36 struct LoadTimingInfo; | 38 struct LoadTimingInfo; |
37 } | 39 } |
38 | 40 |
39 namespace content { | 41 namespace content { |
40 struct ResourceDevToolsInfo; | 42 struct ResourceDevToolsInfo; |
41 } | 43 } |
42 | 44 |
43 namespace IPC { | 45 namespace IPC { |
44 | 46 |
45 template <> | 47 template <> |
46 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { | 48 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { |
47 typedef scoped_refptr<net::HttpResponseHeaders> param_type; | 49 typedef scoped_refptr<net::HttpResponseHeaders> param_type; |
48 static void GetSize(base::PickleSizer* s, const param_type& p); | 50 static void GetSize(base::PickleSizer* s, const param_type& p); |
49 static void Write(base::Pickle* m, const param_type& p); | 51 static void Write(base::Pickle* m, const param_type& p); |
50 static bool Read(const base::Pickle* m, | 52 static bool Read(const base::Pickle* m, |
51 base::PickleIterator* iter, | 53 base::PickleIterator* iter, |
52 param_type* r); | 54 param_type* r); |
53 static void Log(const param_type& p, std::string* l); | 55 static void Log(const param_type& p, std::string* l); |
54 }; | 56 }; |
55 | 57 |
56 template <> | 58 template <> |
59 struct ParamTraits<net::SSLInfo> { | |
60 typedef net::SSLInfo param_type; | |
61 static void GetSize(base::PickleSizer* s, const param_type& p); | |
62 static void Write(base::Pickle* m, const param_type& p); | |
63 static bool Read(const base::Pickle* m, | |
64 base::PickleIterator* iter, | |
65 param_type* r); | |
66 static void Log(const param_type& p, std::string* l); | |
67 }; | |
68 | |
69 template <> | |
70 struct ParamTraits<net::HashValue> { | |
71 typedef net::HashValue param_type; | |
72 static void GetSize(base::PickleSizer* s, const param_type& p); | |
73 static void Write(base::Pickle* m, const param_type& p); | |
74 static bool Read(const base::Pickle* m, | |
75 base::PickleIterator* iter, | |
76 param_type* r); | |
77 static void Log(const param_type& p, std::string* l); | |
78 }; | |
79 | |
80 template <> | |
57 struct CONTENT_EXPORT ParamTraits<storage::DataElement> { | 81 struct CONTENT_EXPORT ParamTraits<storage::DataElement> { |
58 typedef storage::DataElement param_type; | 82 typedef storage::DataElement param_type; |
59 static void GetSize(base::PickleSizer* s, const param_type& p); | 83 static void GetSize(base::PickleSizer* s, const param_type& p); |
60 static void Write(base::Pickle* m, const param_type& p); | 84 static void Write(base::Pickle* m, const param_type& p); |
61 static bool Read(const base::Pickle* m, | 85 static bool Read(const base::Pickle* m, |
62 base::PickleIterator* iter, | 86 base::PickleIterator* iter, |
63 param_type* r); | 87 param_type* r); |
64 static void Log(const param_type& p, std::string* l); | 88 static void Log(const param_type& p, std::string* l); |
65 }; | 89 }; |
66 | 90 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 | 138 |
115 | 139 |
116 #define IPC_MESSAGE_START ResourceMsgStart | 140 #define IPC_MESSAGE_START ResourceMsgStart |
117 #undef IPC_MESSAGE_EXPORT | 141 #undef IPC_MESSAGE_EXPORT |
118 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 142 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
119 | 143 |
120 IPC_ENUM_TRAITS_MAX_VALUE( \ | 144 IPC_ENUM_TRAITS_MAX_VALUE( \ |
121 net::HttpResponseInfo::ConnectionInfo, \ | 145 net::HttpResponseInfo::ConnectionInfo, \ |
122 net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS - 1) | 146 net::HttpResponseInfo::NUM_OF_CONNECTION_INFOS - 1) |
123 | 147 |
148 IPC_ENUM_TRAITS(net::TokenBindingParam) | |
dcheng
2017/04/13 21:12:15
Can we add a MAX value for this enum?
jam
2017/04/13 23:04:22
I was avoiding changing src/net for now with these
| |
149 IPC_ENUM_TRAITS(net::SSLInfo::HandshakeType) | |
dcheng
2017/04/13 21:12:15
Ditto for this and the other enums.
| |
150 IPC_ENUM_TRAITS_MAX_VALUE(net::ct::EVPolicyCompliance, | |
151 net::ct::EVPolicyCompliance::EV_POLICY_MAX) | |
152 IPC_ENUM_TRAITS(net::ct::CertPolicyCompliance) | |
153 IPC_ENUM_TRAITS(net::OCSPVerifyResult::ResponseStatus) | |
154 IPC_ENUM_TRAITS(net::OCSPRevocationStatus) | |
155 | |
124 IPC_ENUM_TRAITS_MAX_VALUE(content::FetchRequestMode, | 156 IPC_ENUM_TRAITS_MAX_VALUE(content::FetchRequestMode, |
125 content::FETCH_REQUEST_MODE_LAST) | 157 content::FETCH_REQUEST_MODE_LAST) |
126 | 158 |
127 IPC_ENUM_TRAITS_MAX_VALUE(content::FetchCredentialsMode, | 159 IPC_ENUM_TRAITS_MAX_VALUE(content::FetchCredentialsMode, |
128 content::FETCH_CREDENTIALS_MODE_LAST) | 160 content::FETCH_CREDENTIALS_MODE_LAST) |
129 | 161 |
130 IPC_ENUM_TRAITS_MAX_VALUE(content::FetchRedirectMode, | 162 IPC_ENUM_TRAITS_MAX_VALUE(content::FetchRedirectMode, |
131 content::FetchRedirectMode::LAST) | 163 content::FetchRedirectMode::LAST) |
132 | 164 |
133 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerMode, | 165 IPC_ENUM_TRAITS_MAX_VALUE(content::ServiceWorkerMode, |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 | 401 |
370 // Sent when the renderer process deletes a resource loader. | 402 // Sent when the renderer process deletes a resource loader. |
371 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, | 403 IPC_MESSAGE_CONTROL1(ResourceHostMsg_ReleaseDownloadedFile, |
372 int /* request_id */) | 404 int /* request_id */) |
373 | 405 |
374 // Sent by the renderer when a resource request changes priority. | 406 // Sent by the renderer when a resource request changes priority. |
375 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, | 407 IPC_MESSAGE_CONTROL3(ResourceHostMsg_DidChangePriority, |
376 int /* request_id */, | 408 int /* request_id */, |
377 net::RequestPriority, | 409 net::RequestPriority, |
378 int /* intra_priority_value */) | 410 int /* intra_priority_value */) |
OLD | NEW |