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

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

Issue 1418813004: [Fetch API] Reflect spec changes of bodyUsed property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/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 21 matching lines...) Expand all
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* body();
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();
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 void makeOpaque() { m_opaque = true; } 53 void makeOpaque() { m_opaque = true; }
54 bool opaque() const { return m_opaque; } 54 bool opaque() const { return m_opaque; }
55 55
56 private: 56 private:
57 virtual String mimeType() const = 0; 57 virtual String mimeType() const = 0;
58 58
59 bool m_bodyPassed;
60 bool m_opaque; 59 bool m_opaque;
61 }; 60 };
62 61
63 } // namespace blink 62 } // namespace blink
64 63
65 #endif // Body_h 64 #endif // Body_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698