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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // The origin of the execution context which originated the request. Used to | 177 // The origin of the execution context which originated the request. Used to |
187 // implement First-Party-Only cookie restrictions. | 178 // implement First-Party-Only cookie restrictions. |
188 BLINK_PLATFORM_EXPORT WebSecurityOrigin requestorOrigin() const; | 179 BLINK_PLATFORM_EXPORT WebSecurityOrigin requestorOrigin() const; |
189 BLINK_PLATFORM_EXPORT void setRequestorOrigin(const WebSecurityOrigin&); | 180 BLINK_PLATFORM_EXPORT void setRequestorOrigin(const WebSecurityOrigin&); |
190 | 181 |
191 // Controls whether user name, password, and cookies may be sent with the | 182 // Controls whether user name, password, and cookies may be sent with the |
192 // request. (If false, this overrides allowCookies.) | 183 // request. (If false, this overrides allowCookies.) |
193 BLINK_PLATFORM_EXPORT bool allowStoredCredentials() const; | 184 BLINK_PLATFORM_EXPORT bool allowStoredCredentials() const; |
194 BLINK_PLATFORM_EXPORT void setAllowStoredCredentials(bool); | 185 BLINK_PLATFORM_EXPORT void setAllowStoredCredentials(bool); |
195 | 186 |
196 BLINK_PLATFORM_EXPORT CachePolicy getCachePolicy() const; | 187 BLINK_PLATFORM_EXPORT WebCachePolicy getCachePolicy() const; |
197 BLINK_PLATFORM_EXPORT void setCachePolicy(CachePolicy); | 188 BLINK_PLATFORM_EXPORT void setCachePolicy(WebCachePolicy); |
198 | 189 |
199 BLINK_PLATFORM_EXPORT WebString httpMethod() const; | 190 BLINK_PLATFORM_EXPORT WebString httpMethod() const; |
200 BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&); | 191 BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&); |
201 | 192 |
202 BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const
; | 193 BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const
; |
203 // It's not possible to set the referrer header using this method. Use setHT
TPReferrer instead. | 194 // It's not possible to set the referrer header using this method. Use setHT
TPReferrer instead. |
204 BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, const W
ebString& value); | 195 BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, const W
ebString& value); |
205 BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer, WebRef
errerPolicy); | 196 BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer, WebRef
errerPolicy); |
206 BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name, const W
ebString& value); | 197 BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name, const W
ebString& value); |
207 BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name); | 198 BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 protected: | 312 protected: |
322 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); | 313 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); |
323 | 314 |
324 private: | 315 private: |
325 WebURLRequestPrivate* m_private; | 316 WebURLRequestPrivate* m_private; |
326 }; | 317 }; |
327 | 318 |
328 } // namespace blink | 319 } // namespace blink |
329 | 320 |
330 #endif | 321 #endif |
OLD | NEW |