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

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

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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/testing/Internals.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.
(...skipping 16 matching lines...) Expand all
27 #include "core/dom/DocumentParserClient.h" 27 #include "core/dom/DocumentParserClient.h"
28 #include "core/events/EventListener.h" 28 #include "core/events/EventListener.h"
29 #include "core/loader/ThreadableLoaderClient.h" 29 #include "core/loader/ThreadableLoaderClient.h"
30 #include "core/streams/ReadableStreamImpl.h" 30 #include "core/streams/ReadableStreamImpl.h"
31 #include "core/xml/XMLHttpRequestEventTarget.h" 31 #include "core/xml/XMLHttpRequestEventTarget.h"
32 #include "core/xml/XMLHttpRequestProgressEventThrottle.h" 32 #include "core/xml/XMLHttpRequestProgressEventThrottle.h"
33 #include "platform/heap/Handle.h" 33 #include "platform/heap/Handle.h"
34 #include "platform/network/FormData.h" 34 #include "platform/network/FormData.h"
35 #include "platform/network/ResourceResponse.h" 35 #include "platform/network/ResourceResponse.h"
36 #include "platform/weborigin/SecurityOrigin.h" 36 #include "platform/weborigin/SecurityOrigin.h"
37 #include "wtf/Forward.h"
37 #include "wtf/OwnPtr.h" 38 #include "wtf/OwnPtr.h"
38 #include "wtf/text/AtomicStringHash.h" 39 #include "wtf/text/AtomicStringHash.h"
39 #include "wtf/text/StringBuilder.h" 40 #include "wtf/text/StringBuilder.h"
40 41
41 namespace blink { 42 namespace blink {
42 43
43 class Blob; 44 class Blob;
44 class BlobDataHandle; 45 class BlobDataHandle;
46 class DOMArrayBuffer;
45 class DOMFormData; 47 class DOMFormData;
46 class Document; 48 class Document;
47 class DocumentParser; 49 class DocumentParser;
48 class ExceptionState; 50 class ExceptionState;
49 class ResourceRequest; 51 class ResourceRequest;
50 class SecurityOrigin; 52 class SecurityOrigin;
51 class SharedBuffer; 53 class SharedBuffer;
52 class Stream; 54 class Stream;
53 class TextResourceDecoder; 55 class TextResourceDecoder;
54 class ThreadableLoader; 56 class ThreadableLoader;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Expose HTTP validation methods for other untrusted requests. 138 // Expose HTTP validation methods for other untrusted requests.
137 static AtomicString uppercaseKnownHTTPMethod(const AtomicString&); 139 static AtomicString uppercaseKnownHTTPMethod(const AtomicString&);
138 140
139 void setResponseType(const String&, ExceptionState&); 141 void setResponseType(const String&, ExceptionState&);
140 String responseType(); 142 String responseType();
141 ResponseTypeCode responseTypeCode() const { return m_responseTypeCode; } 143 ResponseTypeCode responseTypeCode() const { return m_responseTypeCode; }
142 144
143 String responseURL(); 145 String responseURL();
144 146
145 // response attribute has custom getter. 147 // response attribute has custom getter.
146 ArrayBuffer* responseArrayBuffer(); 148 DOMArrayBuffer* responseArrayBuffer();
147 149
148 void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lin eNumber; } 150 void setLastSendLineNumber(unsigned lineNumber) { m_lastSendLineNumber = lin eNumber; }
149 void setLastSendURL(const String& url) { m_lastSendURL = url; } 151 void setLastSendURL(const String& url) { m_lastSendURL = url; }
150 152
151 XMLHttpRequestUpload* upload(); 153 XMLHttpRequestUpload* upload();
152 154
153 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange); 155 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange);
154 156
155 virtual void trace(Visitor*) override; 157 virtual void trace(Visitor*) override;
156 158
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 250
249 KURL m_url; 251 KURL m_url;
250 AtomicString m_method; 252 AtomicString m_method;
251 HTTPHeaderMap m_requestHeaders; 253 HTTPHeaderMap m_requestHeaders;
252 // Not converted to ASCII lowercase. Must be lowered later or compared 254 // Not converted to ASCII lowercase. Must be lowered later or compared
253 // using case insensitive comparison functions if needed. 255 // using case insensitive comparison functions if needed.
254 AtomicString m_mimeTypeOverride; 256 AtomicString m_mimeTypeOverride;
255 unsigned long m_timeoutMilliseconds; 257 unsigned long m_timeoutMilliseconds;
256 PersistentWillBeMember<Blob> m_responseBlob; 258 PersistentWillBeMember<Blob> m_responseBlob;
257 RefPtrWillBeMember<Stream> m_responseLegacyStream; 259 RefPtrWillBeMember<Stream> m_responseLegacyStream;
258 PersistentWillBeMember<ReadableStreamImpl<ReadableStreamChunkTypeTraits<Arra yBuffer> > > m_responseStream; 260 PersistentWillBeMember<ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMA rrayBuffer> > > m_responseStream;
259 PersistentWillBeMember<UnderlyingSource> m_streamSource; 261 PersistentWillBeMember<UnderlyingSource> m_streamSource;
260 262
261 RefPtr<ThreadableLoader> m_loader; 263 RefPtr<ThreadableLoader> m_loader;
262 unsigned long m_loaderIdentifier; 264 unsigned long m_loaderIdentifier;
263 State m_state; 265 State m_state;
264 266
265 ResourceResponse m_response; 267 ResourceResponse m_response;
266 String m_finalResponseCharset; 268 String m_finalResponseCharset;
267 269
268 OwnPtr<TextResourceDecoder> m_decoder; 270 OwnPtr<TextResourceDecoder> m_decoder;
269 271
270 ScriptString m_responseText; 272 ScriptString m_responseText;
271 RefPtrWillBeMember<Document> m_responseDocument; 273 RefPtrWillBeMember<Document> m_responseDocument;
272 RefPtrWillBeMember<DocumentParser> m_responseDocumentParser; 274 RefPtrWillBeMember<DocumentParser> m_responseDocumentParser;
273 275
274 RefPtr<SharedBuffer> m_binaryResponseBuilder; 276 RefPtr<SharedBuffer> m_binaryResponseBuilder;
275 long long m_lengthDownloadedToFile; 277 long long m_lengthDownloadedToFile;
276 278
277 RefPtr<ArrayBuffer> m_responseArrayBuffer; 279 RefPtr<DOMArrayBuffer> m_responseArrayBuffer;
278 280
279 // Used for onprogress tracking 281 // Used for onprogress tracking
280 long long m_receivedLength; 282 long long m_receivedLength;
281 283
282 unsigned m_lastSendLineNumber; 284 unsigned m_lastSendLineNumber;
283 String m_lastSendURL; 285 String m_lastSendURL;
284 // An exception to throw in synchronous mode. It's set when failure 286 // An exception to throw in synchronous mode. It's set when failure
285 // notification is received from m_loader and thrown at the end of send() if 287 // notification is received from m_loader and thrown at the end of send() if
286 // any. 288 // any.
287 ExceptionCode m_exceptionCode; 289 ExceptionCode m_exceptionCode;
(...skipping 18 matching lines...) Expand all
306 bool m_uploadComplete; 308 bool m_uploadComplete;
307 bool m_sameOriginRequest; 309 bool m_sameOriginRequest;
308 // True iff the ongoing resource loading is using the downloadToFile 310 // True iff the ongoing resource loading is using the downloadToFile
309 // option. 311 // option.
310 bool m_downloadingToFile; 312 bool m_downloadingToFile;
311 }; 313 };
312 314
313 } // namespace blink 315 } // namespace blink
314 316
315 #endif // XMLHttpRequest_h 317 #endif // XMLHttpRequest_h
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698