# Interface ICefPermissionHandler

Description
Hierarchy
Methods

## Unit

uCEFInterfaces

## Declaration

`type ICefPermissionHandler = interface(ICefBaseRefCounted)`

## Description

Implement this interface to handle events related to permission requests. The functions of this interface will be called on the browser process UI thread.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_permission_handler_capi.h">CEF source file: /include/capi/cef_permission_handler_capi.h (cef_permission_handler_t))

## Hierarchy

- IInterface
- ICefBaseRefCounted
- ICefPermissionHandler

## Overview

### Methods

Public | `function OnRequestMediaAccessPermission(const browser: ICefBrowser; const frame: ICefFrame; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefMediaAccessCallback): boolean;`
Public | `function OnShowPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefPermissionPromptCallback): boolean;`
Public | `procedure OnDismissPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; result: TCefPermissionRequestResult);`
Public | `procedure RemoveReferences;`

## Description

### Methods

Public | `function OnRequestMediaAccessPermission(const browser: ICefBrowser; const frame: ICefFrame; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefMediaAccessCallback): boolean;`
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. ###### Attributes GUID['{DC079268-FB08-44DA-B216-35C5C339B341}']

Public | `function OnShowPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; const requesting_origin: ustring; requested_permissions: cardinal; const callback: ICefPermissionPromptCallback): boolean;`
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.

Public | `procedure OnDismissPermissionPrompt(const browser: ICefBrowser; prompt_id: uint64; result: TCefPermissionRequestResult);`
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|.

Public | `procedure RemoveReferences;`
Custom procedure to clear all references.

Generated by PasDoc 1.0.4.