Add CefTaskManager::GetTaskIdForBrowserId

Update https://tests/task_manager to show the current browser's
renderer task in bold.


Approved-by: Nik Pavlov
This commit is contained in:
Marshall Greenblatt
2024-07-19 15:19:06 +00:00
parent 3acdbac061
commit 69b884d39c
12 changed files with 122 additions and 11 deletions

View File

@@ -33,7 +33,7 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=944e04f8c3213981c3955d6b5ede036b887d4d9e$
// $hash=324b0399edef39e64fb54fce053e7f8e347e07de$
//
#ifndef CEF_INCLUDE_CAPI_CEF_TASK_MANAGER_CAPI_H_
@@ -92,6 +92,16 @@ typedef struct _cef_task_manager_t {
///
int(CEF_CALLBACK* kill_task)(struct _cef_task_manager_t* self,
int64_t task_id);
///
/// Returns the task ID associated with the main task for |browser_id| (value
/// from cef_browser_t::GetIdentifier). Returns -1 if |browser_id| is invalid,
/// does not currently have an associated task, or the function was called
/// from the incorrect thread.
///
int64_t(CEF_CALLBACK* get_task_id_for_browser_id)(
struct _cef_task_manager_t* self,
int browser_id);
} cef_task_manager_t;
///

View File

@@ -42,13 +42,13 @@
// way that may cause binary incompatibility with other builds. The universal
// hash value will change if any platform is affected whereas the platform hash
// values will change only if that particular platform is affected.
#define CEF_API_HASH_UNIVERSAL "af31a52a9b7a67e9e43aecc3dca57be096bd3c52"
#define CEF_API_HASH_UNIVERSAL "9428a74387b371a45469c91f7dbd648b2dc74132"
#if defined(OS_WIN)
#define CEF_API_HASH_PLATFORM "b24a9d79201dabc26957dc207746d8b6248e0e58"
#define CEF_API_HASH_PLATFORM "e76d3804b2419a0bf024e97d6b9e10df53d93dad"
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "1b1e2db70d324c123a5be09fd9c528acbf49b9a4"
#define CEF_API_HASH_PLATFORM "c88c77c84ecbd81cbf4489c1b1ab4bf0396c26c3"
#elif defined(OS_LINUX)
#define CEF_API_HASH_PLATFORM "9d549b9917bc2f0be789a75179e1aeea134798ef"
#define CEF_API_HASH_PLATFORM "84373e28b1ed172ce6a08da2ea33ca787f92d6dc"
#endif
#ifdef __cplusplus

View File

@@ -95,6 +95,15 @@ class CefTaskManager : public virtual CefBaseRefCounted {
///
/*--cef()--*/
virtual bool KillTask(int64_t task_id) = 0;
///
/// Returns the task ID associated with the main task for |browser_id|
/// (value from CefBrowser::GetIdentifier). Returns -1 if |browser_id| is
/// invalid, does not currently have an associated task, or the method was
/// called from the incorrect thread.
///
/*--cef()--*/
virtual int64_t GetTaskIdForBrowserId(int browser_id) = 0;
};
#endif // CEF_INCLUDE_CEF_TASK_MANAGER_H_