# Class TCefComponentUpdaterRef

Description
Hierarchy
Methods

## Unit

uCEFComponentUpdater

## Declaration

`type TCefComponentUpdaterRef = class(TCefBaseRefCountedRef, ICefComponentUpdater)`

## Description

This structure provides access to Chromium's component updater service, allowing clients to discover registered components and trigger on-demand updates. The functions of this structure 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, functions will return safe defaults (0, nullptr, or NULL).

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_component_updater_capi.h">CEF source file: /include/capi/cef_component_updater_capi.h (cef_component_updater_t))

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedRef
- TCefComponentUpdaterRef

## Overview

### Methods

Protected | `function GetComponentCount: NativeUInt;`
Protected | `function GetComponents(var components_: TCefComponentArray): boolean;`
Protected | `function GetComponentById(const component_id: ustring; var aResult: ICefComponent): boolean;`
Protected | `procedure Update(const component_id: ustring; priority: TCefComponentUpdatePriority; const callback: ICefComponentUpdateCallback);`
Public | `class function UnWrap(data: Pointer): ICefComponentUpdater;`
Public | `class function New: ICefComponentUpdater;`

## Description

### Methods

Protected | `function GetComponentCount: NativeUInt;`
Returns the number of registered components, or 0 if the service is not available.

Protected | `function GetComponents(var components_: TCefComponentArray): boolean;`
Populates |components_| with all registered components. Any existing contents will be cleared first.

Protected | `function GetComponentById(const component_id: ustring; var aResult: ICefComponent): boolean;`
Returns the component with the specified |component_id|, or nullptr if not found or the service is not available.

Protected | `procedure Update(const component_id: ustring; priority: TCefComponentUpdatePriority; const callback: ICefComponentUpdateCallback);`
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.

Public | `class function UnWrap(data: Pointer): ICefComponentUpdater;`
This item has no description.

Public | `class function New: ICefComponentUpdater;`
This item has no description.

Generated by PasDoc 1.0.4.