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/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "core/dom/ActiveDOMObject.h" | 10 #include "core/dom/ActiveDOMObject.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Body); | 28 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Body); |
29 public: | 29 public: |
30 explicit Body(ExecutionContext*); | 30 explicit Body(ExecutionContext*); |
31 ~Body() override { } | 31 ~Body() override { } |
32 | 32 |
33 ScriptPromise arrayBuffer(ScriptState*); | 33 ScriptPromise arrayBuffer(ScriptState*); |
34 ScriptPromise blob(ScriptState*); | 34 ScriptPromise blob(ScriptState*); |
35 ScriptPromise formData(ScriptState*); | 35 ScriptPromise formData(ScriptState*); |
36 ScriptPromise json(ScriptState*); | 36 ScriptPromise json(ScriptState*); |
37 ScriptPromise text(ScriptState*); | 37 ScriptPromise text(ScriptState*); |
38 ReadableByteStream* body(); | 38 ReadableByteStream* bodyWithUseCounter(); |
39 virtual BodyStreamBuffer* bodyBuffer() = 0; | 39 virtual BodyStreamBuffer* bodyBuffer() = 0; |
40 virtual const BodyStreamBuffer* bodyBuffer() const = 0; | 40 virtual const BodyStreamBuffer* bodyBuffer() const = 0; |
41 | 41 |
42 bool bodyUsed(); | 42 virtual bool bodyUsed(); |
43 void setBodyPassed() { m_bodyPassed = true; } | 43 bool isBodyLocked(); |
hiroshige
2015/11/19 12:50:36
In the Fetch spec, |locked| is only defined for Re
yhirano
2015/11/19 13:19:03
It's OK, I'm introducing it right now[1] and it do
| |
44 | 44 |
45 // ActiveDOMObject override. | 45 // ActiveDOMObject override. |
46 bool hasPendingActivity() const override; | 46 bool hasPendingActivity() const override; |
47 | 47 |
48 DEFINE_INLINE_VIRTUAL_TRACE() | 48 DEFINE_INLINE_VIRTUAL_TRACE() |
49 { | 49 { |
50 ActiveDOMObject::trace(visitor); | 50 ActiveDOMObject::trace(visitor); |
51 } | 51 } |
52 | 52 |
53 private: | 53 private: |
54 ReadableByteStream* body(); | |
54 virtual String mimeType() const = 0; | 55 virtual String mimeType() const = 0; |
55 | 56 |
56 bool m_bodyPassed; | 57 bool m_opaque; |
hiroshige
2015/11/19 12:50:36
Seems not used and thus we can delete m_opaque.
yhirano
2015/11/19 13:19:03
Sorry, it's a rebase error. Fixed.
| |
57 }; | 58 }; |
58 | 59 |
59 } // namespace blink | 60 } // namespace blink |
60 | 61 |
61 #endif // Body_h | 62 #endif // Body_h |
OLD | NEW |