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