| 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" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |