Chromium Code Reviews| 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" |
| 11 #include "core/dom/DOMException.h" | |
|
horo
2015/11/18 05:14:09
remove
| |
| 11 #include "modules/ModulesExport.h" | 12 #include "modules/ModulesExport.h" |
| 12 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 13 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 class BodyStreamBuffer; | 18 class BodyStreamBuffer; |
| 18 class ExecutionContext; | 19 class ExecutionContext; |
| 19 class ReadableByteStream; | 20 class ReadableByteStream; |
| 20 class ScriptState; | 21 class ScriptState; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 43 void setBodyPassed() { m_bodyPassed = true; } | 44 void setBodyPassed() { m_bodyPassed = true; } |
| 44 | 45 |
| 45 // ActiveDOMObject override. | 46 // ActiveDOMObject override. |
| 46 bool hasPendingActivity() const override; | 47 bool hasPendingActivity() const override; |
| 47 | 48 |
| 48 DEFINE_INLINE_VIRTUAL_TRACE() | 49 DEFINE_INLINE_VIRTUAL_TRACE() |
| 49 { | 50 { |
| 50 ActiveDOMObject::trace(visitor); | 51 ActiveDOMObject::trace(visitor); |
| 51 } | 52 } |
| 52 | 53 |
| 54 // https://w3c.github.io/webappsec-credential-management/#monkey-patching-fe tch-2 | |
| 55 void setOpaque() { m_opaque = true; } | |
| 56 bool opaque() const { return m_opaque; } | |
| 57 | |
| 53 private: | 58 private: |
| 54 virtual String mimeType() const = 0; | 59 virtual String mimeType() const = 0; |
| 55 | 60 |
| 61 // Body consumption algorithms will reject with a TypeError in a number of e rror | |
| 62 // conditions. This method wraps those up into one call which returns an emp ty | |
| 63 // ScriptPromise if the consumption may proceed, and a ScriptPromise rejecte d with | |
| 64 // a TypeError if it ought to be blocked. | |
| 65 ScriptPromise rejectInvalidConsumption(ScriptState*); | |
| 66 | |
| 56 bool m_bodyPassed; | 67 bool m_bodyPassed; |
| 68 bool m_opaque; | |
| 57 }; | 69 }; |
| 58 | 70 |
| 59 } // namespace blink | 71 } // namespace blink |
| 60 | 72 |
| 61 #endif // Body_h | 73 #endif // Body_h |
| OLD | NEW |