| 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/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 Loading... |
| 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 |
| OLD | NEW |