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

Side by Side Diff: Source/modules/fetch/Body.h

Issue 1018243002: [Fetch] Support various operations after reading data partially. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@async-read
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
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 Body_h 5 #ifndef Body_h
6 #define Body_h 6 #define Body_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ReadableStream* body(); 49 ReadableStream* body();
50 50
51 // Sets the bodyUsed flag to true. This signifies that the contents of the 51 // Sets the bodyUsed flag to true. This signifies that the contents of the
52 // body have been consumed and cannot be accessed again. 52 // body have been consumed and cannot be accessed again.
53 void setBodyUsed(); 53 void setBodyUsed();
54 bool bodyUsed() const; 54 bool bodyUsed() const;
55 55
56 bool streamAccessed() const; 56 bool streamAccessed() const;
57 57
58 // Creates a new BodyStreamBuffer to drain the data from the ReadableStream. 58 // Creates a new BodyStreamBuffer to drain the data from the ReadableStream.
59 BodyStreamBuffer* createDrainingStream(bool* dataLost); 59 BodyStreamBuffer* createDrainingStream();
60 60
61 // ActiveDOMObject override. 61 // ActiveDOMObject override.
62 virtual void stop() override; 62 virtual void stop() override;
63 virtual bool hasPendingActivity() const override; 63 virtual bool hasPendingActivity() const override;
64 64
65 DECLARE_VIRTUAL_TRACE(); 65 DECLARE_VIRTUAL_TRACE();
66 66
67 protected: 67 protected:
68 // Copy constructor for clone() implementations 68 // Copy constructor for clone() implementations
69 explicit Body(const Body&); 69 explicit Body(const Body&);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ResponseType m_responseType; 101 ResponseType m_responseType;
102 RefPtrWillBeMember<ScriptPromiseResolver> m_resolver; 102 RefPtrWillBeMember<ScriptPromiseResolver> m_resolver;
103 Member<ReadableStreamSource> m_streamSource; 103 Member<ReadableStreamSource> m_streamSource;
104 Member<ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer>>> m_ stream; 104 Member<ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer>>> m_ stream;
105 Member<ReadableStreamReader> m_streamReader; 105 Member<ReadableStreamReader> m_streamReader;
106 }; 106 };
107 107
108 } // namespace blink 108 } // namespace blink
109 109
110 #endif // Body_h 110 #endif // Body_h
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/fetch/script-tests/stream-reader.js ('k') | Source/modules/fetch/Body.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698