| 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 ReadableStreamImpl_h | 5 #ifndef ReadableStreamImpl_h |
| 6 #define ReadableStreamImpl_h | 6 #define ReadableStreamImpl_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/ScriptValue.h" | 10 #include "bindings/core/v8/ScriptValue.h" |
| 11 #include "bindings/core/v8/V8ArrayBuffer.h" | 11 #include "bindings/core/v8/V8ArrayBuffer.h" |
| 12 #include "bindings/core/v8/V8Binding.h" | 12 #include "bindings/core/v8/V8Binding.h" |
| 13 #include "core/dom/DOMArrayBuffer.h" | 13 #include "core/dom/DOMArrayBuffer.h" |
| 14 #include "core/streams/ReadableStream.h" | 14 #include "core/streams/ReadableStream.h" |
| 15 #include "wtf/Deque.h" | 15 #include "wtf/Deque.h" |
| 16 #include "wtf/RefPtr.h" | 16 #include "wtf/RefPtr.h" |
| 17 #include "wtf/text/WTFString.h" | 17 #include "wtf/text/WTFString.h" |
| 18 #include <utility> | 18 #include <utility> |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 class ExclusiveStreamReader; | |
| 23 // We define the default ChunkTypeTraits for frequently used types. | 22 // We define the default ChunkTypeTraits for frequently used types. |
| 24 template<typename ChunkType> | 23 template<typename ChunkType> |
| 25 class ReadableStreamChunkTypeTraits { }; | 24 class ReadableStreamChunkTypeTraits { }; |
| 26 | 25 |
| 27 template<> | 26 template<> |
| 28 class ReadableStreamChunkTypeTraits<String> { | 27 class ReadableStreamChunkTypeTraits<String> { |
| 29 public: | 28 public: |
| 30 typedef String HoldType; | 29 typedef String HoldType; |
| 31 typedef const String& PassType; | 30 typedef const String& PassType; |
| 32 | 31 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 ASSERT(queue.isEmpty()); | 153 ASSERT(queue.isEmpty()); |
| 155 | 154 |
| 156 queue.swap(m_queue); | 155 queue.swap(m_queue); |
| 157 m_totalQueueSize = 0; | 156 m_totalQueueSize = 0; |
| 158 readInternalPostAction(); | 157 readInternalPostAction(); |
| 159 } | 158 } |
| 160 | 159 |
| 161 } // namespace blink | 160 } // namespace blink |
| 162 | 161 |
| 163 #endif // ReadableStreamImpl_h | 162 #endif // ReadableStreamImpl_h |
| OLD | NEW |