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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 | 57 |
58 enum Priority { | 58 enum Priority { |
59 PriorityUnresolved = -1, | 59 PriorityUnresolved = -1, |
60 PriorityVeryLow, | 60 PriorityVeryLow, |
61 PriorityLow, | 61 PriorityLow, |
62 PriorityMedium, | 62 PriorityMedium, |
63 PriorityHigh, | 63 PriorityHigh, |
64 PriorityVeryHigh, | 64 PriorityVeryHigh, |
65 }; | 65 }; |
66 | 66 |
67 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-r equest-context | 67 // Corresponds to Fetch's "context": |
68 // http://fetch.spec.whatwg.org/#concept-request-context | |
Mike West
2014/10/01 08:16:34
Nit: Why change this?
horo
2014/10/01 08:32:21
Followed yhirano's comment in PS1.
But we don't ne
| |
68 enum RequestContext { | 69 enum RequestContext { |
69 RequestContextUnspecified = 0, | 70 RequestContextUnspecified = 0, |
70 RequestContextAudio, | 71 RequestContextAudio, |
71 RequestContextBeacon, | 72 RequestContextBeacon, |
72 RequestContextCSPReport, | 73 RequestContextCSPReport, |
73 RequestContextDownload, | 74 RequestContextDownload, |
74 RequestContextEmbed, | 75 RequestContextEmbed, |
75 RequestContextEventSource, | 76 RequestContextEventSource, |
76 RequestContextFavicon, | 77 RequestContextFavicon, |
77 RequestContextFetch, | 78 RequestContextFetch, |
(...skipping 17 matching lines...) Expand all Loading... | |
95 RequestContextSharedWorker, | 96 RequestContextSharedWorker, |
96 RequestContextSubresource, | 97 RequestContextSubresource, |
97 RequestContextStyle, | 98 RequestContextStyle, |
98 RequestContextTrack, | 99 RequestContextTrack, |
99 RequestContextVideo, | 100 RequestContextVideo, |
100 RequestContextWorker, | 101 RequestContextWorker, |
101 RequestContextXMLHttpRequest, | 102 RequestContextXMLHttpRequest, |
102 RequestContextXSLT | 103 RequestContextXSLT |
103 }; | 104 }; |
104 | 105 |
105 // Corresponds to Fetch's "context frame type": http://fetch.spec.whatwg.org /#concept-request-context-frame-type | 106 // Corresponds to Fetch's "context frame type": |
107 // http://fetch.spec.whatwg.org/#concept-request-context-frame-type | |
Mike West
2014/10/01 08:16:34
Nit: And this?
horo
2014/10/01 08:32:21
Done.
| |
106 enum FrameType { | 108 enum FrameType { |
107 FrameTypeAuxiliary, | 109 FrameTypeAuxiliary, |
108 FrameTypeNested, | 110 FrameTypeNested, |
109 FrameTypeNone, | 111 FrameTypeNone, |
110 FrameTypeTopLevel | 112 FrameTypeTopLevel |
111 }; | 113 }; |
112 | 114 |
113 enum FetchRequestMode { | 115 enum FetchRequestMode { |
114 FetchRequestModeSameOrigin, | 116 FetchRequestModeSameOrigin, |
115 FetchRequestModeNoCORS, | 117 FetchRequestModeNoCORS, |
116 FetchRequestModeCORS, | 118 FetchRequestModeCORS, |
117 FetchRequestModeCORSWithForcedPreflight | 119 FetchRequestModeCORSWithForcedPreflight |
118 }; | 120 }; |
119 | 121 |
122 enum FetchCredentialsMode { | |
123 FetchCredentialsModeOmit, | |
124 FetchCredentialsModeSameOrigin, | |
125 FetchCredentialsModeInclude | |
126 }; | |
127 | |
120 class ExtraData { | 128 class ExtraData { |
121 public: | 129 public: |
122 virtual ~ExtraData() { } | 130 virtual ~ExtraData() { } |
123 }; | 131 }; |
124 | 132 |
125 ~WebURLRequest() { reset(); } | 133 ~WebURLRequest() { reset(); } |
126 | 134 |
127 WebURLRequest() : m_private(0) { } | 135 WebURLRequest() : m_private(0) { } |
128 WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); } | 136 WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); } |
129 WebURLRequest& operator=(const WebURLRequest& r) | 137 WebURLRequest& operator=(const WebURLRequest& r) |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 BLINK_PLATFORM_EXPORT void setDownloadToFile(bool); | 227 BLINK_PLATFORM_EXPORT void setDownloadToFile(bool); |
220 | 228 |
221 // True if the request should not be handled by the ServiceWorker. | 229 // True if the request should not be handled by the ServiceWorker. |
222 BLINK_PLATFORM_EXPORT bool skipServiceWorker() const; | 230 BLINK_PLATFORM_EXPORT bool skipServiceWorker() const; |
223 BLINK_PLATFORM_EXPORT void setSkipServiceWorker(bool); | 231 BLINK_PLATFORM_EXPORT void setSkipServiceWorker(bool); |
224 | 232 |
225 // The request mode which will be passed to the ServiceWorker. | 233 // The request mode which will be passed to the ServiceWorker. |
226 BLINK_PLATFORM_EXPORT FetchRequestMode fetchRequestMode() const; | 234 BLINK_PLATFORM_EXPORT FetchRequestMode fetchRequestMode() const; |
227 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); | 235 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); |
228 | 236 |
237 // The credentials mode which will be passed to the ServiceWorker. | |
238 BLINK_PLATFORM_EXPORT FetchCredentialsMode fetchCredentialsMode() const; | |
239 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode); | |
240 | |
229 // Extra data associated with the underlying resource request. Resource | 241 // Extra data associated with the underlying resource request. Resource |
230 // requests can be copied. If non-null, each copy of a resource requests | 242 // requests can be copied. If non-null, each copy of a resource requests |
231 // holds a pointer to the extra data, and the extra data pointer will be | 243 // holds a pointer to the extra data, and the extra data pointer will be |
232 // deleted when the last resource request is destroyed. Setting the extra | 244 // deleted when the last resource request is destroyed. Setting the extra |
233 // data pointer will cause the underlying resource request to be | 245 // data pointer will cause the underlying resource request to be |
234 // dissociated from any existing non-null extra data pointer. | 246 // dissociated from any existing non-null extra data pointer. |
235 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; | 247 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; |
236 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 248 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
237 | 249 |
238 BLINK_PLATFORM_EXPORT Priority priority() const; | 250 BLINK_PLATFORM_EXPORT Priority priority() const; |
239 BLINK_PLATFORM_EXPORT void setPriority(Priority); | 251 BLINK_PLATFORM_EXPORT void setPriority(Priority); |
240 | 252 |
241 #if INSIDE_BLINK | 253 #if INSIDE_BLINK |
242 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); | 254 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); |
243 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; | 255 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; |
244 #endif | 256 #endif |
245 | 257 |
246 protected: | 258 protected: |
247 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); | 259 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); |
248 | 260 |
249 private: | 261 private: |
250 WebURLRequestPrivate* m_private; | 262 WebURLRequestPrivate* m_private; |
251 }; | 263 }; |
252 | 264 |
253 } // namespace blink | 265 } // namespace blink |
254 | 266 |
255 #endif | 267 #endif |
OLD | NEW |