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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // When responseType is set to "blob", didDownloadData() is called instead | 156 // When responseType is set to "blob", didDownloadData() is called instead |
157 // of didReceiveData(). | 157 // of didReceiveData(). |
158 virtual void didDownloadData(int dataLength) OVERRIDE; | 158 virtual void didDownloadData(int dataLength) OVERRIDE; |
159 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; | 159 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; |
160 virtual void didFail(const ResourceError&) OVERRIDE; | 160 virtual void didFail(const ResourceError&) OVERRIDE; |
161 virtual void didFailRedirectCheck() OVERRIDE; | 161 virtual void didFailRedirectCheck() OVERRIDE; |
162 | 162 |
163 AtomicString responseMIMEType() const; | 163 AtomicString responseMIMEType() const; |
164 bool responseIsXML() const; | 164 bool responseIsXML() const; |
165 | 165 |
| 166 PassOwnPtr<TextResourceDecoder> createDecoder() const; |
| 167 |
| 168 void initResponseDocument(); |
166 bool areMethodAndURLValidForSend(); | 169 bool areMethodAndURLValidForSend(); |
167 | 170 |
168 bool initSend(ExceptionState&); | 171 bool initSend(ExceptionState&); |
169 void sendBytesData(const void*, size_t, ExceptionState&); | 172 void sendBytesData(const void*, size_t, ExceptionState&); |
170 | 173 |
171 const AtomicString& getRequestHeader(const AtomicString& name) const; | 174 const AtomicString& getRequestHeader(const AtomicString& name) const; |
172 void setRequestHeaderInternal(const AtomicString& name, const AtomicString&
value); | 175 void setRequestHeaderInternal(const AtomicString& name, const AtomicString&
value); |
173 | 176 |
174 void trackProgress(int dataLength); | 177 void trackProgress(int dataLength); |
175 // Changes m_state and dispatches a readyStateChange event if new m_state | 178 // Changes m_state and dispatches a readyStateChange event if new m_state |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // An enum corresponding to the allowed string values for the responseType a
ttribute. | 248 // An enum corresponding to the allowed string values for the responseType a
ttribute. |
246 ResponseTypeCode m_responseTypeCode; | 249 ResponseTypeCode m_responseTypeCode; |
247 RefPtr<SecurityOrigin> m_securityOrigin; | 250 RefPtr<SecurityOrigin> m_securityOrigin; |
248 | 251 |
249 double m_previousReadyStateChangeFireTime; | 252 double m_previousReadyStateChangeFireTime; |
250 | 253 |
251 bool m_async; | 254 bool m_async; |
252 bool m_includeCredentials; | 255 bool m_includeCredentials; |
253 // Used to skip m_responseDocument creation if it's done previously. We need | 256 // Used to skip m_responseDocument creation if it's done previously. We need |
254 // this separate flag since m_responseDocument can be 0 for some cases. | 257 // this separate flag since m_responseDocument can be 0 for some cases. |
255 bool m_createdDocument; | 258 bool m_parsedResponse; |
256 bool m_error; | 259 bool m_error; |
257 bool m_uploadEventsAllowed; | 260 bool m_uploadEventsAllowed; |
258 bool m_uploadComplete; | 261 bool m_uploadComplete; |
259 bool m_sameOriginRequest; | 262 bool m_sameOriginRequest; |
260 }; | 263 }; |
261 | 264 |
262 } // namespace blink | 265 } // namespace blink |
263 | 266 |
264 #endif // XMLHttpRequest_h | 267 #endif // XMLHttpRequest_h |
OLD | NEW |