OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_CHILD_REQUEST_INFO_H_ | 5 #ifndef CONTENT_CHILD_REQUEST_INFO_H_ |
6 #define CONTENT_CHILD_REQUEST_INFO_H_ | 6 #define CONTENT_CHILD_REQUEST_INFO_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/service_worker/service_worker_types.h" | 13 #include "content/common/service_worker/service_worker_types.h" |
14 #include "content/public/common/referrer.h" | 14 #include "content/public/common/referrer.h" |
15 #include "content/public/common/request_context_frame_type.h" | 15 #include "content/public/common/request_context_frame_type.h" |
16 #include "content/public/common/request_context_type.h" | 16 #include "content/public/common/request_context_type.h" |
17 #include "content/public/common/resource_type.h" | 17 #include "content/public/common/resource_type.h" |
18 #include "net/base/request_priority.h" | 18 #include "net/base/request_priority.h" |
19 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 19 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
20 #include "third_party/WebKit/public/platform/WebTaskRunner.h" | 20 #include "third_party/WebKit/public/platform/WebTaskRunner.h" |
21 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 21 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 23 #include "url/origin.h" |
23 | 24 |
24 namespace blink { | 25 namespace blink { |
25 class WebTaskRunner; | 26 class WebTaskRunner; |
26 } // namespace blink | 27 } // namespace blink |
27 | 28 |
28 namespace content { | 29 namespace content { |
29 | 30 |
30 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader(). | 31 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader(). |
31 struct CONTENT_EXPORT RequestInfo { | 32 struct CONTENT_EXPORT RequestInfo { |
32 RequestInfo(); | 33 RequestInfo(); |
33 ~RequestInfo(); | 34 ~RequestInfo(); |
34 | 35 |
35 // HTTP-style method name (e.g., "GET" or "POST"). | 36 // HTTP-style method name (e.g., "GET" or "POST"). |
36 std::string method; | 37 std::string method; |
37 | 38 |
38 // Absolute URL encoded in ASCII per the rules of RFC-2396. | 39 // Absolute URL encoded in ASCII per the rules of RFC-2396. |
39 GURL url; | 40 GURL url; |
40 | 41 |
41 // URL of the document in the top-level window, which may be checked by the | 42 // URL representing the first-party origin for the request, which may be |
42 // third-party cookie blocking policy. | 43 // checked by the third-party cookie blocking policy. |
43 GURL first_party_for_cookies; | 44 GURL first_party_for_cookies; |
44 | 45 |
| 46 // The origin of the context which initiated the request. |
| 47 url::Origin request_initiator; |
| 48 |
45 // Optional parameter, the referrer to use for the request for the url member. | 49 // Optional parameter, the referrer to use for the request for the url member. |
46 Referrer referrer; | 50 Referrer referrer; |
47 | 51 |
48 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and | 52 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and |
49 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using | 53 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using |
50 // the standard MIME header encoding rules. The headers parameter can also | 54 // the standard MIME header encoding rules. The headers parameter can also |
51 // be null if no extra request headers need to be set. | 55 // be null if no extra request headers need to be set. |
52 std::string headers; | 56 std::string headers; |
53 | 57 |
54 // Composed of the values defined in url_request_load_flags.h. | 58 // Composed of the values defined in url_request_load_flags.h. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // Optional, the specific task queue to execute loading tasks on. | 122 // Optional, the specific task queue to execute loading tasks on. |
119 scoped_ptr<blink::WebTaskRunner> loading_web_task_runner; | 123 scoped_ptr<blink::WebTaskRunner> loading_web_task_runner; |
120 | 124 |
121 private: | 125 private: |
122 DISALLOW_COPY_AND_ASSIGN(RequestInfo); | 126 DISALLOW_COPY_AND_ASSIGN(RequestInfo); |
123 }; | 127 }; |
124 | 128 |
125 } // namespace content | 129 } // namespace content |
126 | 130 |
127 #endif // CONTENT_CHILD_REQUEST_INFO_H_ | 131 #endif // CONTENT_CHILD_REQUEST_INFO_H_ |
OLD | NEW |