Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: Source/core/streams/ReadableStream.h

Issue 1028913002: ReadableStream.cancel's parameter should be optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/streams/ReadableStream.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 29 matching lines...) Expand all
40 ReadableStream(ExecutionContext*, UnderlyingSource* /* source */); 40 ReadableStream(ExecutionContext*, UnderlyingSource* /* source */);
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*);
50 ScriptPromise cancel(ScriptState*, ScriptValue reason); 51 ScriptPromise cancel(ScriptState*, ScriptValue reason);
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
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/streams/ReadableStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698