| 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 14 matching lines...) Expand all Loading... |
| 25 // Note: This class has body stream and its predicate whereas in the current | 25 // Note: This class has body stream and its predicate whereas in the current |
| 26 // spec only Response has it and Request has a byte stream defined in the | 26 // spec only Response has it and Request has a byte stream defined in the |
| 27 // Encoding spec. The spec should be fixed shortly to be aligned with this | 27 // Encoding spec. The spec should be fixed shortly to be aligned with this |
| 28 // implementation. | 28 // implementation. |
| 29 class MODULES_EXPORT Body | 29 class MODULES_EXPORT Body |
| 30 : public GarbageCollectedFinalized<Body> | 30 : public GarbageCollectedFinalized<Body> |
| 31 , public ScriptWrappable | 31 , public ScriptWrappable |
| 32 , public ActiveDOMObject { | 32 , public ActiveDOMObject { |
| 33 WTF_MAKE_NONCOPYABLE(Body); | 33 WTF_MAKE_NONCOPYABLE(Body); |
| 34 DEFINE_WRAPPERTYPEINFO(); | 34 DEFINE_WRAPPERTYPEINFO(); |
| 35 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Body); | 35 USING_GARBAGE_COLLECTED_MIXIN(Body); |
| 36 public: | 36 public: |
| 37 explicit Body(ExecutionContext*); | 37 explicit Body(ExecutionContext*); |
| 38 ~Body() override { } | 38 ~Body() override { } |
| 39 | 39 |
| 40 ScriptPromise arrayBuffer(ScriptState*); | 40 ScriptPromise arrayBuffer(ScriptState*); |
| 41 ScriptPromise blob(ScriptState*); | 41 ScriptPromise blob(ScriptState*); |
| 42 ScriptPromise formData(ScriptState*); | 42 ScriptPromise formData(ScriptState*); |
| 43 ScriptPromise json(ScriptState*); | 43 ScriptPromise json(ScriptState*); |
| 44 ScriptPromise text(ScriptState*); | 44 ScriptPromise text(ScriptState*); |
| 45 ReadableByteStream* bodyWithUseCounter(); | 45 ReadableByteStream* bodyWithUseCounter(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 70 // an empty ScriptPromise if the consumption may proceed, and a | 70 // an empty ScriptPromise if the consumption may proceed, and a |
| 71 // ScriptPromise rejected with a TypeError if it ought to be blocked. | 71 // ScriptPromise rejected with a TypeError if it ought to be blocked. |
| 72 ScriptPromise rejectInvalidConsumption(ScriptState*); | 72 ScriptPromise rejectInvalidConsumption(ScriptState*); |
| 73 | 73 |
| 74 bool m_opaque; | 74 bool m_opaque; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif // Body_h | 79 #endif // Body_h |
| OLD | NEW |