@@ -20,6 +20,7 @@ class CefFileReader : public CefStreamReader {
20
20
virtual int Seek (int64 offset, int whence) OVERRIDE;
21
21
virtual int64 Tell () OVERRIDE;
22
22
virtual int Eof () OVERRIDE;
23
+ virtual bool MayBlock () OVERRIDE { return true ; }
23
24
24
25
protected:
25
26
bool close_;
@@ -39,6 +40,7 @@ class CefFileWriter : public CefStreamWriter {
39
40
virtual int Seek (int64 offset, int whence) OVERRIDE;
40
41
virtual int64 Tell () OVERRIDE;
41
42
virtual int Flush () OVERRIDE;
43
+ virtual bool MayBlock () OVERRIDE { return true ; }
42
44
43
45
protected:
44
46
FILE* file_;
@@ -58,6 +60,7 @@ class CefBytesReader : public CefStreamReader {
58
60
virtual int Seek (int64 offset, int whence) OVERRIDE;
59
61
virtual int64 Tell () OVERRIDE;
60
62
virtual int Eof () OVERRIDE;
63
+ virtual bool MayBlock () OVERRIDE { return false ; }
61
64
62
65
void SetData (void * data, int64 datasize, bool copy);
63
66
@@ -84,6 +87,7 @@ class CefBytesWriter : public CefStreamWriter {
84
87
virtual int Seek (int64 offset, int whence) OVERRIDE;
85
88
virtual int64 Tell () OVERRIDE;
86
89
virtual int Flush () OVERRIDE;
90
+ virtual bool MayBlock () OVERRIDE { return false ; }
87
91
88
92
void * GetData () { return data_; }
89
93
int64 GetDataSize () { return offset_; }
@@ -119,6 +123,9 @@ class CefHandlerReader : public CefStreamReader {
119
123
virtual int Eof () OVERRIDE {
120
124
return handler_->Eof ();
121
125
}
126
+ virtual bool MayBlock () OVERRIDE {
127
+ return handler_->MayBlock ();
128
+ }
122
129
123
130
protected:
124
131
CefRefPtr<CefReadHandler> handler_;
@@ -144,6 +151,9 @@ class CefHandlerWriter : public CefStreamWriter {
144
151
virtual int Flush () OVERRIDE {
145
152
return handler_->Flush ();
146
153
}
154
+ virtual bool MayBlock () OVERRIDE {
155
+ return handler_->MayBlock ();
156
+ }
147
157
148
158
protected:
149
159
CefRefPtr<CefWriteHandler> handler_;
0 commit comments