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

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

Issue 2392823002: Remove create[Done|UnexpectedError]DataConsumerHandle (Closed)
Patch Set: fix Created 4 years, 2 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 | third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.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 BodyStreamBuffer_h 5 #ifndef BodyStreamBuffer_h
6 #define BodyStreamBuffer_h 6 #define BodyStreamBuffer_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class EncodedFormData; 22 class EncodedFormData;
23 class ScriptState; 23 class ScriptState;
24 24
25 class MODULES_EXPORT BodyStreamBuffer final : public UnderlyingSourceBase, 25 class MODULES_EXPORT BodyStreamBuffer final : public UnderlyingSourceBase,
26 public BytesConsumer::Client { 26 public BytesConsumer::Client {
27 WTF_MAKE_NONCOPYABLE(BodyStreamBuffer); 27 WTF_MAKE_NONCOPYABLE(BodyStreamBuffer);
28 USING_GARBAGE_COLLECTED_MIXIN(BodyStreamBuffer); 28 USING_GARBAGE_COLLECTED_MIXIN(BodyStreamBuffer);
29 29
30 public: 30 public:
31 // |handle| cannot be null and cannot be locked.
32 // This function must be called with entering an appropriate V8 context.
33 BodyStreamBuffer(ScriptState*,
34 std::unique_ptr<FetchDataConsumerHandle> /* handle */);
35 // |consumer| must not have a client. 31 // |consumer| must not have a client.
36 // This function must be called with entering an appropriate V8 context. 32 // This function must be called with entering an appropriate V8 context.
37 BodyStreamBuffer(ScriptState*, BytesConsumer* /* consumer */); 33 BodyStreamBuffer(ScriptState*, BytesConsumer* /* consumer */);
38 // |ReadableStreamOperations::isReadableStream(stream)| must hold. 34 // |ReadableStreamOperations::isReadableStream(stream)| must hold.
39 // This function must be called with entering an appropriate V8 context. 35 // This function must be called with entering an appropriate V8 context.
40 BodyStreamBuffer(ScriptState*, ScriptValue stream); 36 BodyStreamBuffer(ScriptState*, ScriptValue stream);
41 37
42 ScriptValue stream(); 38 ScriptValue stream();
43 39
44 // Callable only when neither locked nor disturbed. 40 // Callable only when neither locked nor disturbed.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Member<BytesConsumer> m_consumer; 82 Member<BytesConsumer> m_consumer;
87 // We need this member to keep it alive while loading. 83 // We need this member to keep it alive while loading.
88 Member<FetchDataLoader> m_loader; 84 Member<FetchDataLoader> m_loader;
89 bool m_streamNeedsMore = false; 85 bool m_streamNeedsMore = false;
90 bool m_madeFromReadableStream; 86 bool m_madeFromReadableStream;
91 }; 87 };
92 88
93 } // namespace blink 89 } // namespace blink
94 90
95 #endif // BodyStreamBuffer_h 91 #endif // BodyStreamBuffer_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698