| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ReadableStreamBytesConsumer_h | 5 #ifndef ReadableStreamBytesConsumer_h |
| 6 #define ReadableStreamBytesConsumer_h | 6 #define ReadableStreamBytesConsumer_h |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
| 9 #include "core/dom/DOMTypedArray.h" | 10 #include "core/dom/DOMTypedArray.h" |
| 10 #include "modules/ModulesExport.h" | 11 #include "modules/ModulesExport.h" |
| 11 #include "modules/fetch/BytesConsumer.h" | 12 #include "modules/fetch/BytesConsumer.h" |
| 12 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 13 #include "wtf/Forward.h" | 14 #include "wtf/Forward.h" |
| 14 #include "wtf/RefPtr.h" | 15 #include "wtf/RefPtr.h" |
| 15 #include <memory> | |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 | 18 |
| 19 class ScriptState; | 19 class ScriptState; |
| 20 | 20 |
| 21 // This class is a BytesConsumer pulling bytes from ReadableStream | 21 // This class is a BytesConsumer pulling bytes from ReadableStream |
| 22 // implemented with V8 Extras. | 22 // implemented with V8 Extras. |
| 23 // The stream will be immediately locked by the consumer and will never be | 23 // The stream will be immediately locked by the consumer and will never be |
| 24 // released. | 24 // released. |
| 25 // | 25 // |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 Member<BytesConsumer::Client> m_client; | 65 Member<BytesConsumer::Client> m_client; |
| 66 Member<DOMUint8Array> m_pendingBuffer; | 66 Member<DOMUint8Array> m_pendingBuffer; |
| 67 size_t m_pendingOffset = 0; | 67 size_t m_pendingOffset = 0; |
| 68 PublicState m_state = PublicState::ReadableOrWaiting; | 68 PublicState m_state = PublicState::ReadableOrWaiting; |
| 69 bool m_isReading = false; | 69 bool m_isReading = false; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace blink | 72 } // namespace blink |
| 73 | 73 |
| 74 #endif // ReadableStreamBytesConsumer_h | 74 #endif // ReadableStreamBytesConsumer_h |
| OLD | NEW |