OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 FetchFormDataConsumerHandle_h | 5 #ifndef FetchFormDataConsumerHandle_h |
6 #define FetchFormDataConsumerHandle_h | 6 #define FetchFormDataConsumerHandle_h |
7 | 7 |
8 #include "core/dom/DOMArrayBuffer.h" | 8 #include "core/dom/DOMArrayBuffer.h" |
9 #include "core/dom/DOMArrayBufferView.h" | 9 #include "core/dom/DOMArrayBufferView.h" |
10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace blink { | 21 namespace blink { |
22 | 22 |
23 class ExecutionContext; | 23 class ExecutionContext; |
24 | 24 |
25 // FetchFormDataConsumerHandle is a handle made from an EncodedFormData. It | 25 // FetchFormDataConsumerHandle is a handle made from an EncodedFormData. It |
26 // provides drainAsFormData in the associated Reader. | 26 // provides drainAsFormData in the associated Reader. |
27 class MODULES_EXPORT FetchFormDataConsumerHandle final : public FetchDataConsume
rHandle { | 27 class MODULES_EXPORT FetchFormDataConsumerHandle final : public FetchDataConsume
rHandle { |
28 WTF_MAKE_NONCOPYABLE(FetchFormDataConsumerHandle); | 28 WTF_MAKE_NONCOPYABLE(FetchFormDataConsumerHandle); |
29 public: | 29 public: |
30 static PassOwnPtr<FetchDataConsumerHandle> create(const String& body); | 30 static PassOwnPtr<FetchDataConsumerHandle> create(const String& body); |
31 static PassOwnPtr<FetchDataConsumerHandle> create(DOMArrayBuffer* body); | 31 static PassOwnPtr<FetchDataConsumerHandle> create(PassRefPtr<DOMArrayBuffer>
body); |
32 static PassOwnPtr<FetchDataConsumerHandle> create(DOMArrayBufferView* body); | 32 static PassOwnPtr<FetchDataConsumerHandle> create(PassRefPtr<DOMArrayBufferV
iew> body); |
33 static PassOwnPtr<FetchDataConsumerHandle> create(const void* data, size_t); | 33 static PassOwnPtr<FetchDataConsumerHandle> create(const void* data, size_t); |
34 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef
Ptr<EncodedFormData> body); | 34 static PassOwnPtr<FetchDataConsumerHandle> create(ExecutionContext*, PassRef
Ptr<EncodedFormData> body); |
35 // Use FetchBlobDataConsumerHandle for blobs. | 35 // Use FetchBlobDataConsumerHandle for blobs. |
36 | 36 |
37 ~FetchFormDataConsumerHandle() override; | 37 ~FetchFormDataConsumerHandle() override; |
38 | 38 |
39 static PassOwnPtr<FetchDataConsumerHandle> createForTest( | 39 static PassOwnPtr<FetchDataConsumerHandle> createForTest( |
40 ExecutionContext*, | 40 ExecutionContext*, |
41 PassRefPtr<EncodedFormData> body, | 41 PassRefPtr<EncodedFormData> body, |
42 FetchBlobDataConsumerHandle::LoaderFactory*); | 42 FetchBlobDataConsumerHandle::LoaderFactory*); |
(...skipping 11 matching lines...) Expand all Loading... |
54 Reader* obtainReaderInternal(Client*) override; | 54 Reader* obtainReaderInternal(Client*) override; |
55 | 55 |
56 const char* debugName() const override { return "FetchFormDataConsumerHandle
"; } | 56 const char* debugName() const override { return "FetchFormDataConsumerHandle
"; } |
57 | 57 |
58 RefPtr<Context> m_context; | 58 RefPtr<Context> m_context; |
59 }; | 59 }; |
60 | 60 |
61 } // namespace blink | 61 } // namespace blink |
62 | 62 |
63 #endif // FetchFormDataConsumerHandle_h | 63 #endif // FetchFormDataConsumerHandle_h |
OLD | NEW |