- Add MayBlock() method to stream classes which is used as a hint when determining the thread to access the stream from (issue #1187).

- In cases where MayBlock() returns true have CefStreamResourceReader perform the reads on the FILE thread (issue #1187).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1582 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-01-30 23:15:55 +00:00
parent 89a8832550
commit 2534b67365
23 changed files with 541 additions and 18 deletions

View File

@ -120,6 +120,20 @@ int CEF_CALLBACK stream_writer_flush(struct _cef_stream_writer_t* self) {
return _retval;
}
int CEF_CALLBACK stream_writer_may_block(struct _cef_stream_writer_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefStreamWriterCppToC::Get(self)->MayBlock();
// Return type: bool
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
@ -130,6 +144,7 @@ CefStreamWriterCppToC::CefStreamWriterCppToC(CefStreamWriter* cls)
struct_.struct_.seek = stream_writer_seek;
struct_.struct_.tell = stream_writer_tell;
struct_.struct_.flush = stream_writer_flush;
struct_.struct_.may_block = stream_writer_may_block;
}
#ifndef NDEBUG