1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2024-11-24 08:02:15 +02:00
CEF4Delphi/source/uCEFUnresponsiveProcessCallback.pas
Salvador Díaz Fau 36c99d107c Update to CEF 124.3.1
Removed the demos in Delphi_VCL\Extensions
2024-05-01 18:19:19 +02:00

52 lines
1.1 KiB
ObjectPascal

unit uCEFUnresponsiveProcessCallback;
{$IFDEF FPC}
{$MODE OBJFPC}{$H+}
{$ENDIF}
{$I cef.inc}
{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF}
{$MINENUMSIZE 4}
interface
uses
{$IFDEF DELPHI16_UP}
System.Classes, System.SysUtils,
{$ELSE}
Classes, SysUtils,
{$ENDIF}
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes;
type
TCefUnresponsiveProcessCallbackRef = class(TCefBaseRefCountedRef, ICefUnresponsiveProcessCallback)
protected
procedure Wait;
procedure Terminate;
public
class function UnWrap(data: Pointer): ICefUnresponsiveProcessCallback;
end;
implementation
procedure TCefUnresponsiveProcessCallbackRef.Wait;
begin
PCefUnresponsiveProcessCallback(FData)^.wait(PCefUnresponsiveProcessCallback(FData));
end;
procedure TCefUnresponsiveProcessCallbackRef.Terminate;
begin
PCefUnresponsiveProcessCallback(FData)^.terminate(PCefUnresponsiveProcessCallback(FData));
end;
class function TCefUnresponsiveProcessCallbackRef.UnWrap(data: Pointer): ICefUnresponsiveProcessCallback;
begin
if (data <> nil) then
Result := Create(data) as ICefUnresponsiveProcessCallback
else
Result := nil;
end;
end.