# Class TCustomPermissionHandler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFPermissionHandler

## Declaration

`type TCustomPermissionHandler = class(TCefPermissionHandlerOwn)`

## Description

This item has no description.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedOwn
- TCefPermissionHandlerOwn
- TCustomPermissionHandler

## Overview

### Fields

| `FEvents: Pointer;`

### Methods

| `function OnRequestMediaAccessPermission(const browser: ICefBrowser; const frame: ICefFrame; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefMediaAccessCallback): boolean; override;`
| `function OnShowPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefPermissionPromptCallback): boolean; override;`
| `procedure OnDismissPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; result: TCefPermissionRequestResult); override;`
| `procedure RemoveReferences; override;`
| `constructor Create(const events : IChromiumEvents); reintroduce;`
| `destructor Destroy; override;`

## Description

### Fields

| `FEvents: Pointer;`
This item has no description.

### Methods

| `function OnRequestMediaAccessPermission(const browser: ICefBrowser; const frame: ICefFrame; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefMediaAccessCallback): boolean; override;`

This item has no description. Showing description inherited from ICefPermissionHandler.OnRequestMediaAccessPermission.

Called when a page requests permission to access media.

|requesting_origin| is the URL origin requesting permission.

|requested_permissions| is a combination of values from TCefMediaAccessPermissionTypes that represent the requested permissions.

Return true (1) and call ICefMediaAccessCallback functions either in this function or at a later time to continue or cancel the request.

Return false (0) to proceed with default handling. With Chrome style, default handling will display the permission request UI.

With Alloy style, default handling will deny the request. This function will not be called if the "–enable-media-stream" command-line switch is used to grant all permissions.

| `function OnShowPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefPermissionPromptCallback): boolean; override;`

This item has no description. Showing description inherited from ICefPermissionHandler.OnShowPermissionPrompt.

Called when a page should show a permission prompt. |prompt_id| uniquely identifies the prompt. |requesting_origin| is the URL origin requesting permission. |requested_permissions| is a combination of values from TCefPermissionRequestTypes that represent the requested permissions. Return true (1) and call ICefPermissionPromptCallback.Continue either in this function or at a later time to continue or cancel the request. Return false (0) to proceed with default handling. With Chrome style, default handling will display the permission prompt UI. With Alloy style, default handling is CEF_PERMISSION_RESULT_IGNORE.

| `procedure OnDismissPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; result: TCefPermissionRequestResult); override;`

This item has no description. Showing description inherited from ICefPermissionHandler.OnDismissPermissionPrompt.

Called when a permission prompt handled via OnShowPermissionPrompt is dismissed. |prompt_id| will match the value that was passed to OnShowPermissionPrompt. |result| will be the value passed to ICefPermissionPromptCallback.Continue or CEF_PERMISSION_RESULT_IGNORE if the dialog was dismissed for other reasons such as navigation, browser closure, etc. This function will not be called if OnShowPermissionPrompt returned false (0) for |prompt_id|.

| `procedure RemoveReferences; override;`
This item has no description. Showing description inherited from ICefPermissionHandler.RemoveReferences. Custom procedure to clear all references.

| `constructor Create(const events : IChromiumEvents); reintroduce;`
This item has no description.

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

Generated by PasDoc 0.17.0.snapshot.