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

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=56907c5bc7334bc3289f0a97dbc4a70c3ac9b41a$
// $hash=5838ce3611dda9523ff072eceb36137663828dd6$
//
#include "libcef_dll/ctocpp/task_manager_ctocpp.h"
@@ -132,6 +132,24 @@ NO_SANITIZE("cfi-icall") bool CefTaskManagerCToCpp::KillTask(int64_t task_id) {
return _retval ? true : false;
}
NO_SANITIZE("cfi-icall")
int64_t CefTaskManagerCToCpp::GetTaskIdForBrowserId(int browser_id) {
shutdown_checker::AssertNotShutdown();
cef_task_manager_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_task_id_for_browser_id)) {
return 0;
}
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int64_t _retval = _struct->get_task_id_for_browser_id(_struct, browser_id);
// Return type: simple
return _retval;
}
// CONSTRUCTOR - Do not edit by hand.
CefTaskManagerCToCpp::CefTaskManagerCToCpp() {}

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=d51db130ffb459b22574d7393e63e87c87dd75e0$
// $hash=2d35ee921c7a1abda4c83b66708bce2451b38f20$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_MANAGER_CTOCPP_H_
@@ -38,6 +38,7 @@ class CefTaskManagerCToCpp : public CefCToCppRefCounted<CefTaskManagerCToCpp,
bool GetTaskIdsList(TaskIdList& task_ids) override;
bool GetTaskInfo(int64_t task_id, CefTaskInfo& info) override;
bool KillTask(int64_t task_id) override;
int64_t GetTaskIdForBrowserId(int browser_id) override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_TASK_MANAGER_CTOCPP_H_