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

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

Issue 1527493002: Revert of Response construction with a ReadableStream (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
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/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "bindings/modules/v8/UnionTypesModules.h" 10 #include "bindings/modules/v8/UnionTypesModules.h"
12 #include "modules/ModulesExport.h" 11 #include "modules/ModulesExport.h"
13 #include "modules/fetch/Body.h" 12 #include "modules/fetch/Body.h"
14 #include "modules/fetch/BodyStreamBuffer.h" 13 #include "modules/fetch/BodyStreamBuffer.h"
15 #include "modules/fetch/FetchResponseData.h" 14 #include "modules/fetch/FetchResponseData.h"
16 #include "modules/fetch/Headers.h" 15 #include "modules/fetch/Headers.h"
17 #include "platform/blob/BlobData.h" 16 #include "platform/blob/BlobData.h"
18 #include "platform/heap/Handle.h" 17 #include "platform/heap/Handle.h"
19 #include "wtf/PassOwnPtr.h" 18 #include "wtf/PassOwnPtr.h"
20 19
21 namespace blink { 20 namespace blink {
22 21
23 class Blob; 22 class Blob;
24 class DOMArrayBuffer; 23 class DOMArrayBuffer;
25 class ExceptionState; 24 class ExceptionState;
26 class FetchDataConsumerHandle; 25 class FetchDataConsumerHandle;
27 class ResponseInit; 26 class ResponseInit;
28 class ScriptState;
29 class WebServiceWorkerResponse; 27 class WebServiceWorkerResponse;
30 28
29 typedef BlobOrArrayBufferOrArrayBufferViewOrFormDataOrUSVString BodyInit;
30
31 class MODULES_EXPORT Response final : public Body { 31 class MODULES_EXPORT Response final : public Body {
32 DEFINE_WRAPPERTYPEINFO(); 32 DEFINE_WRAPPERTYPEINFO();
33 WTF_MAKE_NONCOPYABLE(Response); 33 WTF_MAKE_NONCOPYABLE(Response);
34 public: 34 public:
35 ~Response() override { } 35 ~Response() override { }
36 36
37 // From Response.idl: 37 // From Response.idl:
38 static Response* create(ScriptState*, ExceptionState&); 38 static Response* create(ExecutionContext*, ExceptionState&);
39 static Response* create(ScriptState*, ScriptValue body, const Dictionary&, E xceptionState&); 39 static Response* create(ExecutionContext*, const BodyInit&, const Dictionary &, ExceptionState&);
40 40
41 static Response* create(ExecutionContext*, PassOwnPtr<FetchDataConsumerHandl e> bodyHandle, const String& contentType, const ResponseInit&, ExceptionState&); 41 static Response* create(ExecutionContext*, PassOwnPtr<FetchDataConsumerHandl e> bodyHandle, const String& contentType, const ResponseInit&, ExceptionState&);
42 static Response* create(ExecutionContext*, FetchResponseData*); 42 static Response* create(ExecutionContext*, FetchResponseData*);
43 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&); 43 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&);
44 44
45 static Response* createClone(const Response&); 45 static Response* createClone(const Response&);
46 46
47 static Response* error(ExecutionContext*); 47 static Response* error(ExecutionContext*);
48 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&);
49 49
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Response(ExecutionContext*, FetchResponseData*); 83 Response(ExecutionContext*, FetchResponseData*);
84 Response(ExecutionContext*, FetchResponseData*, Headers*); 84 Response(ExecutionContext*, FetchResponseData*, Headers*);
85 85
86 const Member<FetchResponseData> m_response; 86 const Member<FetchResponseData> m_response;
87 const Member<Headers> m_headers; 87 const Member<Headers> m_headers;
88 }; 88 };
89 89
90 } // namespace blink 90 } // namespace blink
91 91
92 #endif // Response_h 92 #endif // Response_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698