Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: Source/core/xml/XMLHttpRequest.h

Issue 23444058: Use downloadToFile option when XHR downloads a Blob (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 virtual void refEventTarget() OVERRIDE { ref(); } 152 virtual void refEventTarget() OVERRIDE { ref(); }
153 virtual void derefEventTarget() OVERRIDE { deref(); } 153 virtual void derefEventTarget() OVERRIDE { deref(); }
154 154
155 Document* document() const; 155 Document* document() const;
156 SecurityOrigin* securityOrigin() const; 156 SecurityOrigin* securityOrigin() const;
157 157
158 virtual void didSendData(unsigned long long bytesSent, unsigned long long to talBytesToBeSent); 158 virtual void didSendData(unsigned long long bytesSent, unsigned long long to talBytesToBeSent);
159 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp onse&); 159 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp onse&);
160 virtual void didReceiveData(const char* data, int dataLength); 160 virtual void didReceiveData(const char* data, int dataLength);
161 // When "blob" is specified as the responseType attribute, didDownloadData
162 // is called instead of didReceiveData.
163 virtual void didDownloadData(int dataLength);
161 virtual void didFinishLoading(unsigned long identifier, double finishTime); 164 virtual void didFinishLoading(unsigned long identifier, double finishTime);
162 virtual void didFail(const ResourceError&); 165 virtual void didFail(const ResourceError&);
163 virtual void didFailRedirectCheck(); 166 virtual void didFailRedirectCheck();
164 167
165 String responseMIMEType() const; 168 String responseMIMEType() const;
166 bool responseIsXML() const; 169 bool responseIsXML() const;
167 170
168 bool areMethodAndURLValidForSend(); 171 bool areMethodAndURLValidForSend();
169 172
170 bool initSend(ExceptionState&); 173 bool initSend(ExceptionState&);
171 void sendBytesData(const void*, size_t, ExceptionState&); 174 void sendBytesData(const void*, size_t, ExceptionState&);
172 175
173 String getRequestHeader(const AtomicString& name) const; 176 String getRequestHeader(const AtomicString& name) const;
174 void setRequestHeaderInternal(const AtomicString& name, const String& value) ; 177 void setRequestHeaderInternal(const AtomicString& name, const String& value) ;
175 178
179 void trackProgress(int dataLength);
176 void changeState(State newState); 180 void changeState(State newState);
177 void callReadyStateChangeListener(); 181 void callReadyStateChangeListener();
178 void dropProtectionSoon(); 182 void dropProtectionSoon();
179 void dropProtection(Timer<XMLHttpRequest>* = 0); 183 void dropProtection(Timer<XMLHttpRequest>* = 0);
180 void internalAbort(DropProtection = DropProtectionSync); 184 void internalAbort(DropProtection = DropProtectionSync);
181 void clearResponse(); 185 void clearResponse();
182 void clearResponseBuffers(); 186 void clearResponseBuffers();
183 void clearRequest(); 187 void clearRequest();
184 188
185 void createRequest(ExceptionState&); 189 void createRequest(ExceptionState&);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 239
236 // An enum corresponding to the allowed string values for the responseType a ttribute. 240 // An enum corresponding to the allowed string values for the responseType a ttribute.
237 ResponseTypeCode m_responseTypeCode; 241 ResponseTypeCode m_responseTypeCode;
238 Timer<XMLHttpRequest> m_protectionTimer; 242 Timer<XMLHttpRequest> m_protectionTimer;
239 RefPtr<SecurityOrigin> m_securityOrigin; 243 RefPtr<SecurityOrigin> m_securityOrigin;
240 }; 244 };
241 245
242 } // namespace WebCore 246 } // namespace WebCore
243 247
244 #endif // XMLHttpRequest_h 248 #endif // XMLHttpRequest_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698