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 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" |
11 #include "core/dom/ActiveDOMObject.h" | 11 #include "core/dom/ActiveDOMObject.h" |
12 #include "core/fileapi/FileReaderLoader.h" | 12 #include "core/fileapi/FileReaderLoader.h" |
13 #include "core/fileapi/FileReaderLoaderClient.h" | 13 #include "core/fileapi/FileReaderLoaderClient.h" |
14 #include "core/streams/ReadableStreamImpl.h" | 14 #include "core/streams/ReadableStreamImpl.h" |
15 #include "platform/blob/BlobData.h" | 15 #include "platform/blob/BlobData.h" |
16 #include "platform/heap/Handle.h" | 16 #include "platform/heap/Handle.h" |
17 #include "wtf/RefPtr.h" | 17 #include "wtf/RefPtr.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 class BodyStreamBuffer; | 21 class BodyStreamBuffer; |
| 22 class ExclusiveStreamReader; |
22 class ScriptState; | 23 class ScriptState; |
23 | 24 |
24 class Body | 25 class Body |
25 : public GarbageCollectedFinalized<Body> | 26 : public GarbageCollectedFinalized<Body> |
26 , public ScriptWrappable | 27 , public ScriptWrappable |
27 , public ActiveDOMObject | 28 , public ActiveDOMObject |
28 , public FileReaderLoaderClient { | 29 , public FileReaderLoaderClient { |
29 DEFINE_WRAPPERTYPEINFO(); | 30 DEFINE_WRAPPERTYPEINFO(); |
30 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Body); | 31 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Body); |
31 public: | 32 public: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 virtual String contentTypeForBuffer() const = 0; | 95 virtual String contentTypeForBuffer() const = 0; |
95 | 96 |
96 void didFinishLoadingViaStream(PassRefPtr<DOMArrayBuffer>); | 97 void didFinishLoadingViaStream(PassRefPtr<DOMArrayBuffer>); |
97 | 98 |
98 OwnPtr<FileReaderLoader> m_loader; | 99 OwnPtr<FileReaderLoader> m_loader; |
99 bool m_bodyUsed; | 100 bool m_bodyUsed; |
100 ResponseType m_responseType; | 101 ResponseType m_responseType; |
101 RefPtrWillBeMember<ScriptPromiseResolver> m_resolver; | 102 RefPtrWillBeMember<ScriptPromiseResolver> m_resolver; |
102 Member<ReadableStreamSource> m_streamSource; | 103 Member<ReadableStreamSource> m_streamSource; |
103 Member<ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer>>> m_
stream; | 104 Member<ReadableStreamImpl<ReadableStreamChunkTypeTraits<DOMArrayBuffer>>> m_
stream; |
| 105 Member<ExclusiveStreamReader> m_streamReader; |
104 }; | 106 }; |
105 | 107 |
106 } // namespace blink | 108 } // namespace blink |
107 | 109 |
108 #endif // Body_h | 110 #endif // Body_h |
OLD | NEW |