| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class ResourceRequest; | 49 class ResourceRequest; |
| 50 class SecurityOrigin; | 50 class SecurityOrigin; |
| 51 class SharedBuffer; | 51 class SharedBuffer; |
| 52 class Stream; | 52 class Stream; |
| 53 class TextResourceDecoder; | 53 class TextResourceDecoder; |
| 54 class ThreadableLoader; | 54 class ThreadableLoader; |
| 55 class UnderlyingSource; | 55 class UnderlyingSource; |
| 56 | 56 |
| 57 typedef int ExceptionCode; | 57 typedef int ExceptionCode; |
| 58 | 58 |
| 59 class XMLHttpRequest FINAL | 59 class XMLHttpRequest final |
| 60 : public RefCountedWillBeGarbageCollectedFinalized<XMLHttpRequest> | 60 : public RefCountedWillBeGarbageCollectedFinalized<XMLHttpRequest> |
| 61 , public XMLHttpRequestEventTarget | 61 , public XMLHttpRequestEventTarget |
| 62 , private ThreadableLoaderClient | 62 , private ThreadableLoaderClient |
| 63 , public DocumentParserClient | 63 , public DocumentParserClient |
| 64 , public ActiveDOMObject { | 64 , public ActiveDOMObject { |
| 65 DEFINE_WRAPPERTYPEINFO(); | 65 DEFINE_WRAPPERTYPEINFO(); |
| 66 REFCOUNTED_EVENT_TARGET(XMLHttpRequest); | 66 REFCOUNTED_EVENT_TARGET(XMLHttpRequest); |
| 67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequest); | 67 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(XMLHttpRequest); |
| 68 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 68 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 69 public: | 69 public: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 83 ResponseTypeDefault, | 83 ResponseTypeDefault, |
| 84 ResponseTypeText, | 84 ResponseTypeText, |
| 85 ResponseTypeJSON, | 85 ResponseTypeJSON, |
| 86 ResponseTypeDocument, | 86 ResponseTypeDocument, |
| 87 ResponseTypeBlob, | 87 ResponseTypeBlob, |
| 88 ResponseTypeArrayBuffer, | 88 ResponseTypeArrayBuffer, |
| 89 ResponseTypeLegacyStream, | 89 ResponseTypeLegacyStream, |
| 90 ResponseTypeStream, | 90 ResponseTypeStream, |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 virtual void contextDestroyed() OVERRIDE; | 93 virtual void contextDestroyed() override; |
| 94 virtual void suspend() OVERRIDE; | 94 virtual void suspend() override; |
| 95 virtual void resume() OVERRIDE; | 95 virtual void resume() override; |
| 96 virtual void stop() OVERRIDE; | 96 virtual void stop() override; |
| 97 virtual bool hasPendingActivity() const OVERRIDE; | 97 virtual bool hasPendingActivity() const override; |
| 98 | 98 |
| 99 virtual const AtomicString& interfaceName() const OVERRIDE; | 99 virtual const AtomicString& interfaceName() const override; |
| 100 virtual ExecutionContext* executionContext() const OVERRIDE; | 100 virtual ExecutionContext* executionContext() const override; |
| 101 | 101 |
| 102 const KURL& url() const { return m_url; } | 102 const KURL& url() const { return m_url; } |
| 103 String statusText() const; | 103 String statusText() const; |
| 104 int status() const; | 104 int status() const; |
| 105 State readyState() const; | 105 State readyState() const; |
| 106 bool withCredentials() const { return m_includeCredentials; } | 106 bool withCredentials() const { return m_includeCredentials; } |
| 107 void setWithCredentials(bool, ExceptionState&); | 107 void setWithCredentials(bool, ExceptionState&); |
| 108 void open(const AtomicString& method, const KURL&, ExceptionState&); | 108 void open(const AtomicString& method, const KURL&, ExceptionState&); |
| 109 void open(const AtomicString& method, const KURL&, bool async, ExceptionStat
e&); | 109 void open(const AtomicString& method, const KURL&, bool async, ExceptionStat
e&); |
| 110 void open(const AtomicString& method, const KURL&, bool async, const String&
user, ExceptionState&); | 110 void open(const AtomicString& method, const KURL&, bool async, const String&
user, ExceptionState&); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // response attribute has custom getter. | 144 // response attribute has custom getter. |
| 145 ArrayBuffer* responseArrayBuffer(); | 145 ArrayBuffer* responseArrayBuffer(); |
| 146 | 146 |
| 147 void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lin
eNumber; } | 147 void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lin
eNumber; } |
| 148 void setLastSendURL(const String& url) { m_lastSendURL = url; } | 148 void setLastSendURL(const String& url) { m_lastSendURL = url; } |
| 149 | 149 |
| 150 XMLHttpRequestUpload* upload(); | 150 XMLHttpRequestUpload* upload(); |
| 151 | 151 |
| 152 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); | 152 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); |
| 153 | 153 |
| 154 virtual void trace(Visitor*) OVERRIDE; | 154 virtual void trace(Visitor*) override; |
| 155 | 155 |
| 156 private: | 156 private: |
| 157 class BlobLoader; | 157 class BlobLoader; |
| 158 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); | 158 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); |
| 159 | 159 |
| 160 Document* document() const; | 160 Document* document() const; |
| 161 SecurityOrigin* securityOrigin() const; | 161 SecurityOrigin* securityOrigin() const; |
| 162 | 162 |
| 163 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) OVERRIDE; | 163 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) override; |
| 164 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) OVERRIDE; | 164 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) override; |
| 165 virtual void didReceiveData(const char* data, unsigned dataLength) OVERRIDE; | 165 virtual void didReceiveData(const char* data, unsigned dataLength) override; |
| 166 // When responseType is set to "blob", didDownloadData() is called instead | 166 // When responseType is set to "blob", didDownloadData() is called instead |
| 167 // of didReceiveData(). | 167 // of didReceiveData(). |
| 168 virtual void didDownloadData(int dataLength) OVERRIDE; | 168 virtual void didDownloadData(int dataLength) override; |
| 169 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; | 169 virtual void didFinishLoading(unsigned long identifier, double finishTime) o
verride; |
| 170 virtual void didFail(const ResourceError&) OVERRIDE; | 170 virtual void didFail(const ResourceError&) override; |
| 171 virtual void didFailRedirectCheck() OVERRIDE; | 171 virtual void didFailRedirectCheck() override; |
| 172 | 172 |
| 173 // BlobLoader notifications. | 173 // BlobLoader notifications. |
| 174 void didFinishLoadingInternal(); | 174 void didFinishLoadingInternal(); |
| 175 void didFinishLoadingFromBlob(); | 175 void didFinishLoadingFromBlob(); |
| 176 void didFailLoadingFromBlob(); | 176 void didFailLoadingFromBlob(); |
| 177 | 177 |
| 178 PassRefPtr<BlobDataHandle> createBlobDataHandleFromResponse(); | 178 PassRefPtr<BlobDataHandle> createBlobDataHandleFromResponse(); |
| 179 | 179 |
| 180 // DocumentParserClient | 180 // DocumentParserClient |
| 181 virtual void notifyParserStopped() OVERRIDE; | 181 virtual void notifyParserStopped() override; |
| 182 | 182 |
| 183 void endLoading(); | 183 void endLoading(); |
| 184 | 184 |
| 185 // Returns the MIME type part of m_mimeTypeOverride if present and | 185 // Returns the MIME type part of m_mimeTypeOverride if present and |
| 186 // successfully parsed, or returns one of the "Content-Type" header value | 186 // successfully parsed, or returns one of the "Content-Type" header value |
| 187 // of the received response. | 187 // of the received response. |
| 188 // | 188 // |
| 189 // This method is named after the term "final MIME type" defined in the | 189 // This method is named after the term "final MIME type" defined in the |
| 190 // spec but doesn't convert the result to ASCII lowercase as specified in | 190 // spec but doesn't convert the result to ASCII lowercase as specified in |
| 191 // the spec. Must be lowered later or compared using case insensitive | 191 // the spec. Must be lowered later or compared using case insensitive |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 bool m_uploadComplete; | 305 bool m_uploadComplete; |
| 306 bool m_sameOriginRequest; | 306 bool m_sameOriginRequest; |
| 307 // True iff the ongoing resource loading is using the downloadToFile | 307 // True iff the ongoing resource loading is using the downloadToFile |
| 308 // option. | 308 // option. |
| 309 bool m_downloadingToFile; | 309 bool m_downloadingToFile; |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 } // namespace blink | 312 } // namespace blink |
| 313 | 313 |
| 314 #endif // XMLHttpRequest_h | 314 #endif // XMLHttpRequest_h |
| OLD | NEW |