2017-09-19 19:18:52 +02:00
|
|
|
unit uCEFGetExtensionResourceCallback;
|
|
|
|
|
2018-05-12 14:50:54 +02:00
|
|
|
{$IFDEF FPC}
|
|
|
|
{$MODE OBJFPC}{$H+}
|
|
|
|
{$ENDIF}
|
|
|
|
|
2017-09-19 19:18:52 +02:00
|
|
|
{$I cef.inc}
|
|
|
|
|
2022-02-19 18:56:41 +01:00
|
|
|
{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF}
|
|
|
|
{$MINENUMSIZE 4}
|
|
|
|
|
2017-09-19 19:18:52 +02:00
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes;
|
|
|
|
|
|
|
|
type
|
|
|
|
TCefGetExtensionResourceCallbackRef = class(TCefBaseRefCountedRef, ICefGetExtensionResourceCallback)
|
|
|
|
protected
|
|
|
|
procedure Cont(const stream: ICefStreamReader);
|
|
|
|
procedure Cancel;
|
|
|
|
|
|
|
|
public
|
|
|
|
class function UnWrap(data: Pointer): ICefGetExtensionResourceCallback;
|
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
uses
|
|
|
|
uCEFMiscFunctions;
|
|
|
|
|
|
|
|
procedure TCefGetExtensionResourceCallbackRef.Cont(const stream: ICefStreamReader);
|
|
|
|
begin
|
2018-05-12 14:50:54 +02:00
|
|
|
PCefGetExtensionResourceCallback(FData)^.cont(FData, CefGetData(stream));
|
2017-09-19 19:18:52 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TCefGetExtensionResourceCallbackRef.Cancel;
|
|
|
|
begin
|
2018-05-12 14:50:54 +02:00
|
|
|
PCefGetExtensionResourceCallback(FData)^.cancel(FData);
|
2017-09-19 19:18:52 +02:00
|
|
|
end;
|
|
|
|
|
|
|
|
class function TCefGetExtensionResourceCallbackRef.UnWrap(data: Pointer): ICefGetExtensionResourceCallback;
|
|
|
|
begin
|
|
|
|
if (data <> nil) then
|
|
|
|
Result := Create(data) as ICefGetExtensionResourceCallback
|
|
|
|
else
|
|
|
|
Result := nil;
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|