Improve support for a host owned message pump (issue #1805)

- Add new CefSettings.external_message_pump option and
  CefBrowserProcessHandler::OnScheduleMessagePumpWork() callback.
- Improve documentation related to CefDoMessageLoopWork().
- Pass `--external-message-pump` command-line flag to cefclient or
  cef_unittests to test the new mode.
This commit is contained in:
Marshall Greenblatt
2016-05-04 14:00:03 -04:00
parent 52f9aacdf5
commit 1ff26aa02a
30 changed files with 1084 additions and 20 deletions

View File

@ -87,6 +87,22 @@ class CefBrowserProcessHandler : public virtual CefBase {
virtual CefRefPtr<CefPrintHandler> GetPrintHandler() {
return NULL;
}
///
// Called from any thread when work has been scheduled for the browser process
// main (UI) thread. This callback is used in combination with CefSettings.
// external_message_pump and CefDoMessageLoopWork() in cases where the CEF
// message loop must be integrated into an existing application message loop
// (see additional comments and warnings on CefDoMessageLoopWork). This
// callback should schedule a CefDoMessageLoopWork() call to happen on the
// main (UI) thread. |delay_ms| is the requested delay in milliseconds. If
// |delay_ms| is <= 0 then the call should happen reasonably soon. If
// |delay_ms| is > 0 then the call should be scheduled to happen after the
// specified delay and any currently pending scheduled call should be
// cancelled.
///
/*--cef()--*/
virtual void OnScheduleMessagePumpWork(int64 delay_ms) {}
};
#endif // CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_