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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.h

Issue 1506023003: Response construction with a ReadableStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698