| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 virtual void refEventTarget() OVERRIDE { ref(); } | 151 virtual void refEventTarget() OVERRIDE { ref(); } |
| 152 virtual void derefEventTarget() OVERRIDE { deref(); } | 152 virtual void derefEventTarget() OVERRIDE { deref(); } |
| 153 | 153 |
| 154 Document* document() const; | 154 Document* document() const; |
| 155 SecurityOrigin* securityOrigin() const; | 155 SecurityOrigin* securityOrigin() const; |
| 156 | 156 |
| 157 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent); | 157 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent); |
| 158 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&); | 158 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&); |
| 159 virtual void didReceiveData(const char* data, int dataLength); | 159 virtual void didReceiveData(const char* data, int dataLength); |
| 160 // When "blob" is specified as the responseType attribute, didDownloadData |
| 161 // is called instead of didReceiveData. |
| 162 virtual void didDownloadData(int dataLength); |
| 160 virtual void didFinishLoading(unsigned long identifier, double finishTime); | 163 virtual void didFinishLoading(unsigned long identifier, double finishTime); |
| 161 virtual void didFail(const ResourceError&); | 164 virtual void didFail(const ResourceError&); |
| 162 virtual void didFailRedirectCheck(); | 165 virtual void didFailRedirectCheck(); |
| 163 | 166 |
| 164 String responseMIMEType() const; | 167 String responseMIMEType() const; |
| 165 bool responseIsXML() const; | 168 bool responseIsXML() const; |
| 166 | 169 |
| 167 bool areMethodAndURLValidForSend(); | 170 bool areMethodAndURLValidForSend(); |
| 168 | 171 |
| 169 bool initSend(ExceptionState&); | 172 bool initSend(ExceptionState&); |
| 170 void sendBytesData(const void*, size_t, ExceptionState&); | 173 void sendBytesData(const void*, size_t, ExceptionState&); |
| 171 | 174 |
| 172 String getRequestHeader(const AtomicString& name) const; | 175 String getRequestHeader(const AtomicString& name) const; |
| 173 void setRequestHeaderInternal(const AtomicString& name, const String& value)
; | 176 void setRequestHeaderInternal(const AtomicString& name, const String& value)
; |
| 174 | 177 |
| 178 void trackProgress(int dataLength); |
| 175 // Changes m_state and dispatches a readyStateChange event if new m_state | 179 // Changes m_state and dispatches a readyStateChange event if new m_state |
| 176 // value is different from last one. | 180 // value is different from last one. |
| 177 void changeState(State newState); | 181 void changeState(State newState); |
| 178 void callReadyStateChangeListener(); | 182 void callReadyStateChangeListener(); |
| 179 void dropProtectionSoon(); | 183 void dropProtectionSoon(); |
| 180 void dropProtection(Timer<XMLHttpRequest>* = 0); | 184 void dropProtection(Timer<XMLHttpRequest>* = 0); |
| 181 // Returns false iff reentry happened and a new load is started. | 185 // Returns false iff reentry happened and a new load is started. |
| 182 bool internalAbort(DropProtection = DropProtectionSync); | 186 bool internalAbort(DropProtection = DropProtectionSync); |
| 183 void clearResponse(); | 187 void clearResponse(); |
| 184 void clearResponseBuffers(); | 188 void clearResponseBuffers(); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 251 |
| 248 // An enum corresponding to the allowed string values for the responseType a
ttribute. | 252 // An enum corresponding to the allowed string values for the responseType a
ttribute. |
| 249 ResponseTypeCode m_responseTypeCode; | 253 ResponseTypeCode m_responseTypeCode; |
| 250 Timer<XMLHttpRequest> m_protectionTimer; | 254 Timer<XMLHttpRequest> m_protectionTimer; |
| 251 RefPtr<SecurityOrigin> m_securityOrigin; | 255 RefPtr<SecurityOrigin> m_securityOrigin; |
| 252 }; | 256 }; |
| 253 | 257 |
| 254 } // namespace WebCore | 258 } // namespace WebCore |
| 255 | 259 |
| 256 #endif // XMLHttpRequest_h | 260 #endif // XMLHttpRequest_h |
| OLD | NEW |