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

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

Issue 16925002: XMLHttpRequest#responseText should use a rope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer feedback Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
11 * 11 *
12 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details. 15 * Lesser General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU Lesser General Public 17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software 18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U SA 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 U SA
20 */ 20 */
21 21
22 #ifndef XMLHttpRequest_h 22 #ifndef XMLHttpRequest_h
23 #define XMLHttpRequest_h 23 #define XMLHttpRequest_h
24 24
25 #include "bindings/v8/ScriptString.h"
25 #include "bindings/v8/ScriptWrappable.h" 26 #include "bindings/v8/ScriptWrappable.h"
26 #include "core/dom/ActiveDOMObject.h" 27 #include "core/dom/ActiveDOMObject.h"
27 #include "core/dom/EventListener.h" 28 #include "core/dom/EventListener.h"
28 #include "core/dom/EventNames.h" 29 #include "core/dom/EventNames.h"
29 #include "core/dom/EventTarget.h" 30 #include "core/dom/EventTarget.h"
30 #include "core/loader/ThreadableLoaderClient.h" 31 #include "core/loader/ThreadableLoaderClient.h"
31 #include "core/platform/network/FormData.h" 32 #include "core/platform/network/FormData.h"
32 #include "core/platform/network/ResourceResponse.h" 33 #include "core/platform/network/ResourceResponse.h"
33 #include "core/xml/XMLHttpRequestProgressEventThrottle.h" 34 #include "core/xml/XMLHttpRequestProgressEventThrottle.h"
34 #include "weborigin/SecurityOrigin.h" 35 #include "weborigin/SecurityOrigin.h"
35 #include <wtf/OwnPtr.h> 36 #include "wtf/OwnPtr.h"
36 #include <wtf/text/AtomicStringHash.h> 37 #include "wtf/text/AtomicStringHash.h"
37 #include <wtf/text/StringBuilder.h> 38 #include "wtf/text/StringBuilder.h"
38 39
39 namespace WebCore { 40 namespace WebCore {
40 41
41 class Blob; 42 class Blob;
42 class Document; 43 class Document;
43 class DOMFormData; 44 class DOMFormData;
44 class ResourceRequest; 45 class ResourceRequest;
45 class SecurityOrigin; 46 class SecurityOrigin;
46 class SharedBuffer; 47 class SharedBuffer;
47 class TextResourceDecoder; 48 class TextResourceDecoder;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void send(const String&, ExceptionCode&); 98 void send(const String&, ExceptionCode&);
98 void send(Blob*, ExceptionCode&); 99 void send(Blob*, ExceptionCode&);
99 void send(DOMFormData*, ExceptionCode&); 100 void send(DOMFormData*, ExceptionCode&);
100 void send(ArrayBuffer*, ExceptionCode&); 101 void send(ArrayBuffer*, ExceptionCode&);
101 void send(ArrayBufferView*, ExceptionCode&); 102 void send(ArrayBufferView*, ExceptionCode&);
102 void abort(); 103 void abort();
103 void setRequestHeader(const AtomicString& name, const String& value, Excepti onCode&); 104 void setRequestHeader(const AtomicString& name, const String& value, Excepti onCode&);
104 void overrideMimeType(const String& override); 105 void overrideMimeType(const String& override);
105 String getAllResponseHeaders(ExceptionCode&) const; 106 String getAllResponseHeaders(ExceptionCode&) const;
106 String getResponseHeader(const AtomicString& name, ExceptionCode&) const; 107 String getResponseHeader(const AtomicString& name, ExceptionCode&) const;
107 String responseText(ExceptionCode&); 108 ScriptString responseText(ExceptionCode&);
108 Document* responseXML(ExceptionCode&); 109 Document* responseXML(ExceptionCode&);
109 Document* optionalResponseXML() const { return m_responseDocument.get(); } 110 Document* optionalResponseXML() const { return m_responseDocument.get(); }
110 Blob* responseBlob(ExceptionCode&); 111 Blob* responseBlob(ExceptionCode&);
111 Blob* optionalResponseBlob() const { return m_responseBlob.get(); } 112 Blob* optionalResponseBlob() const { return m_responseBlob.get(); }
112 #if ENABLE(XHR_TIMEOUT) 113 #if ENABLE(XHR_TIMEOUT)
113 unsigned long timeout() const { return m_timeoutMilliseconds; } 114 unsigned long timeout() const { return m_timeoutMilliseconds; }
114 void setTimeout(unsigned long timeout, ExceptionCode&); 115 void setTimeout(unsigned long timeout, ExceptionCode&);
115 #endif 116 #endif
116 117
117 void sendForInspector(ExceptionCode&); 118 void sendForInspector(ExceptionCode&);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 RefPtr<Blob> m_responseBlob; 210 RefPtr<Blob> m_responseBlob;
210 211
211 RefPtr<ThreadableLoader> m_loader; 212 RefPtr<ThreadableLoader> m_loader;
212 State m_state; 213 State m_state;
213 214
214 ResourceResponse m_response; 215 ResourceResponse m_response;
215 String m_responseEncoding; 216 String m_responseEncoding;
216 217
217 RefPtr<TextResourceDecoder> m_decoder; 218 RefPtr<TextResourceDecoder> m_decoder;
218 219
219 StringBuilder m_responseBuilder; 220 ScriptString m_responseText;
220 mutable bool m_createdDocument; 221 mutable bool m_createdDocument;
221 mutable RefPtr<Document> m_responseDocument; 222 mutable RefPtr<Document> m_responseDocument;
222 223
223 RefPtr<SharedBuffer> m_binaryResponseBuilder; 224 RefPtr<SharedBuffer> m_binaryResponseBuilder;
224 mutable RefPtr<ArrayBuffer> m_responseArrayBuffer; 225 mutable RefPtr<ArrayBuffer> m_responseArrayBuffer;
225 226
226 bool m_error; 227 bool m_error;
227 228
228 bool m_uploadEventsAllowed; 229 bool m_uploadEventsAllowed;
229 bool m_uploadComplete; 230 bool m_uploadComplete;
(...skipping 14 matching lines...) Expand all
244 245
245 // An enum corresponding to the allowed string values for the responseType a ttribute. 246 // An enum corresponding to the allowed string values for the responseType a ttribute.
246 ResponseTypeCode m_responseTypeCode; 247 ResponseTypeCode m_responseTypeCode;
247 Timer<XMLHttpRequest> m_protectionTimer; 248 Timer<XMLHttpRequest> m_protectionTimer;
248 RefPtr<SecurityOrigin> m_securityOrigin; 249 RefPtr<SecurityOrigin> m_securityOrigin;
249 }; 250 };
250 251
251 } // namespace WebCore 252 } // namespace WebCore
252 253
253 #endif // XMLHttpRequest_h 254 #endif // XMLHttpRequest_h
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698