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 12 matching lines...) Expand all Loading... |
23 #define XMLHttpRequest_h | 23 #define XMLHttpRequest_h |
24 | 24 |
25 #include "bindings/v8/ScriptString.h" | 25 #include "bindings/v8/ScriptString.h" |
26 #include "bindings/v8/ScriptWrappable.h" | 26 #include "bindings/v8/ScriptWrappable.h" |
27 #include "core/dom/ActiveDOMObject.h" | 27 #include "core/dom/ActiveDOMObject.h" |
28 #include "core/events/EventListener.h" | 28 #include "core/events/EventListener.h" |
29 #include "core/events/ThreadLocalEventNames.h" | 29 #include "core/events/ThreadLocalEventNames.h" |
30 #include "core/loader/ThreadableLoaderClient.h" | 30 #include "core/loader/ThreadableLoaderClient.h" |
31 #include "core/xml/XMLHttpRequestEventTarget.h" | 31 #include "core/xml/XMLHttpRequestEventTarget.h" |
32 #include "core/xml/XMLHttpRequestProgressEventThrottle.h" | 32 #include "core/xml/XMLHttpRequestProgressEventThrottle.h" |
| 33 #include "platform/AsyncMethodRunner.h" |
33 #include "platform/network/FormData.h" | 34 #include "platform/network/FormData.h" |
34 #include "platform/network/ResourceResponse.h" | 35 #include "platform/network/ResourceResponse.h" |
35 #include "weborigin/SecurityOrigin.h" | 36 #include "weborigin/SecurityOrigin.h" |
36 #include "wtf/OwnPtr.h" | 37 #include "wtf/OwnPtr.h" |
37 #include "wtf/text/AtomicStringHash.h" | 38 #include "wtf/text/AtomicStringHash.h" |
38 #include "wtf/text/StringBuilder.h" | 39 #include "wtf/text/StringBuilder.h" |
39 | 40 |
40 namespace WebCore { | 41 namespace WebCore { |
41 | 42 |
42 class Blob; | 43 class Blob; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 166 |
166 String getRequestHeader(const AtomicString& name) const; | 167 String getRequestHeader(const AtomicString& name) const; |
167 void setRequestHeaderInternal(const AtomicString& name, const String& value)
; | 168 void setRequestHeaderInternal(const AtomicString& name, const String& value)
; |
168 | 169 |
169 // Changes m_state and dispatches a readyStateChange event if new m_state | 170 // Changes m_state and dispatches a readyStateChange event if new m_state |
170 // value is different from last one. | 171 // value is different from last one. |
171 void changeState(State newState); | 172 void changeState(State newState); |
172 void dispatchReadyStateChangeEvent(); | 173 void dispatchReadyStateChangeEvent(); |
173 | 174 |
174 void dropProtectionSoon(); | 175 void dropProtectionSoon(); |
175 void dropProtection(Timer<XMLHttpRequest>* = 0); | 176 void dropProtection(); |
176 // Clears variables used only while the resource is being loaded. | 177 // Clears variables used only while the resource is being loaded. |
177 void clearVariablesForLoading(); | 178 void clearVariablesForLoading(); |
178 // Returns false iff reentry happened and a new load is started. | 179 // Returns false iff reentry happened and a new load is started. |
179 bool internalAbort(DropProtection = DropProtectionSync); | 180 bool internalAbort(DropProtection = DropProtectionSync); |
180 // Clears variables holding response header and body data. If it's needed | 181 // Clears variables holding response header and body data. If it's needed |
181 // to keep response header data, use clearResponseBuffers(). | 182 // to keep response header data, use clearResponseBuffers(). |
182 void clearResponse(); | 183 void clearResponse(); |
183 // Clears variables holding response body data. | 184 // Clears variables holding response body data. |
184 void clearResponseBuffers(); | 185 void clearResponseBuffers(); |
185 void clearRequest(); | 186 void clearRequest(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 String m_lastSendURL; | 243 String m_lastSendURL; |
243 // An exception to throw in synchronous mode. It's set when failure | 244 // An exception to throw in synchronous mode. It's set when failure |
244 // notification is received from m_loader and thrown at the end of send() if | 245 // notification is received from m_loader and thrown at the end of send() if |
245 // any. | 246 // any. |
246 ExceptionCode m_exceptionCode; | 247 ExceptionCode m_exceptionCode; |
247 | 248 |
248 XMLHttpRequestProgressEventThrottle m_progressEventThrottle; | 249 XMLHttpRequestProgressEventThrottle m_progressEventThrottle; |
249 | 250 |
250 // An enum corresponding to the allowed string values for the responseType a
ttribute. | 251 // An enum corresponding to the allowed string values for the responseType a
ttribute. |
251 ResponseTypeCode m_responseTypeCode; | 252 ResponseTypeCode m_responseTypeCode; |
252 Timer<XMLHttpRequest> m_protectionTimer; | 253 AsyncMethodRunner<XMLHttpRequest> m_dropProtectionRunner; |
253 RefPtr<SecurityOrigin> m_securityOrigin; | 254 RefPtr<SecurityOrigin> m_securityOrigin; |
254 }; | 255 }; |
255 | 256 |
256 } // namespace WebCore | 257 } // namespace WebCore |
257 | 258 |
258 #endif // XMLHttpRequest_h | 259 #endif // XMLHttpRequest_h |
OLD | NEW |