| 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/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
| 10 #include "bindings/core/v8/ScriptWrappable.h" | 10 #include "bindings/core/v8/ScriptWrappable.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 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(ScriptState*, ExceptionState&); |
| 39 static Response* create(ScriptState*, ScriptValue body, const Dictionary&, E
xceptionState&); | 39 static Response* create(ScriptState*, ScriptValue body, const Dictionary&, E
xceptionState&); |
| 40 | 40 |
| 41 static Response* create(ScriptState*, PassOwnPtr<FetchDataConsumerHandle> bo
dyHandle, 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(ScriptState*, 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 |
| 50 const FetchResponseData* response() const { return m_response; } | 50 const FetchResponseData* response() const { return m_response; } |
| 51 | 51 |
| 52 // From Response.idl: | 52 // From Response.idl: |
| 53 String type() const; | 53 String type() const; |
| 54 String url() const; | 54 String url() const; |
| 55 unsigned short status() const; | 55 unsigned short status() const; |
| 56 bool ok() const; | 56 bool ok() const; |
| 57 String statusText() const; | 57 String statusText() const; |
| 58 Headers* headers() const; | 58 Headers* headers() const; |
| 59 | 59 |
| 60 // From Response.idl: | 60 // From Response.idl: |
| 61 Response* clone(ScriptState*, ExceptionState&); | 61 Response* clone(ExceptionState&); |
| 62 | 62 |
| 63 // ActiveScriptWrappable | 63 // ActiveScriptWrappable |
| 64 bool hasPendingActivity() const final; | 64 bool hasPendingActivity() const final; |
| 65 | 65 |
| 66 // ActiveDOMObject | 66 // ActiveDOMObject |
| 67 void stop() override; | 67 void stop() override; |
| 68 | 68 |
| 69 // Does not call response.setBlobDataHandle(). | 69 // Does not call response.setBlobDataHandle(). |
| 70 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response
*/); | 70 void populateWebServiceWorkerResponse(WebServiceWorkerResponse& /* response
*/); |
| 71 | 71 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 86 Response(ExecutionContext*, FetchResponseData*); | 86 Response(ExecutionContext*, FetchResponseData*); |
| 87 Response(ExecutionContext*, FetchResponseData*, Headers*); | 87 Response(ExecutionContext*, FetchResponseData*, Headers*); |
| 88 | 88 |
| 89 const Member<FetchResponseData> m_response; | 89 const Member<FetchResponseData> m_response; |
| 90 const Member<Headers> m_headers; | 90 const Member<Headers> m_headers; |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace blink | 93 } // namespace blink |
| 94 | 94 |
| 95 #endif // Response_h | 95 #endif // Response_h |
| OLD | NEW |