Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: public/platform/WebURLRequest.h

Issue 29123004: Move core/platform/network to platform/network (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more file Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « public/platform/WebURLLoadTiming.h ('k') | public/platform/WebURLResponse.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebURLRequest_h 31 #ifndef WebURLRequest_h
32 #define WebURLRequest_h 32 #define WebURLRequest_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebHTTPBody.h" 35 #include "WebHTTPBody.h"
36 36
37 #if BLINK_IMPLEMENTATION 37 #if INSIDE_BLINK
38 namespace WebCore { class ResourceRequest; } 38 namespace WebCore { class ResourceRequest; }
39 #endif 39 #endif
40 40
41 namespace WebKit { 41 namespace WebKit {
42 42
43 class WebCString; 43 class WebCString;
44 class WebHTTPBody; 44 class WebHTTPBody;
45 class WebHTTPHeaderVisitor; 45 class WebHTTPHeaderVisitor;
46 class WebString; 46 class WebString;
47 class WebURL; 47 class WebURL;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 assign(r); 98 assign(r);
99 return *this; 99 return *this;
100 } 100 }
101 101
102 explicit WebURLRequest(const WebURL& url) : m_private(0) 102 explicit WebURLRequest(const WebURL& url) : m_private(0)
103 { 103 {
104 initialize(); 104 initialize();
105 setURL(url); 105 setURL(url);
106 } 106 }
107 107
108 BLINK_EXPORT void initialize(); 108 BLINK_PLATFORM_EXPORT void initialize();
109 BLINK_EXPORT void reset(); 109 BLINK_PLATFORM_EXPORT void reset();
110 BLINK_EXPORT void assign(const WebURLRequest&); 110 BLINK_PLATFORM_EXPORT void assign(const WebURLRequest&);
111 111
112 BLINK_EXPORT bool isNull() const; 112 BLINK_PLATFORM_EXPORT bool isNull() const;
113 113
114 BLINK_EXPORT WebURL url() const; 114 BLINK_PLATFORM_EXPORT WebURL url() const;
115 BLINK_EXPORT void setURL(const WebURL&); 115 BLINK_PLATFORM_EXPORT void setURL(const WebURL&);
116 116
117 // Used to implement third-party cookie blocking. 117 // Used to implement third-party cookie blocking.
118 BLINK_EXPORT WebURL firstPartyForCookies() const; 118 BLINK_PLATFORM_EXPORT WebURL firstPartyForCookies() const;
119 BLINK_EXPORT void setFirstPartyForCookies(const WebURL&); 119 BLINK_PLATFORM_EXPORT void setFirstPartyForCookies(const WebURL&);
120 120
121 BLINK_EXPORT bool allowCookies() const; 121 BLINK_PLATFORM_EXPORT bool allowCookies() const;
122 BLINK_EXPORT void setAllowCookies(bool); 122 BLINK_PLATFORM_EXPORT void setAllowCookies(bool);
123 123
124 // Controls whether user name, password, and cookies may be sent with the 124 // Controls whether user name, password, and cookies may be sent with the
125 // request. (If false, this overrides allowCookies.) 125 // request. (If false, this overrides allowCookies.)
126 BLINK_EXPORT bool allowStoredCredentials() const; 126 BLINK_PLATFORM_EXPORT bool allowStoredCredentials() const;
127 BLINK_EXPORT void setAllowStoredCredentials(bool); 127 BLINK_PLATFORM_EXPORT void setAllowStoredCredentials(bool);
128 128
129 BLINK_EXPORT CachePolicy cachePolicy() const; 129 BLINK_PLATFORM_EXPORT CachePolicy cachePolicy() const;
130 BLINK_EXPORT void setCachePolicy(CachePolicy); 130 BLINK_PLATFORM_EXPORT void setCachePolicy(CachePolicy);
131 131
132 BLINK_EXPORT WebString httpMethod() const; 132 BLINK_PLATFORM_EXPORT WebString httpMethod() const;
133 BLINK_EXPORT void setHTTPMethod(const WebString&); 133 BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&);
134 134
135 BLINK_EXPORT WebString httpHeaderField(const WebString& name) const; 135 BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const ;
136 BLINK_EXPORT void setHTTPHeaderField(const WebString& name, const WebString& value); 136 BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, const W ebString& value);
137 BLINK_EXPORT void addHTTPHeaderField(const WebString& name, const WebString& value); 137 BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name, const W ebString& value);
138 BLINK_EXPORT void clearHTTPHeaderField(const WebString& name); 138 BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name);
139 BLINK_EXPORT void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; 139 BLINK_PLATFORM_EXPORT void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) cons t;
140 140
141 BLINK_EXPORT WebHTTPBody httpBody() const; 141 BLINK_PLATFORM_EXPORT WebHTTPBody httpBody() const;
142 BLINK_EXPORT void setHTTPBody(const WebHTTPBody&); 142 BLINK_PLATFORM_EXPORT void setHTTPBody(const WebHTTPBody&);
143 143
144 // Controls whether upload progress events are generated when a request 144 // Controls whether upload progress events are generated when a request
145 // has a body. 145 // has a body.
146 BLINK_EXPORT bool reportUploadProgress() const; 146 BLINK_PLATFORM_EXPORT bool reportUploadProgress() const;
147 BLINK_EXPORT void setReportUploadProgress(bool); 147 BLINK_PLATFORM_EXPORT void setReportUploadProgress(bool);
148 148
149 // Controls whether load timing info is collected for the request. 149 // Controls whether load timing info is collected for the request.
150 BLINK_EXPORT bool reportLoadTiming() const; 150 BLINK_PLATFORM_EXPORT bool reportLoadTiming() const;
151 BLINK_EXPORT void setReportLoadTiming(bool); 151 BLINK_PLATFORM_EXPORT void setReportLoadTiming(bool);
152 152
153 // Controls whether actual headers sent and received for request are 153 // Controls whether actual headers sent and received for request are
154 // collected and reported. 154 // collected and reported.
155 BLINK_EXPORT bool reportRawHeaders() const; 155 BLINK_PLATFORM_EXPORT bool reportRawHeaders() const;
156 BLINK_EXPORT void setReportRawHeaders(bool); 156 BLINK_PLATFORM_EXPORT void setReportRawHeaders(bool);
157 157
158 BLINK_EXPORT TargetType targetType() const; 158 BLINK_PLATFORM_EXPORT TargetType targetType() const;
159 BLINK_EXPORT void setTargetType(TargetType); 159 BLINK_PLATFORM_EXPORT void setTargetType(TargetType);
160 160
161 // True if the request was user initiated. 161 // True if the request was user initiated.
162 BLINK_EXPORT bool hasUserGesture() const; 162 BLINK_PLATFORM_EXPORT bool hasUserGesture() const;
163 BLINK_EXPORT void setHasUserGesture(bool); 163 BLINK_PLATFORM_EXPORT void setHasUserGesture(bool);
164 164
165 // A consumer controlled value intended to be used to identify the 165 // A consumer controlled value intended to be used to identify the
166 // requestor. 166 // requestor.
167 BLINK_EXPORT int requestorID() const; 167 BLINK_PLATFORM_EXPORT int requestorID() const;
168 BLINK_EXPORT void setRequestorID(int); 168 BLINK_PLATFORM_EXPORT void setRequestorID(int);
169 169
170 // A consumer controlled value intended to be used to identify the 170 // A consumer controlled value intended to be used to identify the
171 // process of the requestor. 171 // process of the requestor.
172 BLINK_EXPORT int requestorProcessID() const; 172 BLINK_PLATFORM_EXPORT int requestorProcessID() const;
173 BLINK_EXPORT void setRequestorProcessID(int); 173 BLINK_PLATFORM_EXPORT void setRequestorProcessID(int);
174 174
175 // Allows the request to be matched up with its app cache host. 175 // Allows the request to be matched up with its app cache host.
176 BLINK_EXPORT int appCacheHostID() const; 176 BLINK_PLATFORM_EXPORT int appCacheHostID() const;
177 BLINK_EXPORT void setAppCacheHostID(int); 177 BLINK_PLATFORM_EXPORT void setAppCacheHostID(int);
178 178
179 // If true, the response body will be downloaded to a file managed by the 179 // If true, the response body will be downloaded to a file managed by the
180 // WebURLLoader. See WebURLResponse::downloadedFilePath. 180 // WebURLLoader. See WebURLResponse::downloadedFilePath.
181 BLINK_EXPORT bool downloadToFile() const; 181 BLINK_PLATFORM_EXPORT bool downloadToFile() const;
182 BLINK_EXPORT void setDownloadToFile(bool); 182 BLINK_PLATFORM_EXPORT void setDownloadToFile(bool);
183 183
184 // Extra data associated with the underlying resource request. Resource 184 // Extra data associated with the underlying resource request. Resource
185 // requests can be copied. If non-null, each copy of a resource requests 185 // requests can be copied. If non-null, each copy of a resource requests
186 // holds a pointer to the extra data, and the extra data pointer will be 186 // holds a pointer to the extra data, and the extra data pointer will be
187 // deleted when the last resource request is destroyed. Setting the extra 187 // deleted when the last resource request is destroyed. Setting the extra
188 // data pointer will cause the underlying resource request to be 188 // data pointer will cause the underlying resource request to be
189 // dissociated from any existing non-null extra data pointer. 189 // dissociated from any existing non-null extra data pointer.
190 BLINK_EXPORT ExtraData* extraData() const; 190 BLINK_PLATFORM_EXPORT ExtraData* extraData() const;
191 BLINK_EXPORT void setExtraData(ExtraData*); 191 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
192 192
193 BLINK_EXPORT Priority priority() const; 193 BLINK_PLATFORM_EXPORT Priority priority() const;
194 194
195 #if BLINK_IMPLEMENTATION 195 #if INSIDE_BLINK
196 WebCore::ResourceRequest& toMutableResourceRequest(); 196 BLINK_PLATFORM_EXPORT WebCore::ResourceRequest& toMutableResourceRequest();
197 const WebCore::ResourceRequest& toResourceRequest() const; 197 BLINK_PLATFORM_EXPORT const WebCore::ResourceRequest& toResourceRequest() co nst;
198 #endif 198 #endif
199 199
200 protected: 200 protected:
201 void assign(WebURLRequestPrivate*); 201 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*);
202 202
203 private: 203 private:
204 WebURLRequestPrivate* m_private; 204 WebURLRequestPrivate* m_private;
205 }; 205 };
206 206
207 } // namespace WebKit 207 } // namespace WebKit
208 208
209 #endif 209 #endif
OLDNEW
« no previous file with comments | « public/platform/WebURLLoadTiming.h ('k') | public/platform/WebURLResponse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698