| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 // Used to report performance metrics timed from the UI action that | 130 // Used to report performance metrics timed from the UI action that |
| 131 // triggered them (as opposed to navigation start time used in the | 131 // triggered them (as opposed to navigation start time used in the |
| 132 // Navigation Timing API). | 132 // Navigation Timing API). |
| 133 enum InputToLoadPerfMetricReportPolicy { | 133 enum InputToLoadPerfMetricReportPolicy { |
| 134 NoReport, // Don't report metrics for this WebURLRequest. | 134 NoReport, // Don't report metrics for this WebURLRequest. |
| 135 ReportLink, // Report metrics with UI action link clicked. | 135 ReportLink, // Report metrics with UI action link clicked. |
| 136 ReportIntent, // Report metrics with UI action displayed intent. | 136 ReportIntent, // Report metrics with UI action displayed intent. |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 // The LoFi state which determines whether to request a Lo-Fi version of the | 139 // The Previews state which determines whether to request a Preview version of |
| 140 // resource. | 140 // the resource. |
| 141 enum LoFiState { | 141 enum PreviewsState { |
| 142 LoFiUnspecified, // Let the browser process decide whether or not to | 142 PreviewsUnspecified = 0, // Let the browser process decide whether or |
| 143 // request the Lo-Fi version. | 143 // not to request Preview types. |
| 144 LoFiOff, // Request a normal (non-Lo-Fi) version of the resource. | 144 ServerLoFiOn = 1 << 0, // Request a Lo-Fi version of the resource |
| 145 LoFiOn, // Request a Lo-Fi version of the resource. | 145 // from the server. |
| 146 ClientLoFiOn = 1 << 1, // Request a Lo-Fi version of the resource |
| 147 // from the client. |
| 148 PreviewsOff = 1 << 2, // Request a normal (non-Preview) version of |
| 149 // the resource. |
| 150 PreviewsStateLast = PreviewsOff |
| 146 }; | 151 }; |
| 147 | 152 |
| 148 // Indicates which types of ServiceWorkers should skip handling this request. | 153 // Indicates which types of ServiceWorkers should skip handling this request. |
| 149 enum class SkipServiceWorker { | 154 enum class SkipServiceWorker { |
| 150 // Request can be handled both by a controlling same-origin worker and | 155 // Request can be handled both by a controlling same-origin worker and |
| 151 // a cross-origin foreign fetch service worker. | 156 // a cross-origin foreign fetch service worker. |
| 152 None, | 157 None, |
| 153 // Request should not be handled by a same-origin controlling worker, | 158 // Request should not be handled by a same-origin controlling worker, |
| 154 // but can be intercepted by a foreign fetch service worker. | 159 // but can be intercepted by a foreign fetch service worker. |
| 155 Controlling, | 160 Controlling, |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); | 283 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); |
| 279 | 284 |
| 280 // The credentials mode which will be passed to the ServiceWorker. | 285 // The credentials mode which will be passed to the ServiceWorker. |
| 281 BLINK_PLATFORM_EXPORT FetchCredentialsMode getFetchCredentialsMode() const; | 286 BLINK_PLATFORM_EXPORT FetchCredentialsMode getFetchCredentialsMode() const; |
| 282 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode); | 287 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode); |
| 283 | 288 |
| 284 // The redirect mode which is used in Fetch API. | 289 // The redirect mode which is used in Fetch API. |
| 285 BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const; | 290 BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const; |
| 286 BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode); | 291 BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode); |
| 287 | 292 |
| 288 // The LoFi state which determines whether to request a Lo-Fi version of the | 293 // The Previews state which determines whether to request a Preview version of |
| 289 // resource. | 294 // the resource. |
| 290 BLINK_PLATFORM_EXPORT LoFiState getLoFiState() const; | 295 BLINK_PLATFORM_EXPORT PreviewsState getPreviewsState() const; |
| 291 BLINK_PLATFORM_EXPORT void setLoFiState(LoFiState); | 296 BLINK_PLATFORM_EXPORT void setPreviewsState(PreviewsState); |
| 292 | 297 |
| 293 // Extra data associated with the underlying resource request. Resource | 298 // Extra data associated with the underlying resource request. Resource |
| 294 // requests can be copied. If non-null, each copy of a resource requests | 299 // requests can be copied. If non-null, each copy of a resource requests |
| 295 // holds a pointer to the extra data, and the extra data pointer will be | 300 // holds a pointer to the extra data, and the extra data pointer will be |
| 296 // deleted when the last resource request is destroyed. Setting the extra | 301 // deleted when the last resource request is destroyed. Setting the extra |
| 297 // data pointer will cause the underlying resource request to be | 302 // data pointer will cause the underlying resource request to be |
| 298 // dissociated from any existing non-null extra data pointer. | 303 // dissociated from any existing non-null extra data pointer. |
| 299 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; | 304 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; |
| 300 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 305 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 301 | 306 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // instance it contains. | 349 // instance it contains. |
| 345 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; | 350 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; |
| 346 | 351 |
| 347 // Should never be null. | 352 // Should never be null. |
| 348 ResourceRequest* m_resourceRequest; | 353 ResourceRequest* m_resourceRequest; |
| 349 }; | 354 }; |
| 350 | 355 |
| 351 } // namespace blink | 356 } // namespace blink |
| 352 | 357 |
| 353 #endif | 358 #endif |
| OLD | NEW |