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

Side by Side Diff: third_party/WebKit/Source/core/streams/ReadableStreamOperations.h

Issue 1898873003: Add ReadableStream operations to use it from Fetch API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@body-stream-buffer-test-refactoring
Patch Set: Created 4 years, 8 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 ReadableStreamOperations_h 5 #ifndef ReadableStreamOperations_h
6 #define ReadableStreamOperations_h 6 #define ReadableStreamOperations_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include <v8.h> 10 #include <v8.h>
(...skipping 25 matching lines...) Expand all
36 // errored. 36 // errored.
37 static ScriptValue getReader(ScriptState*, ScriptValue stream, ExceptionStat e&); 37 static ScriptValue getReader(ScriptState*, ScriptValue stream, ExceptionStat e&);
38 38
39 // IsReadableStream 39 // IsReadableStream
40 static bool isReadableStream(ScriptState*, ScriptValue); 40 static bool isReadableStream(ScriptState*, ScriptValue);
41 41
42 // IsReadableStreamDisturbed 42 // IsReadableStreamDisturbed
43 // This function assumes |isReadableStream(stream)|. 43 // This function assumes |isReadableStream(stream)|.
44 static bool isDisturbed(ScriptState*, ScriptValue stream); 44 static bool isDisturbed(ScriptState*, ScriptValue stream);
45 45
46 // SetReadableStreamDisturbed
47 // This function assumes |isReadableStream(stream)|.
48 static void setDisturbed(ScriptState*, ScriptValue stream);
49
46 // IsReadableStreamLocked 50 // IsReadableStreamLocked
47 // This function assumes |isReadableStream(stream)|. 51 // This function assumes |isReadableStream(stream)|.
48 static bool isLocked(ScriptState*, ScriptValue stream); 52 static bool isLocked(ScriptState*, ScriptValue stream);
49 53
54 // IsReadableStreamReadable
55 // This function assumes |isReadableStream(stream)|.
56 static bool isReadable(ScriptState*, ScriptValue stream);
57
58 // IsReadableStreamClosed
59 // This function assumes |isReadableStream(stream)|.
60 static bool isClosed(ScriptState*, ScriptValue stream);
61
62 // IsReadableStreamErrored
63 // This function assumes |isReadableStream(stream)|.
64 static bool isErrored(ScriptState*, ScriptValue stream);
65
50 // IsReadableStreamReader 66 // IsReadableStreamReader
51 static bool isReadableStreamReader(ScriptState*, ScriptValue); 67 static bool isReadableStreamReader(ScriptState*, ScriptValue);
52 68
53 // ReadFromReadableStreamReader 69 // ReadFromReadableStreamReader
54 // This function assumes |isReadableStreamReader(reader)|. 70 // This function assumes |isReadableStreamReader(reader)|.
55 static ScriptPromise read(ScriptState*, ScriptValue reader); 71 static ScriptPromise read(ScriptState*, ScriptValue reader);
56 }; 72 };
57 73
58 } // namespace blink 74 } // namespace blink
59 75
60 #endif // ReadableStreamOperations_h 76 #endif // ReadableStreamOperations_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698