cef_permission_handler_t

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

Members

Variables

base
cef_base_ref_counted_t base;

Base structure.

on_dismiss_permission_prompt
void function(cef_permission_handler_t* self, cef_browser_t* browser, ulong prompt_id, cef_permission_request_result_t result) nothrow on_dismiss_permission_prompt;

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

on_request_media_access_permission
int function(cef_permission_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, const(cef_string_t)* requesting_origin, uint requested_permissions, cef_media_access_callback_t* callback) nothrow on_request_media_access_permission;

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 cef_media_access_permission_types_t that represent the requested permissions. Return true (1) and call cef_media_access_callback_t 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 the Chrome runtime, default handling will display the permission request UI. With the Alloy runtime, 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.

on_show_permission_prompt
int function(cef_permission_handler_t* self, cef_browser_t* browser, ulong prompt_id, const(cef_string_t)* requesting_origin, uint requested_permissions, cef_permission_prompt_callback_t* callback) nothrow on_show_permission_prompt;

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 cef_permission_request_types_t that represent the requested permissions. Return true (1) and call cef_permission_prompt_callback_t::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 the Chrome runtime, default handling will display the permission prompt UI. With the Alloy runtime, default handling is CEF_PERMISSION_RESULT_IGNORE.

Meta