# 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

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

### Methods

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

### Properties

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

## Description

### Fields

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

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

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

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

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

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

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

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

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

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

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

### Methods

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

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

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

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

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

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

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

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

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

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

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

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

### Properties

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

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

Published | `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.

Published | `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.

Published | `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.

Published | `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.

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

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

Generated by PasDoc 1.0.4.