OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. |
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "platform/HTTPNames.h" | 31 #include "platform/HTTPNames.h" |
32 #include "platform/network/EncodedFormData.h" | 32 #include "platform/network/EncodedFormData.h" |
33 #include "platform/network/HTTPHeaderMap.h" | 33 #include "platform/network/HTTPHeaderMap.h" |
34 #include "platform/network/HTTPParsers.h" | 34 #include "platform/network/HTTPParsers.h" |
35 #include "platform/network/ResourceLoadPriority.h" | 35 #include "platform/network/ResourceLoadPriority.h" |
36 #include "platform/weborigin/KURL.h" | 36 #include "platform/weborigin/KURL.h" |
37 #include "platform/weborigin/Referrer.h" | 37 #include "platform/weborigin/Referrer.h" |
38 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
39 #include "public/platform/WebAddressSpace.h" | 39 #include "public/platform/WebAddressSpace.h" |
40 #include "public/platform/WebURLRequest.h" | 40 #include "public/platform/WebURLRequest.h" |
| 41 #include "wtf/OwnPtr.h" |
41 #include "wtf/RefCounted.h" | 42 #include "wtf/RefCounted.h" |
42 #include <memory> | |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 enum class WebCachePolicy; | 46 enum class WebCachePolicy; |
47 | 47 |
48 enum ResourceRequestBlockedReason { | 48 enum ResourceRequestBlockedReason { |
49 ResourceRequestBlockedReasonCSP, | 49 ResourceRequestBlockedReasonCSP, |
50 ResourceRequestBlockedReasonMixedContent, | 50 ResourceRequestBlockedReasonMixedContent, |
51 ResourceRequestBlockedReasonOrigin, | 51 ResourceRequestBlockedReasonOrigin, |
52 ResourceRequestBlockedReasonInspector, | 52 ResourceRequestBlockedReasonInspector, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 | 85 |
86 ResourceRequest(const KURL& url) | 86 ResourceRequest(const KURL& url) |
87 { | 87 { |
88 initialize(url); | 88 initialize(url); |
89 } | 89 } |
90 | 90 |
91 explicit ResourceRequest(CrossThreadResourceRequestData*); | 91 explicit ResourceRequest(CrossThreadResourceRequestData*); |
92 | 92 |
93 // Gets a copy of the data suitable for passing to another thread. | 93 // Gets a copy of the data suitable for passing to another thread. |
94 std::unique_ptr<CrossThreadResourceRequestData> copyData() const; | 94 PassOwnPtr<CrossThreadResourceRequestData> copyData() const; |
95 | 95 |
96 bool isNull() const; | 96 bool isNull() const; |
97 bool isEmpty() const; | 97 bool isEmpty() const; |
98 | 98 |
99 const KURL& url() const; | 99 const KURL& url() const; |
100 void setURL(const KURL& url); | 100 void setURL(const KURL& url); |
101 | 101 |
102 void removeCredentials(); | 102 void removeCredentials(); |
103 | 103 |
104 WebCachePolicy getCachePolicy() const; | 104 WebCachePolicy getCachePolicy() const; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 public: | 300 public: |
301 CrossThreadResourceRequestData() { } | 301 CrossThreadResourceRequestData() { } |
302 KURL m_url; | 302 KURL m_url; |
303 | 303 |
304 WebCachePolicy m_cachePolicy; | 304 WebCachePolicy m_cachePolicy; |
305 double m_timeoutInterval; | 305 double m_timeoutInterval; |
306 KURL m_firstPartyForCookies; | 306 KURL m_firstPartyForCookies; |
307 RefPtr<SecurityOrigin> m_requestorOrigin; | 307 RefPtr<SecurityOrigin> m_requestorOrigin; |
308 | 308 |
309 String m_httpMethod; | 309 String m_httpMethod; |
310 std::unique_ptr<CrossThreadHTTPHeaderMapData> m_httpHeaders; | 310 OwnPtr<CrossThreadHTTPHeaderMapData> m_httpHeaders; |
311 RefPtr<EncodedFormData> m_httpBody; | 311 RefPtr<EncodedFormData> m_httpBody; |
312 RefPtr<EncodedFormData> m_attachedCredential; | 312 RefPtr<EncodedFormData> m_attachedCredential; |
313 bool m_allowStoredCredentials; | 313 bool m_allowStoredCredentials; |
314 bool m_reportUploadProgress; | 314 bool m_reportUploadProgress; |
315 bool m_hasUserGesture; | 315 bool m_hasUserGesture; |
316 bool m_downloadToFile; | 316 bool m_downloadToFile; |
317 bool m_skipServiceWorker; | 317 bool m_skipServiceWorker; |
318 bool m_useStreamOnResponse; | 318 bool m_useStreamOnResponse; |
319 bool m_shouldResetAppCache; | 319 bool m_shouldResetAppCache; |
320 ResourceLoadPriority m_priority; | 320 ResourceLoadPriority m_priority; |
(...skipping 12 matching lines...) Expand all Loading... |
333 bool m_checkForBrowserSideNavigation; | 333 bool m_checkForBrowserSideNavigation; |
334 double m_uiStartTime; | 334 double m_uiStartTime; |
335 bool m_isExternalRequest; | 335 bool m_isExternalRequest; |
336 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; | 336 InputToLoadPerfMetricReportPolicy m_inputPerfMetricReportPolicy; |
337 ResourceRequest::RedirectStatus m_redirectStatus; | 337 ResourceRequest::RedirectStatus m_redirectStatus; |
338 }; | 338 }; |
339 | 339 |
340 } // namespace blink | 340 } // namespace blink |
341 | 341 |
342 #endif // ResourceRequest_h | 342 #endif // ResourceRequest_h |
OLD | NEW |