Add CefThread interface (issue #1632)

This commit is contained in:
Marshall Greenblatt
2016-11-11 18:22:53 -05:00
parent 607d420baf
commit 18d56feac0
20 changed files with 1318 additions and 41 deletions

View File

@@ -46,8 +46,10 @@ extern "C" {
#if defined(OS_WIN)
typedef DWORD cef_platform_thread_id_t;
#define kInvalidPlatformThreadId 0U
#elif defined(OS_POSIX)
typedef pid_t cef_platform_thread_id_t;
#define kInvalidPlatformThreadId 0
#endif
///
@@ -57,8 +59,10 @@ CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id();
#if defined(OS_WIN)
typedef DWORD cef_platform_thread_handle_t;
#define kInvalidPlatformThreadHandle 0U
#elif defined(OS_POSIX)
typedef pthread_t cef_platform_thread_handle_t;
#define kInvalidPlatformThreadHandle 0
#endif
///

View File

@@ -1396,6 +1396,73 @@ typedef enum {
TID_RENDERER,
} cef_thread_id_t;
///
// Thread priority values listed in increasing order of importance.
///
typedef enum {
///
// Suitable for threads that shouldn't disrupt high priority work.
///
TP_BACKGROUND,
///
// Default priority level.
///
TP_NORMAL,
///
// Suitable for threads which generate data for the display (at ~60Hz).
///
TP_DISPLAY,
///
// Suitable for low-latency, glitch-resistant audio.
///
TP_REALTIME_AUDIO,
} cef_thread_priority_t;
///
// Message loop types. Indicates the set of asynchronous events that a message
// loop can process.
///
typedef enum {
///
// Supports tasks and timers.
///
ML_TYPE_DEFAULT,
///
// Supports tasks, timers and native UI events (e.g. Windows messages).
///
ML_TYPE_UI,
///
// Supports tasks, timers and asynchronous IO events.
///
ML_TYPE_IO,
} cef_message_loop_type_t;
///
// Windows COM initialization mode. Specifies how COM will be initialized for a
// new thread.
///
typedef enum {
///
// No COM initialization.
///
COM_INIT_MODE_NONE,
///
// Initialize COM using single-threaded apartments.
///
COM_INIT_MODE_STA,
///
// Initialize COM using multi-threaded apartments.
///
COM_INIT_MODE_MTA,
} cef_com_init_mode_t;
///
// Supported value types.
///