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 ClientLoFiOn = 1 << 1, // Request a Lo-Fi version of the resource | 146 ClientLoFiOn = 1 << 1, // Request a Lo-Fi version of the resource |
147 // from the client. | 147 // from the client. |
148 PreviewsNoTransform = 1 << 2, // Explicitly forbid Previews | 148 PreviewsNoTransform = 1 << 2, // Explicitly forbid Previews |
149 // transformations. | 149 // transformations. |
150 PreviewsOff = 1 << 3, // Request a normal (non-Preview) version of | 150 PreviewsOff = 1 << 3, // Request a normal (non-Preview) version of |
151 // the resource. Server transformations may | 151 // the resource. Server transformations may |
152 // still happen if the page is heavy. | 152 // still happen if the page is heavy. |
153 PreviewsStateLast = PreviewsOff | 153 PreviewsStateLast = PreviewsOff |
154 }; | 154 }; |
155 | 155 |
156 // Indicates which types of ServiceWorkers should skip handling this request. | 156 // Indicates which service workers will receive fetch events for this request. |
157 enum class SkipServiceWorker { | 157 enum class ServiceWorkerMode { |
158 // Request can be handled both by a controlling same-origin worker and | 158 // Relevant local and foreign service workers will get a fetch or |
159 // a cross-origin foreign fetch service worker. | 159 // foreignfetch event for this request. |
160 None, | 160 All, |
161 // Request should not be handled by a same-origin controlling worker, | 161 // Only relevant foreign service workers will get a foreignfetch event for |
162 // but can be intercepted by a foreign fetch service worker. | 162 // this request. |
163 Controlling, | 163 Foreign, |
164 // Request should skip all possible service workers. | 164 // Neither local nor foreign service workers will get events for this |
165 All | 165 // request. |
| 166 None |
166 }; | 167 }; |
167 | 168 |
168 enum class LoadingIPCType { | 169 enum class LoadingIPCType { |
169 ChromeIPC, | 170 ChromeIPC, |
170 Mojo, | 171 Mojo, |
171 }; | 172 }; |
172 | 173 |
173 class ExtraData { | 174 class ExtraData { |
174 public: | 175 public: |
175 virtual ~ExtraData() {} | 176 virtual ~ExtraData() {} |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 267 |
267 // If true, the response body will be downloaded to a file managed by the | 268 // If true, the response body will be downloaded to a file managed by the |
268 // WebURLLoader. See WebURLResponse::downloadedFilePath. | 269 // WebURLLoader. See WebURLResponse::downloadedFilePath. |
269 BLINK_PLATFORM_EXPORT bool downloadToFile() const; | 270 BLINK_PLATFORM_EXPORT bool downloadToFile() const; |
270 BLINK_PLATFORM_EXPORT void setDownloadToFile(bool); | 271 BLINK_PLATFORM_EXPORT void setDownloadToFile(bool); |
271 | 272 |
272 // True if the requestor wants to receive the response body as a stream. | 273 // True if the requestor wants to receive the response body as a stream. |
273 BLINK_PLATFORM_EXPORT bool useStreamOnResponse() const; | 274 BLINK_PLATFORM_EXPORT bool useStreamOnResponse() const; |
274 BLINK_PLATFORM_EXPORT void setUseStreamOnResponse(bool); | 275 BLINK_PLATFORM_EXPORT void setUseStreamOnResponse(bool); |
275 | 276 |
276 // True if the request should not be handled by the ServiceWorker. | 277 // The service worker mode indicating which service workers should get events |
277 BLINK_PLATFORM_EXPORT SkipServiceWorker skipServiceWorker() const; | 278 // for this request. |
278 BLINK_PLATFORM_EXPORT void setSkipServiceWorker(SkipServiceWorker); | 279 BLINK_PLATFORM_EXPORT ServiceWorkerMode getServiceWorkerMode() const; |
| 280 BLINK_PLATFORM_EXPORT void setServiceWorkerMode(ServiceWorkerMode); |
279 | 281 |
280 // True if corresponding AppCache group should be resetted. | 282 // True if corresponding AppCache group should be resetted. |
281 BLINK_PLATFORM_EXPORT bool shouldResetAppCache() const; | 283 BLINK_PLATFORM_EXPORT bool shouldResetAppCache() const; |
282 BLINK_PLATFORM_EXPORT void setShouldResetAppCache(bool); | 284 BLINK_PLATFORM_EXPORT void setShouldResetAppCache(bool); |
283 | 285 |
284 // The request mode which will be passed to the ServiceWorker. | 286 // The request mode which will be passed to the ServiceWorker. |
285 BLINK_PLATFORM_EXPORT FetchRequestMode getFetchRequestMode() const; | 287 BLINK_PLATFORM_EXPORT FetchRequestMode getFetchRequestMode() const; |
286 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); | 288 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); |
287 | 289 |
288 // The credentials mode which will be passed to the ServiceWorker. | 290 // The credentials mode which will be passed to the ServiceWorker. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 // instance it contains. | 361 // instance it contains. |
360 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; | 362 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; |
361 | 363 |
362 // Should never be null. | 364 // Should never be null. |
363 ResourceRequest* m_resourceRequest; | 365 ResourceRequest* m_resourceRequest; |
364 }; | 366 }; |
365 | 367 |
366 } // namespace blink | 368 } // namespace blink |
367 | 369 |
368 #endif | 370 #endif |
OLD | NEW |