Chromium Code Reviews| Index: third_party/WebKit/Source/modules/fetch/Body.h |
| diff --git a/third_party/WebKit/Source/modules/fetch/Body.h b/third_party/WebKit/Source/modules/fetch/Body.h |
| index 1e9ee5374eb14ee5d5a8cdba5b51b8c763dc7da7..6d7bdf6c7ca748a4bfd7e33f817dab477ec8e9d0 100644 |
| --- a/third_party/WebKit/Source/modules/fetch/Body.h |
| +++ b/third_party/WebKit/Source/modules/fetch/Body.h |
| @@ -8,6 +8,7 @@ |
| #include "bindings/core/v8/ScriptPromise.h" |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "core/dom/ActiveDOMObject.h" |
| +#include "core/dom/DOMException.h" |
|
horo
2015/11/18 05:14:09
remove
|
| #include "modules/ModulesExport.h" |
| #include "platform/heap/Handle.h" |
| #include "wtf/text/WTFString.h" |
| @@ -50,10 +51,21 @@ public: |
| ActiveDOMObject::trace(visitor); |
| } |
| + // https://w3c.github.io/webappsec-credential-management/#monkey-patching-fetch-2 |
| + void setOpaque() { m_opaque = true; } |
| + bool opaque() const { return m_opaque; } |
| + |
| private: |
| virtual String mimeType() const = 0; |
| + // Body consumption algorithms will reject with a TypeError in a number of error |
| + // conditions. This method wraps those up into one call which returns an empty |
| + // ScriptPromise if the consumption may proceed, and a ScriptPromise rejected with |
| + // a TypeError if it ought to be blocked. |
| + ScriptPromise rejectInvalidConsumption(ScriptState*); |
| + |
| bool m_bodyPassed; |
| + bool m_opaque; |
| }; |
| } // namespace blink |