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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 class Stream; | 62 class Stream; |
63 class TextResourceDecoder; | 63 class TextResourceDecoder; |
64 class ThreadableLoader; | 64 class ThreadableLoader; |
65 class WebDataConsumerHandle; | 65 class WebDataConsumerHandle; |
66 class XMLHttpRequestUpload; | 66 class XMLHttpRequestUpload; |
67 | 67 |
68 typedef int ExceptionCode; | 68 typedef int ExceptionCode; |
69 | 69 |
70 class XMLHttpRequest final : public XMLHttpRequestEventTarget, private Threadabl
eLoaderClient, public DocumentParserClient, public ActiveScriptWrappable, public
ActiveDOMObject { | 70 class XMLHttpRequest final : public XMLHttpRequestEventTarget, private Threadabl
eLoaderClient, public DocumentParserClient, public ActiveScriptWrappable, public
ActiveDOMObject { |
71 DEFINE_WRAPPERTYPEINFO(); | 71 DEFINE_WRAPPERTYPEINFO(); |
72 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequest); | 72 USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequest); |
73 public: | 73 public: |
74 static XMLHttpRequest* create(ScriptState*); | 74 static XMLHttpRequest* create(ScriptState*); |
75 static XMLHttpRequest* create(ExecutionContext*); | 75 static XMLHttpRequest* create(ExecutionContext*); |
76 ~XMLHttpRequest() override; | 76 ~XMLHttpRequest() override; |
77 | 77 |
78 // These exact numeric values are important because JS expects them. | 78 // These exact numeric values are important because JS expects them. |
79 enum State { | 79 enum State { |
80 UNSENT = 0, | 80 UNSENT = 0, |
81 OPENED = 1, | 81 OPENED = 1, |
82 HEADERS_RECEIVED = 2, | 82 HEADERS_RECEIVED = 2, |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 OwnPtr<ThreadableLoader> m_loader; | 270 OwnPtr<ThreadableLoader> m_loader; |
271 State m_state; | 271 State m_state; |
272 | 272 |
273 ResourceResponse m_response; | 273 ResourceResponse m_response; |
274 String m_finalResponseCharset; | 274 String m_finalResponseCharset; |
275 | 275 |
276 OwnPtr<TextResourceDecoder> m_decoder; | 276 OwnPtr<TextResourceDecoder> m_decoder; |
277 | 277 |
278 ScriptString m_responseText; | 278 ScriptString m_responseText; |
279 RefPtrWillBeMember<Document> m_responseDocument; | 279 Member<Document> m_responseDocument; |
280 RefPtrWillBeMember<DocumentParser> m_responseDocumentParser; | 280 Member<DocumentParser> m_responseDocumentParser; |
281 | 281 |
282 RefPtr<SharedBuffer> m_binaryResponseBuilder; | 282 RefPtr<SharedBuffer> m_binaryResponseBuilder; |
283 long long m_lengthDownloadedToFile; | 283 long long m_lengthDownloadedToFile; |
284 | 284 |
285 RefPtr<DOMArrayBuffer> m_responseArrayBuffer; | 285 RefPtr<DOMArrayBuffer> m_responseArrayBuffer; |
286 | 286 |
287 // Used for onprogress tracking | 287 // Used for onprogress tracking |
288 long long m_receivedLength; | 288 long long m_receivedLength; |
289 | 289 |
290 // An exception to throw in synchronous mode. It's set when failure | 290 // An exception to throw in synchronous mode. It's set when failure |
(...skipping 27 matching lines...) Expand all Loading... |
318 bool m_sameOriginRequest; | 318 bool m_sameOriginRequest; |
319 // True iff the ongoing resource loading is using the downloadToFile | 319 // True iff the ongoing resource loading is using the downloadToFile |
320 // option. | 320 // option. |
321 bool m_downloadingToFile; | 321 bool m_downloadingToFile; |
322 bool m_responseTextOverflow; | 322 bool m_responseTextOverflow; |
323 }; | 323 }; |
324 | 324 |
325 } // namespace blink | 325 } // namespace blink |
326 | 326 |
327 #endif // XMLHttpRequest_h | 327 #endif // XMLHttpRequest_h |
OLD | NEW |