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

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

Issue 1844053003: CREDENTIAL: Rework the integration with Fetch (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: horo@ 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/ScriptWrappable.h" 10 #include "bindings/core/v8/ScriptWrappable.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool isBodyLocked(); 52 bool isBodyLocked();
53 53
54 // ActiveScriptWrappable override. 54 // ActiveScriptWrappable override.
55 bool hasPendingActivity() const override; 55 bool hasPendingActivity() const override;
56 56
57 DEFINE_INLINE_VIRTUAL_TRACE() 57 DEFINE_INLINE_VIRTUAL_TRACE()
58 { 58 {
59 ActiveDOMObject::trace(visitor); 59 ActiveDOMObject::trace(visitor);
60 } 60 }
61 61
62 // https://w3c.github.io/webappsec-credential-management/#monkey-patching-fe tch-2
63 void setOpaque() { m_opaque = true; }
64 bool opaque() const { return m_opaque; }
65
66 private: 62 private:
67 ReadableByteStream* body(); 63 ReadableByteStream* body();
68 virtual String mimeType() const = 0; 64 virtual String mimeType() const = 0;
69 65
70 // Body consumption algorithms will reject with a TypeError in a number of 66 // Body consumption algorithms will reject with a TypeError in a number of
71 // error conditions. This method wraps those up into one call which returns 67 // error conditions. This method wraps those up into one call which returns
72 // an empty ScriptPromise if the consumption may proceed, and a 68 // an empty ScriptPromise if the consumption may proceed, and a
73 // ScriptPromise rejected with a TypeError if it ought to be blocked. 69 // ScriptPromise rejected with a TypeError if it ought to be blocked.
74 ScriptPromise rejectInvalidConsumption(ScriptState*); 70 ScriptPromise rejectInvalidConsumption(ScriptState*);
75
76 bool m_opaque;
77 }; 71 };
78 72
79 } // namespace blink 73 } // namespace blink
80 74
81 #endif // Body_h 75 #endif // Body_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698