| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 FrameTypeTopLevel | 110 FrameTypeTopLevel |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 enum FetchRequestMode { | 113 enum FetchRequestMode { |
| 114 FetchRequestModeSameOrigin, | 114 FetchRequestModeSameOrigin, |
| 115 FetchRequestModeNoCORS, | 115 FetchRequestModeNoCORS, |
| 116 FetchRequestModeCORS, | 116 FetchRequestModeCORS, |
| 117 FetchRequestModeCORSWithForcedPreflight | 117 FetchRequestModeCORSWithForcedPreflight |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 enum FetchCredentialsMode { |
| 121 FetchCredentialsModeOmit, |
| 122 FetchCredentialsModeSameOrigin, |
| 123 FetchCredentialsModeInclude |
| 124 }; |
| 125 |
| 120 class ExtraData { | 126 class ExtraData { |
| 121 public: | 127 public: |
| 122 virtual ~ExtraData() { } | 128 virtual ~ExtraData() { } |
| 123 }; | 129 }; |
| 124 | 130 |
| 125 ~WebURLRequest() { reset(); } | 131 ~WebURLRequest() { reset(); } |
| 126 | 132 |
| 127 WebURLRequest() : m_private(0) { } | 133 WebURLRequest() : m_private(0) { } |
| 128 WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); } | 134 WebURLRequest(const WebURLRequest& r) : m_private(0) { assign(r); } |
| 129 WebURLRequest& operator=(const WebURLRequest& r) | 135 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); | 225 BLINK_PLATFORM_EXPORT void setDownloadToFile(bool); |
| 220 | 226 |
| 221 // True if the request should not be handled by the ServiceWorker. | 227 // True if the request should not be handled by the ServiceWorker. |
| 222 BLINK_PLATFORM_EXPORT bool skipServiceWorker() const; | 228 BLINK_PLATFORM_EXPORT bool skipServiceWorker() const; |
| 223 BLINK_PLATFORM_EXPORT void setSkipServiceWorker(bool); | 229 BLINK_PLATFORM_EXPORT void setSkipServiceWorker(bool); |
| 224 | 230 |
| 225 // The request mode which will be passed to the ServiceWorker. | 231 // The request mode which will be passed to the ServiceWorker. |
| 226 BLINK_PLATFORM_EXPORT FetchRequestMode fetchRequestMode() const; | 232 BLINK_PLATFORM_EXPORT FetchRequestMode fetchRequestMode() const; |
| 227 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); | 233 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); |
| 228 | 234 |
| 235 // The credentials mode which will be passed to the ServiceWorker. |
| 236 BLINK_PLATFORM_EXPORT FetchCredentialsMode fetchCredentialsMode() const; |
| 237 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode); |
| 238 |
| 229 // Extra data associated with the underlying resource request. Resource | 239 // Extra data associated with the underlying resource request. Resource |
| 230 // requests can be copied. If non-null, each copy of a resource requests | 240 // 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 | 241 // 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 | 242 // deleted when the last resource request is destroyed. Setting the extra |
| 233 // data pointer will cause the underlying resource request to be | 243 // data pointer will cause the underlying resource request to be |
| 234 // dissociated from any existing non-null extra data pointer. | 244 // dissociated from any existing non-null extra data pointer. |
| 235 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; | 245 BLINK_PLATFORM_EXPORT ExtraData* extraData() const; |
| 236 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); | 246 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); |
| 237 | 247 |
| 238 BLINK_PLATFORM_EXPORT Priority priority() const; | 248 BLINK_PLATFORM_EXPORT Priority priority() const; |
| 239 BLINK_PLATFORM_EXPORT void setPriority(Priority); | 249 BLINK_PLATFORM_EXPORT void setPriority(Priority); |
| 240 | 250 |
| 241 #if INSIDE_BLINK | 251 #if INSIDE_BLINK |
| 242 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); | 252 BLINK_PLATFORM_EXPORT ResourceRequest& toMutableResourceRequest(); |
| 243 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; | 253 BLINK_PLATFORM_EXPORT const ResourceRequest& toResourceRequest() const; |
| 244 #endif | 254 #endif |
| 245 | 255 |
| 246 protected: | 256 protected: |
| 247 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); | 257 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); |
| 248 | 258 |
| 249 private: | 259 private: |
| 250 WebURLRequestPrivate* m_private; | 260 WebURLRequestPrivate* m_private; |
| 251 }; | 261 }; |
| 252 | 262 |
| 253 } // namespace blink | 263 } // namespace blink |
| 254 | 264 |
| 255 #endif | 265 #endif |
| OLD | NEW |