Chromium Embedded Framework (CEF)
129.0.1+g463bda9+chromium-129.0.6668.12
|
Class that facilitates managing the browser-related tasks. More...
#include "include/cef_task_manager.h"
Public Types | |
typedef std::vector< int64_t > | TaskIdList |
typedef cef_task_type_t | TaskType |
Public Member Functions | |
virtual size_t | GetTasksCount ()=0 |
Returns the number of tasks currently tracked by the task manager. More... | |
virtual bool | GetTaskIdsList (TaskIdList &task_ids)=0 |
Gets the list of task IDs currently tracked by the task manager. More... | |
virtual bool | GetTaskInfo (int64_t task_id, CefTaskInfo &info)=0 |
Gets information about the task with |task_id|. More... | |
virtual bool | KillTask (int64_t task_id)=0 |
Attempts to terminate a task with |task_id|. More... | |
virtual int64_t | GetTaskIdForBrowserId (int browser_id)=0 |
Returns the task ID associated with the main task for |browser_id| (value from CefBrowser::GetIdentifier). More... | |
Public Member Functions inherited from CefBaseRefCounted | |
virtual void | AddRef () const =0 |
Called to increment the reference count for the object. More... | |
virtual bool | Release () const =0 |
Called to decrement the reference count for the object. More... | |
virtual bool | HasOneRef () const =0 |
Returns true if the reference count is 1. More... | |
virtual bool | HasAtLeastOneRef () const =0 |
Returns true if the reference count is at least 1. More... | |
Static Public Member Functions | |
static CefRefPtr< CefTaskManager > | GetTaskManager () |
Returns the global task manager object. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CefBaseRefCounted | |
virtual | ~CefBaseRefCounted () |
Class that facilitates managing the browser-related tasks.
The methods of this class may only be called on the UI thread.
typedef std::vector<int64_t> CefTaskManager::TaskIdList |
|
pure virtual |
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.
|
pure virtual |
Gets the list of task IDs currently tracked by the task manager.
Tasks that share the same process id will always be consecutive. The list will be sorted in a way that reflects the process tree: the browser process will be first, followed by the gpu process if it exists. Related processes (e.g., a subframe process and its parent) will be kept together if possible. Callers can expect this ordering to be stable when a process is added or removed. The task IDs are unique within the application lifespan. Returns false if the method was called from the incorrect thread.
|
pure virtual |
Gets information about the task with |task_id|.
Returns true if the information about the task was successfully retrieved and false if the |task_id| is invalid or the method was called from the incorrect thread.
|
static |
Returns the global task manager object.
Returns nullptr if the method was called from the incorrect thread.
|
pure virtual |
Returns the number of tasks currently tracked by the task manager.
Returns 0 if the method was called from the incorrect thread.
|
pure virtual |
Attempts to terminate a task with |task_id|.
Returns false if the |task_id| is invalid, the call is made from an incorrect thread, or if the task cannot be terminated.