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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
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 WebURLResponse_h | 31 #ifndef WebURLResponse_h |
32 #define WebURLResponse_h | 32 #define WebURLResponse_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 #include "WebPrivateOwnPtr.h" | 35 #include "WebPrivateOwnPtr.h" |
| 36 #include "WebServiceWorkerResponseType.h" |
36 | 37 |
37 namespace blink { | 38 namespace blink { |
38 | 39 |
39 class ResourceResponse; | 40 class ResourceResponse; |
40 class WebCString; | 41 class WebCString; |
41 class WebHTTPHeaderVisitor; | 42 class WebHTTPHeaderVisitor; |
42 class WebHTTPLoadInfo; | 43 class WebHTTPLoadInfo; |
43 class WebString; | 44 class WebString; |
44 class WebURL; | 45 class WebURL; |
45 class WebURLLoadTiming; | 46 class WebURLLoadTiming; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 166 |
166 // Flag whether this request was loaded via a ServiceWorker. | 167 // Flag whether this request was loaded via a ServiceWorker. |
167 BLINK_PLATFORM_EXPORT bool wasFetchedViaServiceWorker() const; | 168 BLINK_PLATFORM_EXPORT bool wasFetchedViaServiceWorker() const; |
168 BLINK_PLATFORM_EXPORT void setWasFetchedViaServiceWorker(bool); | 169 BLINK_PLATFORM_EXPORT void setWasFetchedViaServiceWorker(bool); |
169 | 170 |
170 // Flag whether the fallback request with skip service worker flag was | 171 // Flag whether the fallback request with skip service worker flag was |
171 // required. | 172 // required. |
172 BLINK_PLATFORM_EXPORT bool wasFallbackRequiredByServiceWorker() const; | 173 BLINK_PLATFORM_EXPORT bool wasFallbackRequiredByServiceWorker() const; |
173 BLINK_PLATFORM_EXPORT void setWasFallbackRequiredByServiceWorker(bool); | 174 BLINK_PLATFORM_EXPORT void setWasFallbackRequiredByServiceWorker(bool); |
174 | 175 |
| 176 // The type of the response which was fetched by the ServiceWorker. |
| 177 BLINK_PLATFORM_EXPORT WebServiceWorkerResponseType serviceWorkerResponseType
() const; |
| 178 BLINK_PLATFORM_EXPORT void setServiceWorkerResponseType(WebServiceWorkerResp
onseType); |
| 179 |
175 // Flag whether this request is part of a multipart response. | 180 // Flag whether this request is part of a multipart response. |
176 BLINK_PLATFORM_EXPORT bool isMultipartPayload() const; | 181 BLINK_PLATFORM_EXPORT bool isMultipartPayload() const; |
177 BLINK_PLATFORM_EXPORT void setIsMultipartPayload(bool); | 182 BLINK_PLATFORM_EXPORT void setIsMultipartPayload(bool); |
178 | 183 |
179 // This indicates the location of a downloaded response if the | 184 // This indicates the location of a downloaded response if the |
180 // WebURLRequest had the downloadToFile flag set to true. This file path | 185 // WebURLRequest had the downloadToFile flag set to true. This file path |
181 // remains valid for the lifetime of the WebURLLoader used to create it. | 186 // remains valid for the lifetime of the WebURLLoader used to create it. |
182 BLINK_PLATFORM_EXPORT WebString downloadFilePath() const; | 187 BLINK_PLATFORM_EXPORT WebString downloadFilePath() const; |
183 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&); | 188 BLINK_PLATFORM_EXPORT void setDownloadFilePath(const WebString&); |
184 | 189 |
(...skipping 17 matching lines...) Expand all Loading... |
202 protected: | 207 protected: |
203 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); | 208 BLINK_PLATFORM_EXPORT void assign(WebURLResponsePrivate*); |
204 | 209 |
205 private: | 210 private: |
206 WebURLResponsePrivate* m_private; | 211 WebURLResponsePrivate* m_private; |
207 }; | 212 }; |
208 | 213 |
209 } // namespace blink | 214 } // namespace blink |
210 | 215 |
211 #endif | 216 #endif |
OLD | NEW |