Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1011)

Side by Side Diff: Source/core/streams/UnderlyingSourceBase.h

Issue 1167343002: Add methods for creating V8 extras-based ReadableStreams from C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove C++ queuing strategies Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « Source/core/streams/ReadableStreamController.h ('k') | Source/core/streams/UnderlyingSourceBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698