# Class TCustomBrowserViewDelegate

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFBrowserViewDelegate

## Declaration

`type TCustomBrowserViewDelegate = class(TCefBrowserViewDelegateOwn)`

## Description

This class handles all the ICefBrowserViewDelegate methods which call the ICefBrowserViewDelegateEvents methods. ICefBrowserViewDelegateEvents will be implemented by the control receiving the ICefBrowserViewDelegate events.

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedOwn
- TCefViewDelegateOwn
- TCefBrowserViewDelegateOwn
- TCustomBrowserViewDelegate

## Overview

### Fields

| `FEvents: Pointer;`

### Methods

| `procedure OnGetPreferredSize(const view: ICefView; var aResult : TCefSize); override;`
| `procedure OnGetMinimumSize(const view: ICefView; var aResult : TCefSize); override;`
| `procedure OnGetMaximumSize(const view: ICefView; var aResult : TCefSize); override;`
| `procedure OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer); override;`
| `procedure OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView); override;`
| `procedure OnChildViewChanged(const view: ICefView; added: boolean; const child: ICefView); override;`
| `procedure OnWindowChanged(const view: ICefView; added: boolean); override;`
| `procedure OnLayoutChanged(const view: ICefView; new_bounds: TCefRect); override;`
| `procedure OnFocus(const view: ICefView); override;`
| `procedure OnBlur(const view: ICefView); override;`
| `procedure OnThemeChanged(const view: ICefView); override;`
| `procedure OnBrowserCreated(const browser_view: ICefBrowserView; const browser: ICefBrowser); override;`
| `procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser); override;`
| `procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); override;`
| `procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); override;`
| `procedure OnGetChromeToolbarType(const browser_view: ICefBrowserView; var aResult: TCefChromeToolbarType); override;`
| `procedure OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean); override;`
| `procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); override;`
| `procedure OnGetBrowserRuntimeStyle(var aResult : TCefRuntimeStyle); override;`
| `procedure OnAllowMoveForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean); override;`
| `procedure OnAllowPictureInPictureWithoutUserActivation(const browser_view: ICefBrowserView; var aResult: boolean); override;`
| `constructor Create(const events: ICefBrowserViewDelegateEvents); reintroduce;`

## Description

### Fields

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

### Methods

| `procedure OnGetPreferredSize(const view: ICefView; var aResult : TCefSize); override;`
ICefViewDelegate

| `procedure OnGetMinimumSize(const view: ICefView; var aResult : TCefSize); override;`
This item has no description. Showing description inherited from TCefViewDelegateOwn.OnGetMinimumSize. Return the minimum size for |view|.

| `procedure OnGetMaximumSize(const view: ICefView; var aResult : TCefSize); override;`
This item has no description. Showing description inherited from TCefViewDelegateOwn.OnGetMaximumSize. Return the maximum size for |view|.

| `procedure OnGetHeightForWidth(const view: ICefView; width: Integer; var aResult: Integer); override;`
This item has no description. Showing description inherited from TCefViewDelegateOwn.OnGetHeightForWidth. Return the height necessary to display |view| with the provided |width|. If not specified the result of get_preferred_size().height will be used by default. Override if |view|'s preferred height depends upon the width (for example, with Labels).

| `procedure OnParentViewChanged(const view: ICefView; added: boolean; const parent: ICefView); override;`

This item has no description. Showing description inherited from TCefViewDelegateOwn.OnParentViewChanged.

Called when the parent of |view| has changed. If |view| is being added to |parent| then |added| will be true (1). If |view| is being removed from |parent| then |added| will be false (0). If |view| is being reparented the remove notification will be sent before the add notification. Do not modify the view hierarchy in this callback.

| `procedure OnChildViewChanged(const view: ICefView; added: boolean; const child: ICefView); override;`

This item has no description. Showing description inherited from TCefViewDelegateOwn.OnChildViewChanged.

Called when a child of |view| has changed. If |child| is being added to |view| then |added| will be true (1). If |child| is being removed from |view| then |added| will be false (0). If |child| is being reparented the remove notification will be sent to the old parent before the add notification is sent to the new parent. Do not modify the view hierarchy in this callback.

| `procedure OnWindowChanged(const view: ICefView; added: boolean); override;`
This item has no description. Showing description inherited from TCefViewDelegateOwn.OnWindowChanged. Called when |view| is added or removed from the ICefWindow.

| `procedure OnLayoutChanged(const view: ICefView; new_bounds: TCefRect); override;`
This item has no description. Showing description inherited from TCefViewDelegateOwn.OnLayoutChanged. Called when the layout of |view| has changed.

| `procedure OnFocus(const view: ICefView); override;`
This item has no description. Showing description inherited from TCefViewDelegateOwn.OnFocus. Called when |view| gains focus.

| `procedure OnBlur(const view: ICefView); override;`
This item has no description. Showing description inherited from TCefViewDelegateOwn.OnBlur. Called when |view| loses focus.

| `procedure OnThemeChanged(const view: ICefView); override;`

This item has no description. Showing description inherited from TCefViewDelegateOwn.OnThemeChanged.

(

Called when the theme for |view| has changed, after the new theme colors have already been applied. Views are notified via the component hierarchy in depth-first reverse order (children before parents).

This will be called in the following cases:

    1. When |view|, or a parent of |view|, is added to a Window.
    2. When the native/OS or Chrome theme changes for the Window that contains
       |view|. See ICefWindowDelegate.OnThemeColorsChanged documentation.
    3. When the client explicitly calls ICefWindow.ThemeChanged on the
       Window that contains |view|.

Optionally use this callback to override the new per-View theme colors by calling ICefView.SetBackgroundColor or the appropriate component- specific function. See ICefWindow.SetThemeColor documentation for how to customize additional Window theme colors.

(

| `procedure OnBrowserCreated(const browser_view: ICefBrowserView; const browser: ICefBrowser); override;`
ICefBrowserViewDelegate

| `procedure OnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser); override;`
This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnBrowserDestroyed. Called when |browser| associated with |browser_view| is destroyed. Release all references to |browser| and do not attempt to execute any functions on |browser| after this callback returns. This function will be called before ICefLifeSpanHandler.OnBeforeClose() is called for |browser|.

| `procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); override;`

This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnGetDelegateForPopupBrowserView.

Called before a new popup BrowserView is created. The popup originated from |browser_view|. |settings| and |client| are the values returned from ICefLifeSpanHandler.OnBeforePopup(). |is_devtools| will be true (1) if the popup will be a DevTools browser. Return the delegate that will be used for the new popup BrowserView.

| `procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); override;`

This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnPopupBrowserViewCreated.

Called after |popup_browser_view| is created. This function will be called after ICefLifeSpanHandler.OnAfterCreated() and OnBrowserCreated() are called for the new popup browser. The popup originated from |browser_view|. |is_devtools| will be true (1) if the popup is a DevTools browser. Optionally add |popup_browser_view| to the views hierarchy yourself and return true (1). Otherwise return false (0) and a default ICefWindow will be created for the popup.

| `procedure OnGetChromeToolbarType(const browser_view: ICefBrowserView; var aResult: TCefChromeToolbarType); override;`
This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnGetChromeToolbarType. Returns the Chrome toolbar type that will be available via ICefBrowserView.GetChromeToolbar(). See that function for related documentation.

| `procedure OnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean); override;`
This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnUseFramelessWindowForPictureInPicture. Return true (1) to create frameless windows for Document picture-in- picture popups. Content in frameless windows should specify draggable regions using "-webkit-app-region: drag" CSS.

| `procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); override;`
This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnGestureCommand. Called when |browser_view| receives a gesture command. Return true (1) to handle (or disable) a |gesture_command| or false (0) to propagate the gesture to the browser for default handling. With Chrome style these commands can also be handled via ICefCommandHandler.OnChromeCommand.

| `procedure OnGetBrowserRuntimeStyle(var aResult : TCefRuntimeStyle); override;`
This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnGetBrowserRuntimeStyle. Optionally change the runtime style for this BrowserView. See TCefRuntimeStyle documentation for details.

| `procedure OnAllowMoveForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean); override;`
This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnAllowMoveForPictureInPicture. Return true (1) to allow the use of JavaScript moveTo/By() and resizeTo/By() (without user activation) with Document picture-in-picture popups.

| `procedure OnAllowPictureInPictureWithoutUserActivation(const browser_view: ICefBrowserView; var aResult: boolean); override;`
This item has no description. Showing description inherited from TCefBrowserViewDelegateOwn.OnAllowPictureInPictureWithoutUserActivation. Return true (1) to allow opening Document picture-in-picture without user activation. Default is false (0) (user activation required).

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

Generated by PasDoc 0.17.0.snapshot.