OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebURLRequest_h | 31 #ifndef WebURLRequest_h |
32 #define WebURLRequest_h | 32 #define WebURLRequest_h |
33 | 33 |
34 #include "WebAddressSpace.h" | 34 #include "WebAddressSpace.h" |
35 #include "WebCommon.h" | 35 #include "WebCommon.h" |
36 #include "WebHTTPBody.h" | 36 #include "WebHTTPBody.h" |
| 37 #include "WebInsecureRequestPolicy.h" |
37 #include "WebReferrerPolicy.h" | 38 #include "WebReferrerPolicy.h" |
38 #include <memory> | 39 #include <memory> |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 class ResourceRequest; | 43 class ResourceRequest; |
43 class WebHTTPBody; | 44 class WebHTTPBody; |
44 class WebHTTPHeaderVisitor; | 45 class WebHTTPHeaderVisitor; |
45 class WebSecurityOrigin; | 46 class WebSecurityOrigin; |
46 class WebString; | 47 class WebString; |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 BLINK_PLATFORM_EXPORT void setInputPerfMetricReportPolicy( | 320 BLINK_PLATFORM_EXPORT void setInputPerfMetricReportPolicy( |
320 WebURLRequest::InputToLoadPerfMetricReportPolicy); | 321 WebURLRequest::InputToLoadPerfMetricReportPolicy); |
321 | 322 |
322 // https://mikewest.github.io/cors-rfc1918/#external-request | 323 // https://mikewest.github.io/cors-rfc1918/#external-request |
323 BLINK_PLATFORM_EXPORT bool isExternalRequest() const; | 324 BLINK_PLATFORM_EXPORT bool isExternalRequest() const; |
324 | 325 |
325 BLINK_PLATFORM_EXPORT LoadingIPCType getLoadingIPCType() const; | 326 BLINK_PLATFORM_EXPORT LoadingIPCType getLoadingIPCType() const; |
326 | 327 |
327 BLINK_PLATFORM_EXPORT void setNavigationStartTime(double); | 328 BLINK_PLATFORM_EXPORT void setNavigationStartTime(double); |
328 | 329 |
| 330 // Returns whether the insecure requests should be left as it is, upgraded or |
| 331 // blocked. |
| 332 BLINK_PLATFORM_EXPORT blink::WebInsecureRequestPolicy insecureRequestPolicy() |
| 333 const; |
| 334 |
329 #if INSIDE_BLINK | 335 #if INSIDE_BLINK |
330 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); | 336 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); |
331 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; | 337 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; |
332 | 338 |
333 protected: | 339 protected: |
334 // Permit subclasses to set arbitrary ResourceRequest pointer as | 340 // Permit subclasses to set arbitrary ResourceRequest pointer as |
335 // |m_resourceRequest|. |m_ownedResourceRequest| is not set in this case. | 341 // |m_resourceRequest|. |m_ownedResourceRequest| is not set in this case. |
336 BLINK_PLATFORM_EXPORT explicit WebURLRequest(ResourceRequest&); | 342 BLINK_PLATFORM_EXPORT explicit WebURLRequest(ResourceRequest&); |
337 #endif | 343 #endif |
338 | 344 |
339 private: | 345 private: |
340 struct ResourceRequestContainer; | 346 struct ResourceRequestContainer; |
341 | 347 |
342 // If this instance owns a ResourceRequest then |m_ownedResourceRequest| | 348 // If this instance owns a ResourceRequest then |m_ownedResourceRequest| |
343 // is non-null and |m_resourceRequest| points to the ResourceRequest | 349 // is non-null and |m_resourceRequest| points to the ResourceRequest |
344 // instance it contains. | 350 // instance it contains. |
345 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; | 351 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; |
346 | 352 |
347 // Should never be null. | 353 // Should never be null. |
348 ResourceRequest* m_resourceRequest; | 354 ResourceRequest* m_resourceRequest; |
349 }; | 355 }; |
350 | 356 |
351 } // namespace blink | 357 } // namespace blink |
352 | 358 |
353 #endif | 359 #endif |
OLD | NEW |