Index: Source/modules/serviceworkers/Response.h |
diff --git a/Source/modules/serviceworkers/Response.h b/Source/modules/serviceworkers/Response.h |
index 6a28a19423dcb8c37ee55e72664fcd1af49eb058..ba41b63718f3c3c587f267cd33d58e1c4cac4588 100644 |
--- a/Source/modules/serviceworkers/Response.h |
+++ b/Source/modules/serviceworkers/Response.h |
@@ -7,7 +7,8 @@ |
#include "bindings/core/v8/Dictionary.h" |
#include "bindings/core/v8/ScriptWrappable.h" |
-#include "modules/serviceworkers/HeaderMap.h" |
+#include "modules/serviceworkers/FetchResponseData.h" |
+#include "modules/serviceworkers/Headers.h" |
#include "platform/blob/BlobData.h" |
#include "wtf/RefCounted.h" |
#include "wtf/RefPtr.h" |
@@ -18,30 +19,32 @@ namespace blink { class WebServiceWorkerResponse; } |
namespace WebCore { |
class Blob; |
+class ExceptionState; |
struct ResponseInit; |
-class Response FINAL : public ScriptWrappable, public RefCounted<Response> { |
+class Response FINAL : public RefCounted<Response>, public ScriptWrappable { |
public: |
- static PassRefPtr<Response> create(Blob*, const Dictionary&); |
- static PassRefPtr<Response> create(Blob*, const ResponseInit&); |
- ~Response() { }; |
- |
- unsigned short status() const { return m_status; } |
- void setStatus(unsigned short value) { m_status = value; } |
+ static PassRefPtr<Response> create(Blob*, const Dictionary&, ExceptionState&); |
+ static PassRefPtr<Response> create(Blob*, const ResponseInit&, ExceptionState&); |
- String statusText() const { return m_statusText; } |
- void setStatusText(const String& value) { m_statusText = value; } |
+ static PassRefPtr<Response> create(PassRefPtr<FetchResponseData>); |
+ ~Response() { }; |
- PassRefPtr<HeaderMap> headers() const; |
+ String type() const; |
+ String url() const; |
+ unsigned short status() const; |
+ String statusText() const; |
+ PassRefPtr<Headers> headers() const; |
void populateWebServiceWorkerResponse(blink::WebServiceWorkerResponse&); |
private: |
- Response(PassRefPtr<BlobDataHandle>, const ResponseInit&); |
- unsigned short m_status; |
- String m_statusText; |
- RefPtr<HeaderMap> m_headers; |
- RefPtr<BlobDataHandle> m_blobDataHandle; |
+ Response(); |
+ Response(PassRefPtr<FetchResponseData>); |
+ |
+ RefPtr<FetchResponseData> m_response; |
+ RefPtr<Headers> m_headers; |
+ // FIXME: Support FetchBodyStream. |
}; |
} // namespace WebCore |