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

Side by Side Diff: Source/core/testing/ReadableStreamTestSource.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: That todo is not necessary according to yhirano@ Created 5 years, 5 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 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ReadableStreamTestSource_h
6 #define ReadableStreamTestSource_h
7
8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/ScriptWrappable.h"
11 #include "core/streams/ReadableStreamController.h"
12 #include "core/streams/UnderlyingSourceBase.h"
13 #include "platform/heap/Handle.h"
14
15 namespace blink {
16
17 class ReadableStreamTestSource final : public UnderlyingSourceBase {
18 DEFINE_WRAPPERTYPEINFO();
19
20 public:
21 ReadableStreamTestSource(ScriptState* scriptState) : UnderlyingSourceBase(sc riptState) { }
22
23 void enqueue(ScriptValue v) { controller()->enqueue(v); }
24 void close() { controller()->close(); }
25 void error(ScriptValue e) { controller()->error(e); }
26 };
27
28 } // namespace blink
29
30 #endif // ReadableStreamTestSource_h
OLDNEW
« no previous file with comments | « Source/core/testing/ReadableStreamTestRequest.idl ('k') | Source/core/testing/ReadableStreamTestSource.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698