# Interface ICefCommandHandler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFInterfaces

## Declaration

`type ICefCommandHandler = interface(ICefBaseRefCounted)`

## Description

Implement this interface to handle events related to commands. The functions of this interface will be called on the UI thread.

UNKNOWN

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

## Hierarchy

- IInterface
- ICefBaseRefCounted
- ICefCommandHandler

## Overview

### Methods

| `function OnChromeCommand(const browser: ICefBrowser; command_id: integer; disposition: TCefWindowOpenDisposition): boolean;`
| `function OnIsChromeAppMenuItemVisible(const browser: ICefBrowser; command_id: integer): boolean;`
| `function OnIsChromeAppMenuItemEnabled(const browser: ICefBrowser; command_id: integer): boolean;`
| `function OnIsChromePageActionIconVisible(icon_type: TCefChromePageActionIconType): boolean;`
| `function OnIsChromeToolbarButtonVisible(button_type: TCefChromeToolbarButtonType): boolean;`
| `procedure RemoveReferences;`

## Description

### Methods

| `function OnChromeCommand(const browser: ICefBrowser; command_id: integer; disposition: TCefWindowOpenDisposition): boolean;`
Called to execute a Chrome command triggered via menu selection or keyboard shortcut. Values for |command_id| can be found in the cef_command_ids.h file. |disposition| provides information about the intended command target. Return true (1) if the command was handled or false (0) for the default implementation. For context menu commands this will be called after ICefContextMenuHandler.OnContextMenuCommand. Only used with Chrome style. ###### Attributes GUID['{7C931B93-53DC-4607-AABB-2CB4AEF7FB96}']

| `function OnIsChromeAppMenuItemVisible(const browser: ICefBrowser; command_id: integer): boolean;`
Called to check if a Chrome app menu item should be visible. Values for |command_id| can be found in the cef_command_ids.h file. Only called for menu items that would be visible by default. Only used with Chrome style.

| `function OnIsChromeAppMenuItemEnabled(const browser: ICefBrowser; command_id: integer): boolean;`
Called to check if a Chrome app menu item should be enabled. Values for |command_id| can be found in the cef_command_ids.h file. Only called for menu items that would be enabled by default. Only used with Chrome style.

| `function OnIsChromePageActionIconVisible(icon_type: TCefChromePageActionIconType): boolean;`
Called during browser creation to check if a Chrome page action icon should be visible. Only called for icons that would be visible by default. Only used with Chrome style.

| `function OnIsChromeToolbarButtonVisible(button_type: TCefChromeToolbarButtonType): boolean;`
Called during browser creation to check if a Chrome toolbar button should be visible. Only called for buttons that would be visible by default. Only used with Chrome style.

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

Generated by PasDoc 0.16.0-snapshot.