| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); | 147 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); |
| 148 | 148 |
| 149 Document* document() const; | 149 Document* document() const; |
| 150 SecurityOrigin* securityOrigin() const; | 150 SecurityOrigin* securityOrigin() const; |
| 151 | 151 |
| 152 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) OVERRIDE; | 152 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) OVERRIDE; |
| 153 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) OVERRIDE; | 153 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) OVERRIDE; |
| 154 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; | 154 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; |
| 155 // When "blob" is specified as the responseType attribute, didDownloadData | |
| 156 // is called instead of didReceiveData. | |
| 157 virtual void didDownloadData(int dataLength) OVERRIDE; | |
| 158 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; | 155 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; |
| 159 virtual void didFail(const ResourceError&) OVERRIDE; | 156 virtual void didFail(const ResourceError&) OVERRIDE; |
| 160 virtual void didFailRedirectCheck() OVERRIDE; | 157 virtual void didFailRedirectCheck() OVERRIDE; |
| 161 | 158 |
| 162 AtomicString responseMIMEType() const; | 159 AtomicString responseMIMEType() const; |
| 163 bool responseIsXML() const; | 160 bool responseIsXML() const; |
| 164 | 161 |
| 165 bool areMethodAndURLValidForSend(); | 162 bool areMethodAndURLValidForSend(); |
| 166 | 163 |
| 167 bool initSend(ExceptionState&); | 164 bool initSend(ExceptionState&); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 227 |
| 231 OwnPtr<TextResourceDecoder> m_decoder; | 228 OwnPtr<TextResourceDecoder> m_decoder; |
| 232 | 229 |
| 233 ScriptString m_responseText; | 230 ScriptString m_responseText; |
| 234 // Used to skip m_responseDocument creation if it's done previously. We need | 231 // Used to skip m_responseDocument creation if it's done previously. We need |
| 235 // this separate flag since m_responseDocument can be 0 for some cases. | 232 // this separate flag since m_responseDocument can be 0 for some cases. |
| 236 bool m_createdDocument; | 233 bool m_createdDocument; |
| 237 RefPtr<Document> m_responseDocument; | 234 RefPtr<Document> m_responseDocument; |
| 238 | 235 |
| 239 RefPtr<SharedBuffer> m_binaryResponseBuilder; | 236 RefPtr<SharedBuffer> m_binaryResponseBuilder; |
| 240 long long m_downloadedBlobLength; | |
| 241 RefPtr<ArrayBuffer> m_responseArrayBuffer; | 237 RefPtr<ArrayBuffer> m_responseArrayBuffer; |
| 242 | 238 |
| 243 bool m_error; | 239 bool m_error; |
| 244 | 240 |
| 245 bool m_uploadEventsAllowed; | 241 bool m_uploadEventsAllowed; |
| 246 bool m_uploadComplete; | 242 bool m_uploadComplete; |
| 247 | 243 |
| 248 bool m_sameOriginRequest; | 244 bool m_sameOriginRequest; |
| 249 | 245 |
| 250 // Used for onprogress tracking | 246 // Used for onprogress tracking |
| (...skipping 10 matching lines...) Expand all Loading... |
| 261 | 257 |
| 262 // An enum corresponding to the allowed string values for the responseType a
ttribute. | 258 // An enum corresponding to the allowed string values for the responseType a
ttribute. |
| 263 ResponseTypeCode m_responseTypeCode; | 259 ResponseTypeCode m_responseTypeCode; |
| 264 AsyncMethodRunner<XMLHttpRequest> m_dropProtectionRunner; | 260 AsyncMethodRunner<XMLHttpRequest> m_dropProtectionRunner; |
| 265 RefPtr<SecurityOrigin> m_securityOrigin; | 261 RefPtr<SecurityOrigin> m_securityOrigin; |
| 266 }; | 262 }; |
| 267 | 263 |
| 268 } // namespace WebCore | 264 } // namespace WebCore |
| 269 | 265 |
| 270 #endif // XMLHttpRequest_h | 266 #endif // XMLHttpRequest_h |
| OLD | NEW |