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 "bindings/modules/v8/UnionTypesModules.h" | 10 #include "bindings/modules/v8/UnionTypesModules.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 static Response* create(ExecutionContext*, ExceptionState&); | 34 static Response* create(ExecutionContext*, ExceptionState&); |
35 static Response* create(ExecutionContext*, const BodyInit&, const Dictionary
&, ExceptionState&); | 35 static Response* create(ExecutionContext*, const BodyInit&, const Dictionary
&, ExceptionState&); |
36 | 36 |
37 static Response* create(ExecutionContext*, Blob*, const ResponseInit&, Excep
tionState&); | 37 static Response* create(ExecutionContext*, Blob*, const ResponseInit&, Excep
tionState&); |
38 static Response* create(ExecutionContext*, FetchResponseData*); | 38 static Response* create(ExecutionContext*, FetchResponseData*); |
39 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&); | 39 static Response* create(ExecutionContext*, const WebServiceWorkerResponse&); |
40 | 40 |
41 static Response* createClone(const Response&); | 41 static Response* createClone(const Response&); |
42 | 42 |
43 static Response* error(ExecutionContext*); | 43 static Response* error(ExecutionContext*); |
| 44 static Response* redirect(ExecutionContext*, const String& url, unsigned sho
rt status, ExceptionState&); |
44 | 45 |
45 const FetchResponseData* response() const { return m_response; } | 46 const FetchResponseData* response() const { return m_response; } |
46 | 47 |
47 // From Response.idl: | 48 // From Response.idl: |
48 String type() const; | 49 String type() const; |
49 String url() const; | 50 String url() const; |
50 unsigned short status() const; | 51 unsigned short status() const; |
51 bool ok() const; | 52 bool ok() const; |
52 String statusText() const; | 53 String statusText() const; |
53 Headers* headers() const; | 54 Headers* headers() const; |
(...skipping 20 matching lines...) Expand all Loading... |
74 Response(ExecutionContext*, FetchResponseData*); | 75 Response(ExecutionContext*, FetchResponseData*); |
75 Response(ExecutionContext*, FetchResponseData*, Headers*); | 76 Response(ExecutionContext*, FetchResponseData*, Headers*); |
76 | 77 |
77 const Member<FetchResponseData> m_response; | 78 const Member<FetchResponseData> m_response; |
78 const Member<Headers> m_headers; | 79 const Member<Headers> m_headers; |
79 }; | 80 }; |
80 | 81 |
81 } // namespace blink | 82 } // namespace blink |
82 | 83 |
83 #endif // Response_h | 84 #endif // Response_h |
OLD | NEW |