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

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

Powered by Google App Engine
This is Rietveld 408576698