# Class TCEFSentinel

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFSentinel

## Declaration

`type TCEFSentinel = class(TComponent)`

## Description

TCEFSentinel is used as a timer that checks the number of running CEF processes when you close all browsers before shutdown. This component is only used as a last resort when there's an unresolved shutdown issue in CEF or CEF4Delphi that generates exceptions when the application is closed.

## Hierarchy

- TObject
- TPersistent
- TComponent
- TCEFSentinel

## Overview

### Fields

| `FCompHandle: HWND;`
| `FStatus: TSentinelStatus;`
| `FStatusCS: TCriticalSection;`
| `FDelayPerProcMs: cardinal;`
| `FMinInitDelayMs: cardinal;`
| `FFinalDelayMs: cardinal;`
| `FMinChildProcs: integer;`
| `FMaxCheckCount: integer;`
| `FCheckCount: integer;`
| `FOnClose: TNotifyEvent;`
| `FTimer: TTimer;`

### Methods

| `function GetStatus: TSentinelStatus;`
| `function GetChildProcCount: integer;`
| `procedure WndProc(var aMessage: TMessage);`
| `procedure doStartMsg(var aMessage : TMessage); virtual;`
| `procedure doCloseMsg(var aMessage : TMessage); virtual;`
| `function SendCompMessage(aMsg : cardinal) : boolean;`
| `function CanClose: boolean; virtual;`
| `procedure Timer_OnTimer(Sender: TObject); virtual;`
| `constructor Create(AOwner: TComponent); override;`
| `destructor Destroy; override;`
| `procedure AfterConstruction; override;`
| `procedure Start; virtual;`

### Properties

| `property Status : TSentinelStatus read GetStatus;`
| `property ChildProcCount : integer read GetChildProcCount;`
| `property DelayPerProcMs : cardinal read FDelayPerProcMs write FDelayPerProcMs default CEFSENTINEL_DEFAULT_DELAYPERPROCMS;`
| `property MinInitDelayMs : cardinal read FMinInitDelayMs write FMinInitDelayMs default CEFSENTINEL_DEFAULT_MININITDELAYMS;`
| `property FinalDelayMs : cardinal read FFinalDelayMs write FFinalDelayMs default CEFSENTINEL_DEFAULT_FINALDELAYMS;`
| `property MinChildProcs : integer read FMinChildProcs write FMinChildProcs default CEFSENTINEL_DEFAULT_MINCHILDPROCS;`
| `property MaxCheckCount : integer read FMaxCheckCount write FMaxCheckCount default CEFSENTINEL_DEFAULT_MAXCHECKCOUNTS;`
| `property OnClose : TNotifyEvent read FOnClose write FOnClose;`

## Description

### Fields

| `FCompHandle: HWND;`
This item has no description.

| `FStatus: TSentinelStatus;`
This item has no description.

| `FStatusCS: TCriticalSection;`
This item has no description.

| `FDelayPerProcMs: cardinal;`
This item has no description.

| `FMinInitDelayMs: cardinal;`
This item has no description.

| `FFinalDelayMs: cardinal;`
This item has no description.

| `FMinChildProcs: integer;`
This item has no description.

| `FMaxCheckCount: integer;`
This item has no description.

| `FCheckCount: integer;`
This item has no description.

| `FOnClose: TNotifyEvent;`
This item has no description.

| `FTimer: TTimer;`
This item has no description.

### Methods

| `function GetStatus: TSentinelStatus;`
This item has no description.

| `function GetChildProcCount: integer;`
This item has no description.

| `procedure WndProc(var aMessage: TMessage);`
This item has no description.

| `procedure doStartMsg(var aMessage : TMessage); virtual;`
This item has no description.

| `procedure doCloseMsg(var aMessage : TMessage); virtual;`
This item has no description.

| `function SendCompMessage(aMsg : cardinal) : boolean;`
This item has no description.

| `function CanClose: boolean; virtual;`
This item has no description.

| `procedure Timer_OnTimer(Sender: TObject); virtual;`
This item has no description.

| `constructor Create(AOwner: TComponent); override;`
This item has no description.

| `destructor Destroy; override;`
This item has no description.

| `procedure AfterConstruction; override;`
This item has no description.

| `procedure Start; virtual;`
Start checking all the CEF subprocesses.

### Properties

| `property Status : TSentinelStatus read GetStatus;`
Status of this component.

| `property ChildProcCount : integer read GetChildProcCount;`
Number of CEF subprocesses.

| `property DelayPerProcMs : cardinal read FDelayPerProcMs write FDelayPerProcMs default CEFSENTINEL_DEFAULT_DELAYPERPROCMS;`
Delay per subprocess in milliseconds. This delay is used to calculate how much time to wait until this component checks the CEF subprocesses again.

| `property MinInitDelayMs : cardinal read FMinInitDelayMs write FMinInitDelayMs default CEFSENTINEL_DEFAULT_MININITDELAYMS;`
Minimum initial delay in milliseconds. This is the minimum time to wait until this component checks the CEF subprocesses again.

| `property FinalDelayMs : cardinal read FFinalDelayMs write FFinalDelayMs default CEFSENTINEL_DEFAULT_FINALDELAYMS;`
Final delay in milliseconds. This is an extra delay to wait after enough CEF subprocesses are closed.

| `property MinChildProcs : integer read FMinChildProcs write FMinChildProcs default CEFSENTINEL_DEFAULT_MINCHILDPROCS;`
Minimum number of CEF subprocesses. When ChildProcCount reaches this value it's considered safe to trigger OnClose.

| `property MaxCheckCount : integer read FMaxCheckCount write FMaxCheckCount default CEFSENTINEL_DEFAULT_MAXCHECKCOUNTS;`
Maximum number of times this component will check the CEF subprocesses.

| `property OnClose : TNotifyEvent read FOnClose write FOnClose;`
Event triggered when enought CEF subprocesses are closed.

Generated by PasDoc 0.17.0.snapshot.