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 BodyStreamBuffer_h | 5 #ifndef BodyStreamBuffer_h |
6 #define BodyStreamBuffer_h | 6 #define BodyStreamBuffer_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
10 #include "core/dom/DOMException.h" | 10 #include "core/dom/DOMException.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle( | 41 PassRefPtr<BlobDataHandle> drainAsBlobDataHandle( |
42 BytesConsumer::BlobSizePolicy); | 42 BytesConsumer::BlobSizePolicy); |
43 PassRefPtr<EncodedFormData> drainAsFormData(); | 43 PassRefPtr<EncodedFormData> drainAsFormData(); |
44 void startLoading(FetchDataLoader*, FetchDataLoader::Client* /* client */); | 44 void startLoading(FetchDataLoader*, FetchDataLoader::Client* /* client */); |
45 void tee(BodyStreamBuffer**, BodyStreamBuffer**); | 45 void tee(BodyStreamBuffer**, BodyStreamBuffer**); |
46 | 46 |
47 // UnderlyingSourceBase | 47 // UnderlyingSourceBase |
48 ScriptPromise pull(ScriptState*) override; | 48 ScriptPromise pull(ScriptState*) override; |
49 ScriptPromise cancel(ScriptState*, ScriptValue reason) override; | 49 ScriptPromise cancel(ScriptState*, ScriptValue reason) override; |
50 bool hasPendingActivity() const override; | 50 bool hasPendingActivity() const override; |
51 void stop() override; | 51 void contextDestroyed() override; |
52 | 52 |
53 // BytesConsumer::Client | 53 // BytesConsumer::Client |
54 void onStateChange() override; | 54 void onStateChange() override; |
55 | 55 |
56 bool isStreamReadable(); | 56 bool isStreamReadable(); |
57 bool isStreamClosed(); | 57 bool isStreamClosed(); |
58 bool isStreamErrored(); | 58 bool isStreamErrored(); |
59 bool isStreamLocked(); | 59 bool isStreamLocked(); |
60 bool isStreamDisturbed(); | 60 bool isStreamDisturbed(); |
61 void closeAndLockAndDisturb(); | 61 void closeAndLockAndDisturb(); |
(...skipping 20 matching lines...) Expand all Loading... |
82 Member<BytesConsumer> m_consumer; | 82 Member<BytesConsumer> m_consumer; |
83 // We need this member to keep it alive while loading. | 83 // We need this member to keep it alive while loading. |
84 Member<FetchDataLoader> m_loader; | 84 Member<FetchDataLoader> m_loader; |
85 bool m_streamNeedsMore = false; | 85 bool m_streamNeedsMore = false; |
86 bool m_madeFromReadableStream; | 86 bool m_madeFromReadableStream; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace blink | 89 } // namespace blink |
90 | 90 |
91 #endif // BodyStreamBuffer_h | 91 #endif // BodyStreamBuffer_h |
OLD | NEW |