OLD | NEW |
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 "modules/serviceworkers/Body.h" | 10 #include "modules/serviceworkers/Body.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 String url() const; | 47 String url() const; |
48 unsigned short status() const; | 48 unsigned short status() const; |
49 String statusText() const; | 49 String statusText() const; |
50 Headers* headers() const; | 50 Headers* headers() const; |
51 | 51 |
52 // From Response.idl: | 52 // From Response.idl: |
53 Response* clone() const; | 53 Response* clone() const; |
54 | 54 |
55 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&); | 55 void populateWebServiceWorkerResponse(WebServiceWorkerResponse&); |
56 | 56 |
| 57 bool hasBody() const { return m_response->blobDataHandle(); } |
| 58 |
57 virtual void trace(Visitor*) override; | 59 virtual void trace(Visitor*) override; |
58 | 60 |
59 private: | 61 private: |
60 explicit Response(const Response&); | 62 explicit Response(const Response&); |
61 explicit Response(ExecutionContext*); | 63 explicit Response(ExecutionContext*); |
62 Response(ExecutionContext*, FetchResponseData*); | 64 Response(ExecutionContext*, FetchResponseData*); |
63 | 65 |
64 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override; | 66 virtual PassRefPtr<BlobDataHandle> blobDataHandle() override; |
65 | 67 |
66 const Member<FetchResponseData> m_response; | 68 const Member<FetchResponseData> m_response; |
67 const Member<Headers> m_headers; | 69 const Member<Headers> m_headers; |
68 }; | 70 }; |
69 | 71 |
70 } // namespace blink | 72 } // namespace blink |
71 | 73 |
72 #endif // Response_h | 74 #endif // Response_h |
OLD | NEW |