| 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 "core/dom/DOMException.h" | 8 #include "core/dom/DOMException.h" |
| 9 #include "core/streams/ReadableByteStream.h" | 9 #include "core/streams/ReadableByteStream.h" |
| 10 #include "core/streams/ReadableByteStreamReader.h" | 10 #include "core/streams/ReadableByteStreamReader.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 void startLoading(ExecutionContext*, FetchDataLoader*, FetchDataLoader::Clie
nt* /* client */); | 37 void startLoading(ExecutionContext*, FetchDataLoader*, FetchDataLoader::Clie
nt* /* client */); |
| 38 | 38 |
| 39 // Callable only when not locked. Returns a non-null handle. | 39 // Callable only when not locked. Returns a non-null handle. |
| 40 // There is no means to "return" the handle to the body buffer: Calling | 40 // There is no means to "return" the handle to the body buffer: Calling |
| 41 // this function locks, disturbs and closes the stream and no one will | 41 // this function locks, disturbs and closes the stream and no one will |
| 42 // not be able to get any information from the stream and this buffer after | 42 // not be able to get any information from the stream and this buffer after |
| 43 // that. | 43 // that. |
| 44 PassOwnPtr<FetchDataConsumerHandle> releaseHandle(ExecutionContext*); | 44 PassOwnPtr<FetchDataConsumerHandle> releaseHandle(ExecutionContext*); |
| 45 | 45 |
| 46 bool hasPendingActivity() const; | 46 bool hasPendingActivity() const; |
| 47 void stop(); |
| 47 | 48 |
| 48 // UnderlyingSource | 49 // UnderlyingSource |
| 49 void pullSource() override; | 50 void pullSource() override; |
| 50 ScriptPromise cancelSource(ScriptState*, ScriptValue reason) override; | 51 ScriptPromise cancelSource(ScriptState*, ScriptValue reason) override; |
| 51 | 52 |
| 52 // WebDataConsumerHandle::Client | 53 // WebDataConsumerHandle::Client |
| 53 void didGetReadable() override; | 54 void didGetReadable() override; |
| 54 | 55 |
| 55 DEFINE_INLINE_TRACE() | 56 DEFINE_INLINE_TRACE() |
| 56 { | 57 { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 71 OwnPtr<FetchDataConsumerHandle::Reader> m_reader; | 72 OwnPtr<FetchDataConsumerHandle::Reader> m_reader; |
| 72 Member<ReadableByteStream> m_stream; | 73 Member<ReadableByteStream> m_stream; |
| 73 // We need this member to keep it alive while loading. | 74 // We need this member to keep it alive while loading. |
| 74 Member<FetchDataLoader> m_loader; | 75 Member<FetchDataLoader> m_loader; |
| 75 bool m_streamNeedsMore; | 76 bool m_streamNeedsMore; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace blink | 79 } // namespace blink |
| 79 | 80 |
| 80 #endif // BodyStreamBuffer_h | 81 #endif // BodyStreamBuffer_h |
| OLD | NEW |