CEF4Delphi/source/uCEFMediaAccessCallback.pas
salvadordf ca8bc9dff4 Added cef4delphi.chm help file
Added the PDS file to extract the HTML Help files using PasDoc
Added more XML documentation
Fixed some XML errors.
Removed the license copy from the pas units.
Updated the LICENSE.md file
2023-08-09 19:38:57 +02:00

51 lines
1.1 KiB
ObjectPascal

unit uCEFMediaAccessCallback;
{$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.