| 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/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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void setBodyPassed() { m_bodyPassed = true; } | 43 void setBodyPassed() { m_bodyPassed = true; } |
| 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 // https://w3c.github.io/webappsec-credential-management/#monkey-patching-fe
tch-2 |
| 54 void setOpaque() { m_opaque = true; } |
| 55 bool opaque() const { return m_opaque; } |
| 56 |
| 53 private: | 57 private: |
| 54 virtual String mimeType() const = 0; | 58 virtual String mimeType() const = 0; |
| 55 | 59 |
| 60 // Body consumption algorithms will reject with a TypeError in a number of e
rror |
| 61 // conditions. This method wraps those up into one call which returns an emp
ty |
| 62 // ScriptPromise if the consumption may proceed, and a ScriptPromise rejecte
d with |
| 63 // a TypeError if it ought to be blocked. |
| 64 ScriptPromise rejectInvalidConsumption(ScriptState*); |
| 65 |
| 56 bool m_bodyPassed; | 66 bool m_bodyPassed; |
| 67 bool m_opaque; |
| 57 }; | 68 }; |
| 58 | 69 |
| 59 } // namespace blink | 70 } // namespace blink |
| 60 | 71 |
| 61 #endif // Body_h | 72 #endif // Body_h |
| OLD | NEW |