2023-08-09 19:38:57 +02:00
|
|
|
unit uCEFMediaAccessCallback;
|
2022-08-06 12:00:28 +02:00
|
|
|
|
|
|
|
{$IFDEF FPC}
|
|
|
|
{$MODE OBJFPC}{$H+}
|
|
|
|
{$ENDIF}
|
|
|
|
|
|
|
|
{$I cef.inc}
|
|
|
|
|
|
|
|
{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF}
|
|
|
|
{$MINENUMSIZE 4}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes;
|
|
|
|
|
|
|
|
type
|
|
|
|
TCefMediaAccessCallbackRef = class(TCefBaseRefCountedRef, ICefMediaAccessCallback)
|
|
|
|
protected
|
|
|
|
procedure cont(allowed_permissions: TCefMediaAccessPermissionTypes);
|
|
|
|
procedure cancel;
|
|
|
|
|
|
|
|
public
|
|
|
|
class function UnWrap(data: Pointer): ICefMediaAccessCallback;
|
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
uses
|
|
|
|
uCEFMiscFunctions, uCEFLibFunctions;
|
|
|
|
|
|
|
|
procedure TCefMediaAccessCallbackRef.cont(allowed_permissions: TCefMediaAccessPermissionTypes);
|
|
|
|
begin
|
|
|
|
PCefMediaAccessCallback(FData)^.cont(PCefMediaAccessCallback(FData), allowed_permissions);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TCefMediaAccessCallbackRef.cancel;
|
|
|
|
begin
|
|
|
|
PCefMediaAccessCallback(FData)^.cancel(PCefMediaAccessCallback(FData));
|
|
|
|
end;
|
|
|
|
|
|
|
|
class function TCefMediaAccessCallbackRef.UnWrap(data: Pointer): ICefMediaAccessCallback;
|
|
|
|
begin
|
|
|
|
if (data <> nil) then
|
|
|
|
Result := Create(data) as ICefMediaAccessCallback
|
|
|
|
else
|
|
|
|
Result := nil;
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|