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

Unified Diff: Source/core/streams/ScriptReadableStreamController.h

Issue 1118673002: Implement ReadableStream as a V8 extra (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanups; make controller a member instead of arg Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/streams/ScriptReadableStreamController.h
diff --git a/Source/core/streams/ScriptReadableStreamController.h b/Source/core/streams/ScriptReadableStreamController.h
new file mode 100644
index 0000000000000000000000000000000000000000..3193c4d5e5071e69a50564812bf621f82ca112ef
--- /dev/null
+++ b/Source/core/streams/ScriptReadableStreamController.h
@@ -0,0 +1,31 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ScriptReadableStreamController_h
+#define ScriptReadableStreamController_h
+
+#include "bindings/core/v8/ScriptValue.h"
+#include <v8.h>
+
+namespace blink {
+
+class ScriptReadableStreamController {
+public:
+ explicit ScriptReadableStreamController(ScriptValue stream);
+ void close();
+ double desiredSize() const;
+
+ template<typename ChunkType>
+ void enqueue(ChunkType) const;
+
+ template<typename ErrorType>
+ void error(ErrorType);
+
+private:
+ ScriptValue m_stream;
+};
+
+} // namespace blink
+
+#endif // ScriptReadableStreamController_h
« no previous file with comments | « Source/core/streams/ScriptReadableStream.cpp ('k') | Source/core/streams/ScriptReadableStreamController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698