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

Unified Diff: Source/modules/serviceworkers/Response.h

Issue 555443002: [Fetch API] Put body members directly on Response/Request (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated yhirano's comment Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/serviceworkers/RequestTest.cpp ('k') | Source/modules/serviceworkers/Response.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/Response.h
diff --git a/Source/modules/serviceworkers/Response.h b/Source/modules/serviceworkers/Response.h
index d56a5e3d600fd0fa64d66a9f8bb677ada31226e5..16bfcf513382deaf04569952a8156dd741c1903d 100644
--- a/Source/modules/serviceworkers/Response.h
+++ b/Source/modules/serviceworkers/Response.h
@@ -7,7 +7,7 @@
#include "bindings/core/v8/Dictionary.h"
#include "bindings/core/v8/ScriptWrappable.h"
-#include "modules/serviceworkers/FetchBodyStream.h"
+#include "modules/serviceworkers/Body.h"
#include "modules/serviceworkers/FetchResponseData.h"
#include "modules/serviceworkers/Headers.h"
#include "platform/blob/BlobData.h"
@@ -21,16 +21,17 @@ class ExceptionState;
class ResponseInit;
class WebServiceWorkerResponse;
-class Response FINAL : public GarbageCollected<Response>, public ScriptWrappable {
+class Response FINAL : public Body {
DEFINE_WRAPPERTYPEINFO();
public:
- static Response* create(Blob*, const Dictionary&, ExceptionState&);
- static Response* create(const String&, const Dictionary&, ExceptionState&);
- static Response* create(const ArrayBuffer*, const Dictionary&, ExceptionState&);
- static Response* create(const ArrayBufferView*, const Dictionary&, ExceptionState&);
- static Response* create(Blob*, const ResponseInit&, ExceptionState&);
- static Response* create(FetchResponseData*);
- static Response* create(const WebServiceWorkerResponse&);
+ virtual ~Response() { }
+ static Response* create(ExecutionContext*, Blob*, const Dictionary&, ExceptionState&);
+ static Response* create(ExecutionContext*, const String&, const Dictionary&, ExceptionState&);
+ static Response* create(ExecutionContext*, const ArrayBuffer*, const Dictionary&, ExceptionState&);
+ static Response* create(ExecutionContext*, const ArrayBufferView*, const Dictionary&, ExceptionState&);
+ static Response* create(ExecutionContext*, Blob*, const ResponseInit&, ExceptionState&);
+ static Response* create(ExecutionContext*, FetchResponseData*);
+ static Response* create(ExecutionContext*, const WebServiceWorkerResponse&);
String type() const;
String url() const;
@@ -38,20 +39,19 @@ public:
String statusText() const;
Headers* headers() const;
- FetchBodyStream* body(ExecutionContext*);
-
void populateWebServiceWorkerResponse(WebServiceWorkerResponse&);
- void trace(Visitor*);
+ virtual void trace(Visitor*) OVERRIDE;
private:
- Response();
- explicit Response(FetchResponseData*);
- explicit Response(const WebServiceWorkerResponse&);
+ explicit Response(ExecutionContext*);
+ Response(ExecutionContext*, FetchResponseData*);
+ Response(ExecutionContext*, const WebServiceWorkerResponse&);
+
+ virtual PassRefPtr<BlobDataHandle> blobDataHandle() OVERRIDE;
Member<FetchResponseData> m_response;
Member<Headers> m_headers;
- Member<FetchBodyStream> m_fetchBodyStream;
};
} // namespace blink
« no previous file with comments | « Source/modules/serviceworkers/RequestTest.cpp ('k') | Source/modules/serviceworkers/Response.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698