mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- 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:
@ -71,6 +71,14 @@ class CefReadHandler : public virtual CefBase {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Eof() =0;
|
||||
|
||||
///
|
||||
// Return true if this handler performs work like accessing the file system
|
||||
// which may block. Used as a hint for determining the thread to access the
|
||||
// handler from.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MayBlock() =0;
|
||||
};
|
||||
|
||||
|
||||
@ -123,6 +131,14 @@ class CefStreamReader : public virtual CefBase {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Eof() =0;
|
||||
|
||||
///
|
||||
// Returns true if this reader performs work like accessing the file system
|
||||
// which may block. Used as a hint for determining the thread to access the
|
||||
// reader from.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MayBlock() =0;
|
||||
};
|
||||
|
||||
|
||||
@ -158,6 +174,14 @@ class CefWriteHandler : public virtual CefBase {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Flush() =0;
|
||||
|
||||
///
|
||||
// Return true if this handler performs work like accessing the file system
|
||||
// which may block. Used as a hint for determining the thread to access the
|
||||
// handler from.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MayBlock() =0;
|
||||
};
|
||||
|
||||
|
||||
@ -205,6 +229,14 @@ class CefStreamWriter : public virtual CefBase {
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual int Flush() =0;
|
||||
|
||||
///
|
||||
// Returns true if this writer performs work like accessing the file system
|
||||
// which may block. Used as a hint for determining the thread to access the
|
||||
// writer from.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool MayBlock() =0;
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_STREAM_H_
|
||||
|
Reference in New Issue
Block a user