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/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
9 #include "modules/serviceworkers/Headers.h" | |
10 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
11 #include "wtf/RefPtr.h" | 10 #include "wtf/RefPtr.h" |
yhirano
2014/09/01 06:21:56
+#include wtf/text/WTFString.h
horo
2014/09/01 07:29:32
Done.
| |
12 | 11 |
13 namespace blink { | 12 namespace blink { |
14 | 13 |
14 class BlobDataHandle; | |
15 class ExceptionState; | |
16 class Headers; | |
17 | |
15 class RequestInit { | 18 class RequestInit { |
16 STACK_ALLOCATED(); | 19 STACK_ALLOCATED(); |
17 public: | 20 public: |
18 explicit RequestInit(const Dictionary& options) | 21 explicit RequestInit(ExecutionContext*, const Dictionary&, ExceptionState&); |
19 { | |
20 DictionaryHelper::get(options, "method", method); | |
21 DictionaryHelper::get(options, "headers", headers); | |
22 if (!headers) { | |
23 DictionaryHelper::get(options, "headers", headersDictionary); | |
24 } | |
25 DictionaryHelper::get(options, "mode", mode); | |
26 DictionaryHelper::get(options, "credentials", credentials); | |
27 } | |
28 | 22 |
29 String method; | 23 String method; |
30 RefPtrWillBeMember<Headers> headers; | 24 RefPtrWillBeMember<Headers> headers; |
31 Dictionary headersDictionary; | 25 Dictionary headersDictionary; |
26 RefPtr<BlobDataHandle> bodyBlobHandle; | |
32 String mode; | 27 String mode; |
33 String credentials; | 28 String credentials; |
34 }; | 29 }; |
35 | 30 |
36 } | 31 } |
37 | 32 |
38 #endif // RequestInit_h | 33 #endif // RequestInit_h |
OLD | NEW |