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 RequestInit_h | 5 #ifndef RequestInit_h |
6 #define RequestInit_h | 6 #define RequestInit_h |
7 | 7 |
| 8 #include "bindings/modules/v8/ByteStringSequenceSequenceOrByteStringByteStringRe
cordOrHeaders.h" |
| 9 #include "modules/fetch/Headers.h" |
8 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
9 #include "platform/network/EncodedFormData.h" | 11 #include "platform/network/EncodedFormData.h" |
10 #include "platform/weborigin/Referrer.h" | 12 #include "platform/weborigin/Referrer.h" |
11 #include "platform/wtf/RefPtr.h" | 13 #include "platform/wtf/RefPtr.h" |
12 #include "platform/wtf/text/WTFString.h" | 14 #include "platform/wtf/text/WTFString.h" |
13 | 15 |
14 namespace blink { | 16 namespace blink { |
15 | 17 |
16 class BytesConsumer; | 18 class BytesConsumer; |
17 class Dictionary; | 19 class Dictionary; |
18 class ExecutionContext; | 20 class ExecutionContext; |
19 class ExceptionState; | 21 class ExceptionState; |
20 class Headers; | |
21 | 22 |
22 // FIXME: Use IDL dictionary instead of this class. | 23 // FIXME: Use IDL dictionary instead of this class. |
23 class RequestInit { | 24 class RequestInit { |
24 STACK_ALLOCATED(); | 25 STACK_ALLOCATED(); |
25 | 26 |
26 public: | 27 public: |
27 explicit RequestInit(ExecutionContext*, const Dictionary&, ExceptionState&); | 28 explicit RequestInit(ExecutionContext*, const Dictionary&, ExceptionState&); |
28 | 29 |
29 String method; | 30 String method; |
30 Member<Headers> headers; | 31 HeadersInit headers; |
31 String content_type; | 32 String content_type; |
32 Member<BytesConsumer> body; | 33 Member<BytesConsumer> body; |
33 Referrer referrer; | 34 Referrer referrer; |
34 String mode; | 35 String mode; |
35 String credentials; | 36 String credentials; |
36 String cache; | 37 String cache; |
37 String redirect; | 38 String redirect; |
38 String integrity; | 39 String integrity; |
39 RefPtr<EncodedFormData> attached_credential; | 40 RefPtr<EncodedFormData> attached_credential; |
40 // True if any members in RequestInit are set and hence the referrer member | 41 // True if any members in RequestInit are set and hence the referrer member |
41 // should be used in the Request constructor. | 42 // should be used in the Request constructor. |
42 bool are_any_members_set; | 43 bool are_any_members_set; |
43 }; | 44 }; |
44 | 45 |
45 } // namespace blink | 46 } // namespace blink |
46 | 47 |
47 #endif // RequestInit_h | 48 #endif // RequestInit_h |
OLD | NEW |