OLD | NEW |
---|---|
(Empty) | |
1 #ifndef UnderlyingSourceBase_h | |
2 #define UnderlyingSourceBase_h | |
3 | |
4 #include "bindings/core/v8/ScriptPromise.h" | |
5 #include "bindings/core/v8/ScriptValue.h" | |
6 #include "bindings/core/v8/ScriptWrappable.h" | |
7 #include "core/CoreExport.h" | |
8 #include "core/streams/ReadableStreamController.h" | |
9 | |
10 namespace blink { | |
11 | |
12 // TODO do we need ActiveDOMObject?? | |
13 | |
14 class CORE_EXPORT UnderlyingSourceBase : public GarbageCollectedFinalized<Underl yingSourceBase>, public ScriptWrappable { | |
15 DEFINE_WRAPPERTYPEINFO(); | |
16 | |
17 public: | |
18 ScriptPromise startWrapper(ScriptState*, ScriptValue stream); | |
19 virtual ScriptPromise start(ScriptState*); | |
20 virtual ScriptPromise pull(ScriptState*); | |
21 virtual ScriptPromise cancel(ScriptState*, ScriptValue reason); | |
22 | |
23 DECLARE_VIRTUAL_TRACE(); | |
24 | |
25 protected: | |
26 // TODO is a reference a good idea? | |
27 ReadableStreamController& controller() const { return *m_controller; } | |
28 | |
29 private: | |
30 // TODO should be using a smart pointer of some sort ... Member<>? Persisten t<>? RefPtr<>? | |
31 // ReadableStreamController is not GarbageCollectedFinalized<>... if we made it so, how do we handle it | |
32 // containing a ScriptValue? | |
33 ReadableStreamController* m_controller; | |
yhirano
2015/06/12 03:40:59
Can we have a controller of type ReadableStreamCon
| |
34 }; | |
35 | |
36 } // namespace blink | |
37 | |
38 #endif UnderlyingSourceBase_h | |
OLD | NEW |