OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com> | 3 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@nypop.com> |
4 * Copyright (C) 2011 Google Inc. All rights reserved. | 4 * Copyright (C) 2011 Google Inc. All rights reserved. |
5 * Copyright (C) 2012 Intel Corporation | 5 * Copyright (C) 2012 Intel Corporation |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 private: | 151 private: |
152 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); | 152 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); |
153 | 153 |
154 Document* document() const; | 154 Document* document() const; |
155 SecurityOrigin* securityOrigin() const; | 155 SecurityOrigin* securityOrigin() const; |
156 | 156 |
157 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) OVERRIDE; | 157 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) OVERRIDE; |
158 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) OVERRIDE; | 158 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) OVERRIDE; |
159 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; | 159 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; |
| 160 // When responseType is set to "blob", didDownloadData() is called instead |
| 161 // of didReceiveData(). |
| 162 virtual void didDownloadData(int dataLength) OVERRIDE; |
160 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; | 163 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; |
161 virtual void didFail(const ResourceError&) OVERRIDE; | 164 virtual void didFail(const ResourceError&) OVERRIDE; |
162 virtual void didFailRedirectCheck() OVERRIDE; | 165 virtual void didFailRedirectCheck() OVERRIDE; |
163 | 166 |
164 AtomicString responseMIMEType() const; | 167 AtomicString responseMIMEType() const; |
165 bool responseIsXML() const; | 168 bool responseIsXML() const; |
166 | 169 |
167 bool areMethodAndURLValidForSend(); | 170 bool areMethodAndURLValidForSend(); |
168 | 171 |
169 bool initSend(ExceptionState&); | 172 bool initSend(ExceptionState&); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 231 |
229 OwnPtr<TextResourceDecoder> m_decoder; | 232 OwnPtr<TextResourceDecoder> m_decoder; |
230 | 233 |
231 ScriptString m_responseText; | 234 ScriptString m_responseText; |
232 // Used to skip m_responseDocument creation if it's done previously. We need | 235 // Used to skip m_responseDocument creation if it's done previously. We need |
233 // this separate flag since m_responseDocument can be 0 for some cases. | 236 // this separate flag since m_responseDocument can be 0 for some cases. |
234 bool m_createdDocument; | 237 bool m_createdDocument; |
235 RefPtrWillBeMember<Document> m_responseDocument; | 238 RefPtrWillBeMember<Document> m_responseDocument; |
236 | 239 |
237 RefPtr<SharedBuffer> m_binaryResponseBuilder; | 240 RefPtr<SharedBuffer> m_binaryResponseBuilder; |
| 241 long long m_downloadedBlobLength; |
| 242 |
238 RefPtr<ArrayBuffer> m_responseArrayBuffer; | 243 RefPtr<ArrayBuffer> m_responseArrayBuffer; |
239 | 244 |
240 bool m_error; | 245 bool m_error; |
241 | 246 |
242 bool m_uploadEventsAllowed; | 247 bool m_uploadEventsAllowed; |
243 bool m_uploadComplete; | 248 bool m_uploadComplete; |
244 | 249 |
245 bool m_sameOriginRequest; | 250 bool m_sameOriginRequest; |
246 | 251 |
247 // Used for onprogress tracking | 252 // Used for onprogress tracking |
(...skipping 10 matching lines...) Expand all Loading... |
258 | 263 |
259 // An enum corresponding to the allowed string values for the responseType a
ttribute. | 264 // An enum corresponding to the allowed string values for the responseType a
ttribute. |
260 ResponseTypeCode m_responseTypeCode; | 265 ResponseTypeCode m_responseTypeCode; |
261 AsyncMethodRunner<XMLHttpRequest> m_dropProtectionRunner; | 266 AsyncMethodRunner<XMLHttpRequest> m_dropProtectionRunner; |
262 RefPtr<SecurityOrigin> m_securityOrigin; | 267 RefPtr<SecurityOrigin> m_securityOrigin; |
263 }; | 268 }; |
264 | 269 |
265 } // namespace WebCore | 270 } // namespace WebCore |
266 | 271 |
267 #endif // XMLHttpRequest_h | 272 #endif // XMLHttpRequest_h |
OLD | NEW |