| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // Request can be handled both by a controlling same-origin worker and | 146 // Request can be handled both by a controlling same-origin worker and |
| 147 // a cross-origin foreign fetch service worker. | 147 // a cross-origin foreign fetch service worker. |
| 148 None, | 148 None, |
| 149 // Request should not be handled by a same-origin controlling worker, | 149 // Request should not be handled by a same-origin controlling worker, |
| 150 // but can be intercepted by a foreign fetch service worker. | 150 // but can be intercepted by a foreign fetch service worker. |
| 151 Controlling, | 151 Controlling, |
| 152 // Request should skip all possible service workers. | 152 // Request should skip all possible service workers. |
| 153 All | 153 All |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 enum class LoadingIPCType { |
| 157 ChromeIPC, |
| 158 Mojo, |
| 159 }; |
| 160 |
| 156 class ExtraData { | 161 class ExtraData { |
| 157 public: | 162 public: |
| 158 virtual ~ExtraData() { } | 163 virtual ~ExtraData() { } |
| 159 }; | 164 }; |
| 160 | 165 |
| 161 BLINK_PLATFORM_EXPORT ~WebURLRequest(); | 166 BLINK_PLATFORM_EXPORT ~WebURLRequest(); |
| 162 BLINK_PLATFORM_EXPORT WebURLRequest(); | 167 BLINK_PLATFORM_EXPORT WebURLRequest(); |
| 163 BLINK_PLATFORM_EXPORT WebURLRequest(const WebURLRequest&); | 168 BLINK_PLATFORM_EXPORT WebURLRequest(const WebURLRequest&); |
| 164 BLINK_PLATFORM_EXPORT explicit WebURLRequest(const WebURL&); | 169 BLINK_PLATFORM_EXPORT explicit WebURLRequest(const WebURL&); |
| 165 BLINK_PLATFORM_EXPORT WebURLRequest& operator=(const WebURLRequest&); | 170 BLINK_PLATFORM_EXPORT WebURLRequest& operator=(const WebURLRequest&); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // that triggered the navigation (which can be different from the navigation | 304 // that triggered the navigation (which can be different from the navigation |
| 300 // start time used in the Navigation Timing API). | 305 // start time used in the Navigation Timing API). |
| 301 BLINK_PLATFORM_EXPORT double uiStartTime() const; | 306 BLINK_PLATFORM_EXPORT double uiStartTime() const; |
| 302 BLINK_PLATFORM_EXPORT void setUiStartTime(double); | 307 BLINK_PLATFORM_EXPORT void setUiStartTime(double); |
| 303 BLINK_PLATFORM_EXPORT WebURLRequest::InputToLoadPerfMetricReportPolicy input
PerfMetricReportPolicy() const; | 308 BLINK_PLATFORM_EXPORT WebURLRequest::InputToLoadPerfMetricReportPolicy input
PerfMetricReportPolicy() const; |
| 304 BLINK_PLATFORM_EXPORT void setInputPerfMetricReportPolicy(WebURLRequest::Inp
utToLoadPerfMetricReportPolicy); | 309 BLINK_PLATFORM_EXPORT void setInputPerfMetricReportPolicy(WebURLRequest::Inp
utToLoadPerfMetricReportPolicy); |
| 305 | 310 |
| 306 // https://mikewest.github.io/cors-rfc1918/#external-request | 311 // https://mikewest.github.io/cors-rfc1918/#external-request |
| 307 BLINK_PLATFORM_EXPORT bool isExternalRequest() const; | 312 BLINK_PLATFORM_EXPORT bool isExternalRequest() const; |
| 308 | 313 |
| 314 BLINK_PLATFORM_EXPORT LoadingIPCType getLoadingIPCType() const; |
| 315 |
| 309 #if INSIDE_BLINK | 316 #if INSIDE_BLINK |
| 310 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); | 317 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); |
| 311 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; | 318 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; |
| 312 | 319 |
| 313 protected: | 320 protected: |
| 314 // Permit subclasses to set arbitrary ResourceRequest pointer as | 321 // Permit subclasses to set arbitrary ResourceRequest pointer as |
| 315 // |m_resourceRequest|. |m_ownedResourceRequest| is not set in this case. | 322 // |m_resourceRequest|. |m_ownedResourceRequest| is not set in this case. |
| 316 BLINK_PLATFORM_EXPORT explicit WebURLRequest(ResourceRequest&); | 323 BLINK_PLATFORM_EXPORT explicit WebURLRequest(ResourceRequest&); |
| 317 #endif | 324 #endif |
| 318 | 325 |
| 319 private: | 326 private: |
| 320 struct ResourceRequestContainer; | 327 struct ResourceRequestContainer; |
| 321 | 328 |
| 322 // If this instance owns a ResourceRequest then |m_ownedResourceRequest| | 329 // If this instance owns a ResourceRequest then |m_ownedResourceRequest| |
| 323 // is non-null and |m_resourceRequest| points to the ResourceRequest | 330 // is non-null and |m_resourceRequest| points to the ResourceRequest |
| 324 // instance it contains. | 331 // instance it contains. |
| 325 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; | 332 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; |
| 326 | 333 |
| 327 // Should never be null. | 334 // Should never be null. |
| 328 ResourceRequest* m_resourceRequest; | 335 ResourceRequest* m_resourceRequest; |
| 329 }; | 336 }; |
| 330 | 337 |
| 331 } // namespace blink | 338 } // namespace blink |
| 332 | 339 |
| 333 #endif | 340 #endif |
| OLD | NEW |