| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 enum Priority { | 61 enum Priority { |
| 62 PriorityUnresolved = -1, | 62 PriorityUnresolved = -1, |
| 63 PriorityVeryLow, | 63 PriorityVeryLow, |
| 64 PriorityLow, | 64 PriorityLow, |
| 65 PriorityMedium, | 65 PriorityMedium, |
| 66 PriorityHigh, | 66 PriorityHigh, |
| 67 PriorityVeryHigh, | 67 PriorityVeryHigh, |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 enum TargetType { | |
| 71 TargetIsMainFrame = 0, | |
| 72 TargetIsSubframe = 1, | |
| 73 TargetIsSubresource = 2, | |
| 74 TargetIsStyleSheet = 3, | |
| 75 TargetIsScript = 4, | |
| 76 TargetIsFontResource = 5, | |
| 77 TargetIsImage = 6, | |
| 78 TargetIsObject = 7, | |
| 79 TargetIsMedia = 8, | |
| 80 TargetIsWorker = 9, | |
| 81 TargetIsSharedWorker = 10, | |
| 82 TargetIsPrefetch = 11, | |
| 83 TargetIsFavicon = 12, | |
| 84 TargetIsXHR = 13, | |
| 85 TargetIsTextTrack = 14, | |
| 86 TargetIsPing = 15, | |
| 87 TargetIsServiceWorker = 16, | |
| 88 TargetIsUnspecified = 17, | |
| 89 }; | |
| 90 | |
| 91 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-r
equest-context | 70 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-r
equest-context |
| 92 // | |
| 93 // FIXME: Drop the TargetType enum once embedders are updated upstream. | |
| 94 enum RequestContext { | 71 enum RequestContext { |
| 95 RequestContextUnspecified = 0, | 72 RequestContextUnspecified = 0, |
| 96 RequestContextInternal, // FIXME: This isn't part of Fetch. It should be
. | 73 RequestContextInternal, // FIXME: This isn't part of Fetch. It should be
. |
| 97 RequestContextAudio, | 74 RequestContextAudio, |
| 98 RequestContextBeacon, | 75 RequestContextBeacon, |
| 99 RequestContextCSPReport, | 76 RequestContextCSPReport, |
| 100 RequestContextDownload, | 77 RequestContextDownload, |
| 101 RequestContextEmbed, | 78 RequestContextEmbed, |
| 102 RequestContextEventSource, | 79 RequestContextEventSource, |
| 103 RequestContextFavicon, | 80 RequestContextFavicon, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Controls whether upload progress events are generated when a request | 170 // Controls whether upload progress events are generated when a request |
| 194 // has a body. | 171 // has a body. |
| 195 BLINK_PLATFORM_EXPORT bool reportUploadProgress() const; | 172 BLINK_PLATFORM_EXPORT bool reportUploadProgress() const; |
| 196 BLINK_PLATFORM_EXPORT void setReportUploadProgress(bool); | 173 BLINK_PLATFORM_EXPORT void setReportUploadProgress(bool); |
| 197 | 174 |
| 198 // Controls whether actual headers sent and received for request are | 175 // Controls whether actual headers sent and received for request are |
| 199 // collected and reported. | 176 // collected and reported. |
| 200 BLINK_PLATFORM_EXPORT bool reportRawHeaders() const; | 177 BLINK_PLATFORM_EXPORT bool reportRawHeaders() const; |
| 201 BLINK_PLATFORM_EXPORT void setReportRawHeaders(bool); | 178 BLINK_PLATFORM_EXPORT void setReportRawHeaders(bool); |
| 202 | 179 |
| 203 // FIXME: Remove these once content/ and net/ are updated. | |
| 204 BLINK_PLATFORM_EXPORT TargetType targetType() const; | |
| 205 BLINK_PLATFORM_EXPORT void setTargetType(TargetType); | |
| 206 | |
| 207 BLINK_PLATFORM_EXPORT RequestContext requestContext() const; | 180 BLINK_PLATFORM_EXPORT RequestContext requestContext() const; |
| 208 BLINK_PLATFORM_EXPORT void setRequestContext(RequestContext); | 181 BLINK_PLATFORM_EXPORT void setRequestContext(RequestContext); |
| 209 | 182 |
| 210 BLINK_PLATFORM_EXPORT FrameType frameType() const; | 183 BLINK_PLATFORM_EXPORT FrameType frameType() const; |
| 211 BLINK_PLATFORM_EXPORT void setFrameType(FrameType); | 184 BLINK_PLATFORM_EXPORT void setFrameType(FrameType); |
| 212 | 185 |
| 213 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const; | 186 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const; |
| 214 | 187 |
| 215 // Adds an HTTP origin header if it is empty and the HTTP method of the | 188 // Adds an HTTP origin header if it is empty and the HTTP method of the |
| 216 // request requires it. | 189 // request requires it. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 222 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 250 | 223 |
| 251 BLINK_PLATFORM_EXPORT Priority priority() const; | 224 BLINK_PLATFORM_EXPORT Priority priority() const; |
| 252 BLINK_PLATFORM_EXPORT void setPriority(Priority); | 225 BLINK_PLATFORM_EXPORT void setPriority(Priority); |
| 253 | 226 |
| 254 #if INSIDE_BLINK | 227 #if INSIDE_BLINK |
| 255 BLINK_PLATFORM_EXPORT blink::ResourceRequest& toMutableResourceRequest(); | 228 BLINK_PLATFORM_EXPORT blink::ResourceRequest& toMutableResourceRequest(); |
| 256 BLINK_PLATFORM_EXPORT const blink::ResourceRequest& toResourceRequest() cons
t; | 229 BLINK_PLATFORM_EXPORT const blink::ResourceRequest& toResourceRequest() cons
t; |
| 257 #endif | 230 #endif |
| 258 | 231 |
| 259 // FIXME: Drop these once we replace TargetType upstream. | |
| 260 static RequestContext requestContextFromTargetType(TargetType); | |
| 261 static TargetType targetTypeFromRequestContextAndFrameType(RequestContext, F
rameType); | |
| 262 | |
| 263 protected: | 232 protected: |
| 264 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); | 233 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); |
| 265 | 234 |
| 266 private: | 235 private: |
| 267 WebURLRequestPrivate* m_private; | 236 WebURLRequestPrivate* m_private; |
| 268 }; | 237 }; |
| 269 | 238 |
| 270 } // namespace blink | 239 } // namespace blink |
| 271 | 240 |
| 272 #endif | 241 #endif |
| OLD | NEW |