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

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

Issue 1827373002: Add another body function returning a V8 Extra ReadableStream to Response (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h" 11 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "core/dom/ActiveDOMObject.h" 12 #include "core/dom/ActiveDOMObject.h"
12 #include "modules/ModulesExport.h" 13 #include "modules/ModulesExport.h"
13 #include "platform/heap/Handle.h" 14 #include "platform/heap/Handle.h"
14 #include "wtf/text/WTFString.h" 15 #include "wtf/text/WTFString.h"
15 16
16 namespace blink { 17 namespace blink {
17 18
18 class BodyStreamBuffer; 19 class BodyStreamBuffer;
19 class ExecutionContext; 20 class ExecutionContext;
(...skipping 20 matching lines...) Expand all
40 ~Body() override { } 41 ~Body() override { }
41 42
42 ScriptPromise arrayBuffer(ScriptState*); 43 ScriptPromise arrayBuffer(ScriptState*);
43 ScriptPromise blob(ScriptState*); 44 ScriptPromise blob(ScriptState*);
44 ScriptPromise formData(ScriptState*); 45 ScriptPromise formData(ScriptState*);
45 ScriptPromise json(ScriptState*); 46 ScriptPromise json(ScriptState*);
46 ScriptPromise text(ScriptState*); 47 ScriptPromise text(ScriptState*);
47 ReadableByteStream* bodyWithUseCounter(); 48 ReadableByteStream* bodyWithUseCounter();
48 virtual BodyStreamBuffer* bodyBuffer() = 0; 49 virtual BodyStreamBuffer* bodyBuffer() = 0;
49 virtual const BodyStreamBuffer* bodyBuffer() const = 0; 50 virtual const BodyStreamBuffer* bodyBuffer() const = 0;
51 ScriptValue v8ExtraStreamBody(ScriptState*);
50 52
51 virtual bool bodyUsed(); 53 virtual bool bodyUsed();
52 bool isBodyLocked(); 54 bool isBodyLocked();
53 55
54 // ActiveScriptWrappable override. 56 // ActiveScriptWrappable override.
55 bool hasPendingActivity() const override; 57 bool hasPendingActivity() const override;
56 58
57 DEFINE_INLINE_VIRTUAL_TRACE() 59 DEFINE_INLINE_VIRTUAL_TRACE()
58 { 60 {
59 ActiveDOMObject::trace(visitor); 61 ActiveDOMObject::trace(visitor);
(...skipping 12 matching lines...) Expand all
72 // an empty ScriptPromise if the consumption may proceed, and a 74 // an empty ScriptPromise if the consumption may proceed, and a
73 // ScriptPromise rejected with a TypeError if it ought to be blocked. 75 // ScriptPromise rejected with a TypeError if it ought to be blocked.
74 ScriptPromise rejectInvalidConsumption(ScriptState*); 76 ScriptPromise rejectInvalidConsumption(ScriptState*);
75 77
76 bool m_opaque; 78 bool m_opaque;
77 }; 79 };
78 80
79 } // namespace blink 81 } // namespace blink
80 82
81 #endif // Body_h 83 #endif // Body_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698