Class that facilitates managing the browser-related tasks.
More...
#include "include/cef_task_manager.h"
|
| virtual size_t | GetTasksCount ()=0 |
| | Returns the number of tasks currently tracked by the task manager.
|
| |
| virtual bool | GetTaskIdsList (TaskIdList &task_ids)=0 |
| | Gets the list of task IDs currently tracked by the task manager.
|
| |
| virtual bool | GetTaskInfo (int64_t task_id, CefTaskInfo &info)=0 |
| | Gets information about the task with |task_id|.
|
| |
| virtual bool | KillTask (int64_t task_id)=0 |
| | Attempts to terminate a task with |task_id|.
|
| |
| virtual int64_t | GetTaskIdForBrowserId (int browser_id)=0 |
| | Returns the task ID associated with the main task for |browser_id| (value from CefBrowser::GetIdentifier).
|
| |
| virtual void | AddRef () const =0 |
| | Called to increment the reference count for the object.
|
| |
| virtual bool | Release () const =0 |
| | Called to decrement the reference count for the object.
|
| |
| virtual bool | HasOneRef () const =0 |
| | Returns true if the reference count is 1.
|
| |
| virtual bool | HasAtLeastOneRef () const =0 |
| | Returns true if the reference count is at least 1.
|
| |
Class that facilitates managing the browser-related tasks.
The methods of this class may only be called on the UI thread.
◆ TaskIdList
◆ TaskType
◆ GetTaskIdForBrowserId()
| virtual int64_t CefTaskManager::GetTaskIdForBrowserId |
( |
int |
browser_id | ) |
|
|
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.
◆ GetTaskIdsList()
| virtual bool CefTaskManager::GetTaskIdsList |
( |
TaskIdList & |
task_ids | ) |
|
|
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.
◆ GetTaskInfo()
| virtual bool CefTaskManager::GetTaskInfo |
( |
int64_t |
task_id, |
|
|
CefTaskInfo & |
info |
|
) |
| |
|
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.
◆ GetTaskManager()
Returns the global task manager object.
Returns nullptr if the method was called from the incorrect thread.
◆ GetTasksCount()
| virtual size_t CefTaskManager::GetTasksCount |
( |
| ) |
|
|
pure virtual |
Returns the number of tasks currently tracked by the task manager.
Returns 0 if the method was called from the incorrect thread.
◆ KillTask()
| virtual bool CefTaskManager::KillTask |
( |
int64_t |
task_id | ) |
|
|
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.
The documentation for this class was generated from the following file: