| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 virtual void trace(Visitor*) OVERRIDE; | 153 virtual void trace(Visitor*) OVERRIDE; |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); | 156 XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>); |
| 157 | 157 |
| 158 Document* document() const; | 158 Document* document() const; |
| 159 SecurityOrigin* securityOrigin() const; | 159 SecurityOrigin* securityOrigin() const; |
| 160 | 160 |
| 161 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) OVERRIDE; | 161 virtual void didSendData(unsigned long long bytesSent, unsigned long long to
talBytesToBeSent) OVERRIDE; |
| 162 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) OVERRIDE; | 162 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse&) OVERRIDE; |
| 163 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; | 163 virtual void didReceiveData(const char* data, unsigned dataLength) OVERRIDE; |
| 164 // When responseType is set to "blob", didDownloadData() is called instead | 164 // When responseType is set to "blob", didDownloadData() is called instead |
| 165 // of didReceiveData(). | 165 // of didReceiveData(). |
| 166 virtual void didDownloadData(int dataLength) OVERRIDE; | 166 virtual void didDownloadData(int dataLength) OVERRIDE; |
| 167 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; | 167 virtual void didFinishLoading(unsigned long identifier, double finishTime) O
VERRIDE; |
| 168 virtual void didFail(const ResourceError&) OVERRIDE; | 168 virtual void didFail(const ResourceError&) OVERRIDE; |
| 169 virtual void didFailRedirectCheck() OVERRIDE; | 169 virtual void didFailRedirectCheck() OVERRIDE; |
| 170 | 170 |
| 171 // DocumentParserClient | 171 // DocumentParserClient |
| 172 virtual void notifyParserStopped() OVERRIDE; | 172 virtual void notifyParserStopped() OVERRIDE; |
| 173 | 173 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 184 AtomicString finalResponseMIMEType() const; | 184 AtomicString finalResponseMIMEType() const; |
| 185 // The same as finalResponseMIMEType() but fallbacks to "text/xml" if | 185 // The same as finalResponseMIMEType() but fallbacks to "text/xml" if |
| 186 // finalResponseMIMEType() returns an empty string. | 186 // finalResponseMIMEType() returns an empty string. |
| 187 AtomicString finalResponseMIMETypeWithFallback() const; | 187 AtomicString finalResponseMIMETypeWithFallback() const; |
| 188 bool responseIsXML() const; | 188 bool responseIsXML() const; |
| 189 bool responseIsHTML() const; | 189 bool responseIsHTML() const; |
| 190 | 190 |
| 191 PassOwnPtr<TextResourceDecoder> createDecoder() const; | 191 PassOwnPtr<TextResourceDecoder> createDecoder() const; |
| 192 | 192 |
| 193 void initResponseDocument(); | 193 void initResponseDocument(); |
| 194 void parseDocumentChunk(const char* data, int dataLength); | 194 void parseDocumentChunk(const char* data, unsigned dataLength); |
| 195 | 195 |
| 196 bool areMethodAndURLValidForSend(); | 196 bool areMethodAndURLValidForSend(); |
| 197 | 197 |
| 198 bool initSend(ExceptionState&); | 198 bool initSend(ExceptionState&); |
| 199 void sendBytesData(const void*, size_t, ExceptionState&); | 199 void sendBytesData(const void*, size_t, ExceptionState&); |
| 200 | 200 |
| 201 const AtomicString& getRequestHeader(const AtomicString& name) const; | 201 const AtomicString& getRequestHeader(const AtomicString& name) const; |
| 202 void setRequestHeaderInternal(const AtomicString& name, const AtomicString&
value); | 202 void setRequestHeaderInternal(const AtomicString& name, const AtomicString&
value); |
| 203 | 203 |
| 204 void trackProgress(int dataLength); | 204 void trackProgress(long long dataLength); |
| 205 // Changes m_state and dispatches a readyStateChange event if new m_state | 205 // Changes m_state and dispatches a readyStateChange event if new m_state |
| 206 // value is different from last one. | 206 // value is different from last one. |
| 207 void changeState(State newState); | 207 void changeState(State newState); |
| 208 void dispatchReadyStateChangeEvent(); | 208 void dispatchReadyStateChangeEvent(); |
| 209 | 209 |
| 210 // Clears variables used only while the resource is being loaded. | 210 // Clears variables used only while the resource is being loaded. |
| 211 void clearVariablesForLoading(); | 211 void clearVariablesForLoading(); |
| 212 // Returns false iff reentry happened and a new load is started. | 212 // Returns false iff reentry happened and a new load is started. |
| 213 bool internalAbort(); | 213 bool internalAbort(); |
| 214 // Clears variables holding response header and body data. | 214 // Clears variables holding response header and body data. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 bool m_uploadComplete; | 292 bool m_uploadComplete; |
| 293 bool m_sameOriginRequest; | 293 bool m_sameOriginRequest; |
| 294 // True iff the ongoing resource loading is using the downloadToFile | 294 // True iff the ongoing resource loading is using the downloadToFile |
| 295 // option. | 295 // option. |
| 296 bool m_downloadingToFile; | 296 bool m_downloadingToFile; |
| 297 }; | 297 }; |
| 298 | 298 |
| 299 } // namespace blink | 299 } // namespace blink |
| 300 | 300 |
| 301 #endif // XMLHttpRequest_h | 301 #endif // XMLHttpRequest_h |
| OLD | NEW |