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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class ResourceRequest; | 41 class ResourceRequest; |
42 class WebHTTPBody; | 42 class WebHTTPBody; |
43 class WebHTTPHeaderVisitor; | 43 class WebHTTPHeaderVisitor; |
44 class WebSecurityOrigin; | 44 class WebSecurityOrigin; |
45 class WebString; | 45 class WebString; |
46 class WebURL; | 46 class WebURL; |
47 class WebURLRequestPrivate; | 47 class WebURLRequestPrivate; |
| 48 enum class WebCachePolicy; |
48 | 49 |
49 class WebURLRequest { | 50 class WebURLRequest { |
50 public: | 51 public: |
51 // Should be same with ResourceRequestCachePolicy. | |
52 // TODO(crbug.com/599364): Merge this with ResourceRequestCachePolicy. | |
53 enum CachePolicy { | |
54 UseProtocolCachePolicy, // normal load | |
55 ValidatingCacheData, // reload | |
56 BypassingCache, // end-to-end reload | |
57 ReturnCacheDataElseLoad, // back/forward or encoding change - allow stal
e data | |
58 ReturnCacheDataDontLoad, // results of a post - allow stale data and onl
y use cache | |
59 }; | |
60 | |
61 enum Priority { | 52 enum Priority { |
62 PriorityUnresolved = -1, | 53 PriorityUnresolved = -1, |
63 PriorityVeryLow, | 54 PriorityVeryLow, |
64 PriorityLow, | 55 PriorityLow, |
65 PriorityMedium, | 56 PriorityMedium, |
66 PriorityHigh, | 57 PriorityHigh, |
67 PriorityVeryHigh, | 58 PriorityVeryHigh, |
68 }; | 59 }; |
69 | 60 |
70 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-r
equest-context | 61 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-r
equest-context |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // The origin of the execution context which originated the request. Used to | 178 // The origin of the execution context which originated the request. Used to |
188 // implement First-Party-Only cookie restrictions. | 179 // implement First-Party-Only cookie restrictions. |
189 BLINK_PLATFORM_EXPORT WebSecurityOrigin requestorOrigin() const; | 180 BLINK_PLATFORM_EXPORT WebSecurityOrigin requestorOrigin() const; |
190 BLINK_PLATFORM_EXPORT void setRequestorOrigin(const WebSecurityOrigin&); | 181 BLINK_PLATFORM_EXPORT void setRequestorOrigin(const WebSecurityOrigin&); |
191 | 182 |
192 // Controls whether user name, password, and cookies may be sent with the | 183 // Controls whether user name, password, and cookies may be sent with the |
193 // request. (If false, this overrides allowCookies.) | 184 // request. (If false, this overrides allowCookies.) |
194 BLINK_PLATFORM_EXPORT bool allowStoredCredentials() const; | 185 BLINK_PLATFORM_EXPORT bool allowStoredCredentials() const; |
195 BLINK_PLATFORM_EXPORT void setAllowStoredCredentials(bool); | 186 BLINK_PLATFORM_EXPORT void setAllowStoredCredentials(bool); |
196 | 187 |
197 BLINK_PLATFORM_EXPORT CachePolicy getCachePolicy() const; | 188 BLINK_PLATFORM_EXPORT WebCachePolicy getCachePolicy() const; |
198 BLINK_PLATFORM_EXPORT void setCachePolicy(CachePolicy); | 189 BLINK_PLATFORM_EXPORT void setCachePolicy(WebCachePolicy); |
199 | 190 |
200 BLINK_PLATFORM_EXPORT WebString httpMethod() const; | 191 BLINK_PLATFORM_EXPORT WebString httpMethod() const; |
201 BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&); | 192 BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&); |
202 | 193 |
203 BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const
; | 194 BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const
; |
204 // It's not possible to set the referrer header using this method. Use setHT
TPReferrer instead. | 195 // It's not possible to set the referrer header using this method. Use setHT
TPReferrer instead. |
205 BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, const W
ebString& value); | 196 BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, const W
ebString& value); |
206 BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer, WebRef
errerPolicy); | 197 BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer, WebRef
errerPolicy); |
207 BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name, const W
ebString& value); | 198 BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name, const W
ebString& value); |
208 BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name); | 199 BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 protected: | 316 protected: |
326 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); | 317 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); |
327 | 318 |
328 private: | 319 private: |
329 WebURLRequestPrivate* m_private; | 320 WebURLRequestPrivate* m_private; |
330 }; | 321 }; |
331 | 322 |
332 } // namespace blink | 323 } // namespace blink |
333 | 324 |
334 #endif | 325 #endif |
OLD | NEW |