| 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 ReadableStream_h | 5 #ifndef ReadableStream_h |
| 6 #define ReadableStream_h | 6 #define ReadableStream_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptPromiseProperty.h" | 9 #include "bindings/core/v8/ScriptPromiseProperty.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 virtual ~ReadableStream(); | 41 virtual ~ReadableStream(); |
| 42 | 42 |
| 43 bool isStarted() const { return m_isStarted; } | 43 bool isStarted() const { return m_isStarted; } |
| 44 bool isDraining() const { return m_isDraining; } | 44 bool isDraining() const { return m_isDraining; } |
| 45 bool isPulling() const { return m_isPulling; } | 45 bool isPulling() const { return m_isPulling; } |
| 46 State stateInternal() const { return m_state; } | 46 State stateInternal() const { return m_state; } |
| 47 DOMException* storedException() { return m_exception.get(); } | 47 DOMException* storedException() { return m_exception.get(); } |
| 48 | 48 |
| 49 virtual ScriptPromise read(ScriptState*) = 0; | 49 virtual ScriptPromise read(ScriptState*) = 0; |
| 50 ScriptPromise cancel(ScriptState*, ScriptValue reason); | 50 ScriptPromise cancel(ScriptState*, ScriptValue reason); |
| 51 ScriptPromise cancel(ScriptState*); |
| 51 ScriptPromise cancelInternal(ScriptState*, ScriptValue reason); | 52 ScriptPromise cancelInternal(ScriptState*, ScriptValue reason); |
| 52 | 53 |
| 53 virtual bool hasPendingReads() const = 0; | 54 virtual bool hasPendingReads() const = 0; |
| 54 virtual void resolveAllPendingReadsAsDone() = 0; | 55 virtual void resolveAllPendingReadsAsDone() = 0; |
| 55 virtual void rejectAllPendingReads(PassRefPtrWillBeRawPtr<DOMException>) = 0
; | 56 virtual void rejectAllPendingReads(PassRefPtrWillBeRawPtr<DOMException>) = 0
; |
| 56 | 57 |
| 57 void close(); | 58 void close(); |
| 58 void error(PassRefPtrWillBeRawPtr<DOMException>); | 59 void error(PassRefPtrWillBeRawPtr<DOMException>); |
| 59 | 60 |
| 60 void didSourceStart(); | 61 void didSourceStart(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 bool m_isPulling; | 96 bool m_isPulling; |
| 96 State m_state; | 97 State m_state; |
| 97 | 98 |
| 98 RefPtrWillBeMember<DOMException> m_exception; | 99 RefPtrWillBeMember<DOMException> m_exception; |
| 99 Member<ReadableStreamReader> m_reader; | 100 Member<ReadableStreamReader> m_reader; |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace blink | 103 } // namespace blink |
| 103 | 104 |
| 104 #endif // ReadableStream_h | 105 #endif // ReadableStream_h |
| OLD | NEW |