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/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/XMLHttpRequestEventTarget.h" | 30 #include "core/xmlhttprequest/XMLHttpRequestEventTarget.h" |
31 #include "core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h" | 31 #include "core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h" |
32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
33 #include "platform/network/FormData.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" |
42 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
43 #include "wtf/text/AtomicString.h" | 43 #include "wtf/text/AtomicString.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 DOMArrayBuffer* responseArrayBuffer(); | 127 DOMArrayBuffer* responseArrayBuffer(); |
128 Stream* responseLegacyStream(); | 128 Stream* responseLegacyStream(); |
129 unsigned timeout() const { return m_timeoutMilliseconds; } | 129 unsigned timeout() const { return m_timeoutMilliseconds; } |
130 void setTimeout(unsigned timeout, ExceptionState&); | 130 void setTimeout(unsigned timeout, ExceptionState&); |
131 ResponseTypeCode responseTypeCode() const { return m_responseTypeCode; } | 131 ResponseTypeCode responseTypeCode() const { return m_responseTypeCode; } |
132 String responseType(); | 132 String responseType(); |
133 void setResponseType(const String&, ExceptionState&); | 133 void setResponseType(const String&, ExceptionState&); |
134 String responseURL(); | 134 String responseURL(); |
135 | 135 |
136 // For Inspector. | 136 // For Inspector. |
137 void sendForInspectorXHRReplay(PassRefPtr<FormData>, ExceptionState&); | 137 void sendForInspectorXHRReplay(PassRefPtr<EncodedFormData>, ExceptionState&)
; |
138 | 138 |
139 XMLHttpRequestUpload* upload(); | 139 XMLHttpRequestUpload* upload(); |
140 | 140 |
141 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); | 141 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); |
142 | 142 |
143 // (Also) eagerly finalized so as to prevent access to the eagerly finalized | 143 // (Also) eagerly finalized so as to prevent access to the eagerly finalized |
144 // progress event throttle. | 144 // progress event throttle. |
145 EAGERLY_FINALIZE(); | 145 EAGERLY_FINALIZE(); |
146 #if !ENABLE(OILPAN) | 146 #if !ENABLE(OILPAN) |
147 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); | 147 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW(); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // Returns false iff reentry happened and a new load is started. | 224 // Returns false iff reentry happened and a new load is started. |
225 // | 225 // |
226 // This method may invoke V8 GC with m_loader unset. If you touch the | 226 // This method may invoke V8 GC with m_loader unset. If you touch the |
227 // XMLHttpRequest instance after internalAbort() call, you must hold a | 227 // XMLHttpRequest instance after internalAbort() call, you must hold a |
228 // refcount on it to prevent it from destroyed. | 228 // refcount on it to prevent it from destroyed. |
229 bool internalAbort(); | 229 bool internalAbort(); |
230 // Clears variables holding response header and body data. | 230 // Clears variables holding response header and body data. |
231 void clearResponse(); | 231 void clearResponse(); |
232 void clearRequest(); | 232 void clearRequest(); |
233 | 233 |
234 void createRequest(PassRefPtr<FormData>, ExceptionState&); | 234 void createRequest(PassRefPtr<EncodedFormData>, ExceptionState&); |
235 | 235 |
236 // Dispatches a response ProgressEvent. | 236 // Dispatches a response ProgressEvent. |
237 void dispatchProgressEvent(const AtomicString&, long long, long long); | 237 void dispatchProgressEvent(const AtomicString&, long long, long long); |
238 // Dispatches a response ProgressEvent using values sampled from | 238 // Dispatches a response ProgressEvent using values sampled from |
239 // m_receivedLength and m_response. | 239 // m_receivedLength and m_response. |
240 void dispatchProgressEventFromSnapshot(const AtomicString&); | 240 void dispatchProgressEventFromSnapshot(const AtomicString&); |
241 | 241 |
242 // Handles didFail() call not caused by cancellation or timeout. | 242 // Handles didFail() call not caused by cancellation or timeout. |
243 void handleNetworkError(); | 243 void handleNetworkError(); |
244 // Handles didFail() call for cancellations. For example, the | 244 // Handles didFail() call for cancellations. For example, the |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |