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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/Response.h

Issue 1490243002: [Fetch API] Use FetchFormDataConsumerHandle in Response constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/Response.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Response_h 5 #ifndef Response_h
6 #define Response_h 6 #define Response_h
7 7
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "bindings/modules/v8/UnionTypesModules.h" 10 #include "bindings/modules/v8/UnionTypesModules.h"
11 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
12 #include "modules/fetch/Body.h" 12 #include "modules/fetch/Body.h"
13 #include "modules/fetch/BodyStreamBuffer.h" 13 #include "modules/fetch/BodyStreamBuffer.h"
14 #include "modules/fetch/FetchResponseData.h" 14 #include "modules/fetch/FetchResponseData.h"
15 #include "modules/fetch/Headers.h" 15 #include "modules/fetch/Headers.h"
16 #include "platform/blob/BlobData.h" 16 #include "platform/blob/BlobData.h"
17 #include "platform/heap/Handle.h" 17 #include "platform/heap/Handle.h"
18 #include "wtf/PassOwnPtr.h"
18 19
19 namespace blink { 20 namespace blink {
20 21
21 class Blob; 22 class Blob;
22 class DOMArrayBuffer; 23 class DOMArrayBuffer;
23 class ExceptionState; 24 class ExceptionState;
25 class FetchDataConsumerHandle;
24 class ResponseInit; 26 class ResponseInit;
25 class WebServiceWorkerResponse; 27 class WebServiceWorkerResponse;
26 28
27 typedef BlobOrArrayBufferOrArrayBufferViewOrFormDataOrUSVString BodyInit; 29 typedef BlobOrArrayBufferOrArrayBufferViewOrFormDataOrUSVString BodyInit;
28 30
29 class MODULES_EXPORT Response final : public Body { 31 class MODULES_EXPORT Response final : public Body {
30 DEFINE_WRAPPERTYPEINFO(); 32 DEFINE_WRAPPERTYPEINFO();
31 WTF_MAKE_NONCOPYABLE(Response); 33 WTF_MAKE_NONCOPYABLE(Response);
32 public: 34 public:
33 ~Response() override { } 35 ~Response() override { }
34 36
35 // From Response.idl: 37 // From Response.idl:
36 static Response* create(ExecutionContext*, ExceptionState&); 38 static Response* create(ExecutionContext*, ExceptionState&);
37 static Response* create(ExecutionContext*, const BodyInit&, const Dictionary &, ExceptionState&); 39 static Response* create(ExecutionContext*, const BodyInit&, const Dictionary &, ExceptionState&);
38 40
39 static Response* create(ExecutionContext*, Blob*, const ResponseInit&, Excep tionState&); 41 static Response* create(ExecutionContext*, PassOwnPtr<FetchDataConsumerHandl e> bodyHandle, const String& contentType, const ResponseInit&, ExceptionState&);
40 static Response* create(ExecutionContext*, FetchResponseData*); 42 static Response* create(ExecutionContext*, FetchResponseData*);
41 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&); 43 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&);
42 44
43 static Response* createClone(const Response&); 45 static Response* createClone(const Response&);
44 46
45 static Response* error(ExecutionContext*); 47 static Response* error(ExecutionContext*);
46 static Response* redirect(ExecutionContext*, const String& url, unsigned sho rt status, ExceptionState&); 48 static Response* redirect(ExecutionContext*, const String& url, unsigned sho rt status, ExceptionState&);
47 49
48 const FetchResponseData* response() const { return m_response; } 50 const FetchResponseData* response() const { return m_response; }
49 51
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 Response(ExecutionContext*, FetchResponseData*); 83 Response(ExecutionContext*, FetchResponseData*);
82 Response(ExecutionContext*, FetchResponseData*, Headers*); 84 Response(ExecutionContext*, FetchResponseData*, Headers*);
83 85
84 const Member<FetchResponseData> m_response; 86 const Member<FetchResponseData> m_response;
85 const Member<Headers> m_headers; 87 const Member<Headers> m_headers;
86 }; 88 };
87 89
88 } // namespace blink 90 } // namespace blink
89 91
90 #endif // Response_h 92 #endif // Response_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698