| 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. |
| 11 * | 11 * |
| 12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Lesser General Public License for more details. | 15 * Lesser General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Lesser General Public | 17 * You should have received a copy of the GNU Lesser General Public |
| 18 * License along with this library; if not, write to the Free Software | 18 * License along with this library; if not, write to the Free Software |
| 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U
SA | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U
SA |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef XMLHttpRequest_h | 22 #ifndef XMLHttpRequest_h |
| 23 #define XMLHttpRequest_h | 23 #define XMLHttpRequest_h |
| 24 | 24 |
| 25 #include "bindings/core/v8/ScriptString.h" | 25 #include "bindings/core/v8/ScriptString.h" |
| 26 #include "bindings/core/v8/ScriptWrappable.h" | 26 #include "bindings/core/v8/ScriptWrappable.h" |
| 27 #include "core/dom/ActiveDOMObject.h" | 27 #include "core/dom/ActiveDOMObject.h" |
| 28 #include "core/dom/DocumentParserClient.h" | 28 #include "core/dom/DocumentParserClient.h" |
| 29 #include "core/loader/ThreadableLoaderClient.h" | 29 #include "core/loader/ThreadableLoaderClient.h" |
| 30 #include "core/xmlhttprequest/ProgressEventThrottle.h" |
| 30 #include "core/xmlhttprequest/XMLHttpRequestEventTarget.h" | 31 #include "core/xmlhttprequest/XMLHttpRequestEventTarget.h" |
| 31 #include "core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h" | |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 #include "platform/network/EncodedFormData.h" | 33 #include "platform/network/EncodedFormData.h" |
| 34 #include "platform/network/HTTPHeaderMap.h" | 34 #include "platform/network/HTTPHeaderMap.h" |
| 35 #include "platform/network/ResourceResponse.h" | 35 #include "platform/network/ResourceResponse.h" |
| 36 #include "platform/weborigin/KURL.h" | 36 #include "platform/weborigin/KURL.h" |
| 37 #include "platform/weborigin/SecurityOrigin.h" | 37 #include "platform/weborigin/SecurityOrigin.h" |
| 38 #include "wtf/Forward.h" | 38 #include "wtf/Forward.h" |
| 39 #include "wtf/OwnPtr.h" | 39 #include "wtf/OwnPtr.h" |
| 40 #include "wtf/PassOwnPtr.h" | 40 #include "wtf/PassOwnPtr.h" |
| 41 #include "wtf/PassRefPtr.h" | 41 #include "wtf/PassRefPtr.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 void handleNetworkError(); | 243 void handleNetworkError(); |
| 244 // Handles didFail() call for cancellations. For example, the | 244 // Handles didFail() call for cancellations. For example, the |
| 245 // ResourceLoader handling the load notifies m_loader of an error | 245 // ResourceLoader handling the load notifies m_loader of an error |
| 246 // cancellation when the frame containing the XHR navigates away. | 246 // cancellation when the frame containing the XHR navigates away. |
| 247 void handleDidCancel(); | 247 void handleDidCancel(); |
| 248 // Handles didFail() call for timeout. | 248 // Handles didFail() call for timeout. |
| 249 void handleDidTimeout(); | 249 void handleDidTimeout(); |
| 250 | 250 |
| 251 void handleRequestError(ExceptionCode, const AtomicString&, long long, long
long); | 251 void handleRequestError(ExceptionCode, const AtomicString&, long long, long
long); |
| 252 | 252 |
| 253 XMLHttpRequestProgressEventThrottle& progressEventThrottle(); | 253 ProgressEventThrottle& progressEventThrottle(); |
| 254 | 254 |
| 255 Member<XMLHttpRequestUpload> m_upload; | 255 Member<XMLHttpRequestUpload> m_upload; |
| 256 | 256 |
| 257 KURL m_url; | 257 KURL m_url; |
| 258 AtomicString m_method; | 258 AtomicString m_method; |
| 259 HTTPHeaderMap m_requestHeaders; | 259 HTTPHeaderMap m_requestHeaders; |
| 260 // Not converted to ASCII lowercase. Must be lowered later or compared | 260 // Not converted to ASCII lowercase. Must be lowered later or compared |
| 261 // using case insensitive comparison functions if needed. | 261 // using case insensitive comparison functions if needed. |
| 262 AtomicString m_mimeTypeOverride; | 262 AtomicString m_mimeTypeOverride; |
| 263 unsigned long m_timeoutMilliseconds; | 263 unsigned long m_timeoutMilliseconds; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 282 RefPtr<DOMArrayBuffer> m_responseArrayBuffer; | 282 RefPtr<DOMArrayBuffer> m_responseArrayBuffer; |
| 283 | 283 |
| 284 // Used for onprogress tracking | 284 // Used for onprogress tracking |
| 285 long long m_receivedLength; | 285 long long m_receivedLength; |
| 286 | 286 |
| 287 // An exception to throw in synchronous mode. It's set when failure | 287 // An exception to throw in synchronous mode. It's set when failure |
| 288 // notification is received from m_loader and thrown at the end of send() if | 288 // notification is received from m_loader and thrown at the end of send() if |
| 289 // any. | 289 // any. |
| 290 ExceptionCode m_exceptionCode; | 290 ExceptionCode m_exceptionCode; |
| 291 | 291 |
| 292 Member<XMLHttpRequestProgressEventThrottle> m_progressEventThrottle; | 292 Member<ProgressEventThrottle> m_progressEventThrottle; |
| 293 | 293 |
| 294 // An enum corresponding to the allowed string values for the responseType a
ttribute. | 294 // An enum corresponding to the allowed string values for the responseType a
ttribute. |
| 295 ResponseTypeCode m_responseTypeCode; | 295 ResponseTypeCode m_responseTypeCode; |
| 296 RefPtr<SecurityOrigin> m_isolatedWorldSecurityOrigin; | 296 RefPtr<SecurityOrigin> m_isolatedWorldSecurityOrigin; |
| 297 | 297 |
| 298 // This blob loader will be used if |m_downloadingToFile| is true and | 298 // This blob loader will be used if |m_downloadingToFile| is true and |
| 299 // |m_responseTypeCode| is NOT ResponseTypeBlob. | 299 // |m_responseTypeCode| is NOT ResponseTypeBlob. |
| 300 Member<BlobLoader> m_blobLoader; | 300 Member<BlobLoader> m_blobLoader; |
| 301 | 301 |
| 302 // Positive if we are dispatching events. | 302 // Positive if we are dispatching events. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 315 bool m_sameOriginRequest; | 315 bool m_sameOriginRequest; |
| 316 // True iff the ongoing resource loading is using the downloadToFile | 316 // True iff the ongoing resource loading is using the downloadToFile |
| 317 // option. | 317 // option. |
| 318 bool m_downloadingToFile; | 318 bool m_downloadingToFile; |
| 319 bool m_responseTextOverflow; | 319 bool m_responseTextOverflow; |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 } // namespace blink | 322 } // namespace blink |
| 323 | 323 |
| 324 #endif // XMLHttpRequest_h | 324 #endif // XMLHttpRequest_h |
| OLD | NEW |