Chromium Embedded Framework (CEF)  130.1.2+g48f3ef6+chromium-130.0.6723.44
CefTaskManager Class Referenceabstract

Class that facilitates managing the browser-related tasks. More...

#include "include/cef_task_manager.h"

Inheritance diagram for CefTaskManager:
CefBaseRefCounted

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< CefTaskManagerGetTaskManager ()
 Returns the global task manager object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CefBaseRefCounted
virtual ~CefBaseRefCounted ()
 

Detailed Description

Class that facilitates managing the browser-related tasks.

The methods of this class may only be called on the UI thread.

Member Typedef Documentation

◆ TaskIdList

typedef std::vector<int64_t> CefTaskManager::TaskIdList

◆ TaskType

Member Function Documentation

◆ 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()

static CefRefPtr<CefTaskManager> CefTaskManager::GetTaskManager ( )
static

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: