Chromium Embedded Framework (CEF) 148.0.4+ga59e378+chromium-148.0.7778.40
CefComponentUpdater Class Referenceabstract

This class provides access to Chromium's component updater service, allowing clients to discover registered components and trigger on-demand updates. More...

#include "include/cef_component_updater.h"

Inheritance diagram for CefComponentUpdater:
CefBaseRefCounted

Public Member Functions

virtual size_t GetComponentCount ()=0
 Returns the number of registered components, or 0 if the service is not available.
 
virtual void GetComponents (std::vector< CefRefPtr< CefComponent > > &components)=0
 Populates |components| with all registered components.
 
virtual CefRefPtr< CefComponentGetComponentByID (const CefString &component_id)=0
 Returns the component with the specified |component_id|, or nullptr if not found or the service is not available.
 
virtual void Update (const CefString &component_id, cef_component_update_priority_t priority, CefRefPtr< CefComponentUpdateCallback > callback)=0
 Triggers an on-demand update for the component with the specified |component_id|.
 
- Public Member Functions inherited from CefBaseRefCounted
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.
 

Static Public Member Functions

static CefRefPtr< CefComponentUpdaterGetComponentUpdater ()
 Returns the global CefComponentUpdater singleton.
 

Additional Inherited Members

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

Detailed Description

This class provides access to Chromium's component updater service, allowing clients to discover registered components and trigger on-demand updates.

The methods of this class may only be called on the browser process UI thread. If the CEF context is not initialized or the component updater service is not available, methods will return safe defaults (0, nullptr, or empty).

Member Function Documentation

◆ GetComponentByID()

virtual CefRefPtr< CefComponent > CefComponentUpdater::GetComponentByID ( const CefString component_id)
pure virtual

Returns the component with the specified |component_id|, or nullptr if not found or the service is not available.

◆ GetComponentCount()

virtual size_t CefComponentUpdater::GetComponentCount ( )
pure virtual

Returns the number of registered components, or 0 if the service is not available.

◆ GetComponents()

virtual void CefComponentUpdater::GetComponents ( std::vector< CefRefPtr< CefComponent > > &  components)
pure virtual

Populates |components| with all registered components.

Any existing contents will be cleared first.

◆ GetComponentUpdater()

static CefRefPtr< CefComponentUpdater > CefComponentUpdater::GetComponentUpdater ( )
static

Returns the global CefComponentUpdater singleton.

Returns nullptr if called from the incorrect thread.

◆ Update()

virtual void CefComponentUpdater::Update ( const CefString component_id,
cef_component_update_priority_t  priority,
CefRefPtr< CefComponentUpdateCallback callback 
)
pure virtual

Triggers an on-demand update for the component with the specified |component_id|.

|priority| specifies whether the update should be processed in the background or foreground. Use CEF_COMPONENT_UPDATE_PRIORITY_FOREGROUND for user-initiated updates.

|callback| will be called asynchronously on the UI thread when the update operation completes. The callback is always executed, including when the component is already up-to-date (returns CEF_COMPONENT_UPDATE_ERROR_NONE), when the requested component doesn't exist, or when the service is unavailable (returns CEF_COMPONENT_UPDATE_ERROR_SERVICE_ERROR). The callback may be nullptr if no notification is needed.


The documentation for this class was generated from the following file: