# Class TCEFBrowserViewComponent

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFBrowserViewComponent

## Declaration

`type TCEFBrowserViewComponent = class(TCEFViewComponent, ICefBrowserViewDelegateEvents)`

## Description

Component hosting a ICefBrowserView instance.

## Hierarchy

- TObject
- TPersistent
- TComponent
- TCEFViewComponent
- TCEFBrowserViewComponent

## Overview

### Fields

Protected | `FBrowserView: ICefBrowserView;`
Protected | `FBrowserViewDlg: ICefBrowserViewDelegate;`
Protected | `FOnBrowserCreated: TOnBrowserCreatedEvent;`
Protected | `FOnBrowserDestroyed: TOnBrowserDestroyedEvent;`
Protected | `FOnGetDelegateForPopupBrowserView: TOnGetDelegateForPopupBrowserViewEvent;`
Protected | `FOnPopupBrowserViewCreated: TOnPopupBrowserViewCreatedEvent;`
Protected | `FOnGetChromeToolbarType: TOnGetChromeToolbarTypeEvent;`
Protected | `FOnUseFramelessWindowForPictureInPicture: TOnUseFramelessWindowForPictureInPicture;`
Protected | `FOnGestureCommand: TOnGestureCommandEvent;`
Protected | `FOnGetBrowserRuntimeStyle: TOnGetBrowserRuntimeStyleEvent;`
Protected | `FOnAllowMoveForPictureInPicture: TOnAllowMoveForPictureInPictureEvent;`
Protected | `FOnAllowPictureInPictureWithoutUserActivation: TOnAllowPictureInPictureWithoutUserActivationEvent;`

### Methods

Protected | `procedure DestroyView; override;`
Protected | `procedure Initialize; override;`
Protected | `function GetInitialized: boolean; override;`
Protected | `function GetAsView: ICefView; override;`
Protected | `function GetAsBrowserView: ICefBrowserView; override;`
Protected | `function GetBrowser: ICefBrowser;`
Protected | `function GetChromeToolbar: ICefView;`
Protected | `function GetRuntimeStyle: TCefRuntimeStyle;`
Protected | `procedure doOnBrowserCreated(const browser_view: ICefBrowserView; const browser: ICefBrowser);`
Protected | `procedure doOnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser);`
Protected | `procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);`
Protected | `procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);`
Protected | `procedure doOnGetChromeToolbarType(const browser_view: ICefBrowserView; var aChromeToolbarType: TCefChromeToolbarType);`
Protected | `procedure doOnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);`
Protected | `procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);`
Protected | `procedure doOnGetBrowserRuntimeStyle(var aResult : TCefRuntimeStyle);`
Protected | `procedure doOnAllowMoveForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);`
Protected | `procedure doOnAllowPictureInPictureWithoutUserActivation(const browser_view: ICefBrowserView; var aResult: boolean);`
Public | `function CreateBrowserView(const client: ICefClient; const url: ustring; const settings: TCefBrowserSettings; const extra_info: ICefDictionaryValue; const request_context: ICefRequestContext): boolean;`
Public | `function GetForBrowser(const browser: ICefBrowser): boolean;`
Public | `procedure SetPreferAccelerators(prefer_accelerators: boolean);`

### Properties

Public | `property Browser : ICefBrowser read GetBrowser;`
Public | `property BrowserView : ICefBrowserView read FBrowserView;`
Public | `property ChromeToolbar : ICefView read GetChromeToolbar;`
Public | `property RuntimeStyle : TCefRuntimeStyle read GetRuntimeStyle;`
Published | `property OnBrowserCreated : TOnBrowserCreatedEvent read FOnBrowserCreated write FOnBrowserCreated;`
Published | `property OnBrowserDestroyed : TOnBrowserDestroyedEvent read FOnBrowserDestroyed write FOnBrowserDestroyed;`
Published | `property OnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent read FOnGetDelegateForPopupBrowserView write FOnGetDelegateForPopupBrowserView;`
Published | `property OnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent read FOnPopupBrowserViewCreated write FOnPopupBrowserViewCreated;`
Published | `property OnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent read FOnGetChromeToolbarType write FOnGetChromeToolbarType;`
Published | `property OnUseFramelessWindowForPictureInPicture : TOnUseFramelessWindowForPictureInPicture read FOnUseFramelessWindowForPictureInPicture write FOnUseFramelessWindowForPictureInPicture;`
Published | `property OnGestureCommand : TOnGestureCommandEvent read FOnGestureCommand write FOnGestureCommand;`
Published | `property OnGetBrowserRuntimeStyle : TOnGetBrowserRuntimeStyleEvent read FOnGetBrowserRuntimeStyle write FOnGetBrowserRuntimeStyle;`
Published | `property OnAllowMoveForPictureInPicture : TOnAllowMoveForPictureInPictureEvent read FOnAllowMoveForPictureInPicture write FOnAllowMoveForPictureInPicture;`
Published | `property OnAllowPictureInPictureWithoutUserActivation : TOnAllowPictureInPictureWithoutUserActivationEvent read FOnAllowPictureInPictureWithoutUserActivation write FOnAllowPictureInPictureWithoutUserActivation;`

## Description

### Fields

Protected | `FBrowserView: ICefBrowserView;`
This item has no description.

Protected | `FBrowserViewDlg: ICefBrowserViewDelegate;`
This item has no description.

Protected | `FOnBrowserCreated: TOnBrowserCreatedEvent;`
ICefBrowserViewDelegateEvents

Protected | `FOnBrowserDestroyed: TOnBrowserDestroyedEvent;`
This item has no description.

Protected | `FOnGetDelegateForPopupBrowserView: TOnGetDelegateForPopupBrowserViewEvent;`
This item has no description.

Protected | `FOnPopupBrowserViewCreated: TOnPopupBrowserViewCreatedEvent;`
This item has no description.

Protected | `FOnGetChromeToolbarType: TOnGetChromeToolbarTypeEvent;`
This item has no description.

Protected | `FOnUseFramelessWindowForPictureInPicture: TOnUseFramelessWindowForPictureInPicture;`
This item has no description.

Protected | `FOnGestureCommand: TOnGestureCommandEvent;`
This item has no description.

Protected | `FOnGetBrowserRuntimeStyle: TOnGetBrowserRuntimeStyleEvent;`
This item has no description.

Protected | `FOnAllowMoveForPictureInPicture: TOnAllowMoveForPictureInPictureEvent;`
This item has no description.

Protected | `FOnAllowPictureInPictureWithoutUserActivation: TOnAllowPictureInPictureWithoutUserActivationEvent;`
This item has no description.

### Methods

Protected | `procedure DestroyView; override;`
This item has no description.

Protected | `procedure Initialize; override;`
This item has no description.

Protected | `function GetInitialized: boolean; override;`
This item has no description.

Protected | `function GetAsView: ICefView; override;`
This item has no description.

Protected | `function GetAsBrowserView: ICefBrowserView; override;`
This item has no description.

Protected | `function GetBrowser: ICefBrowser;`
This item has no description.

Protected | `function GetChromeToolbar: ICefView;`
This item has no description.

Protected | `function GetRuntimeStyle: TCefRuntimeStyle;`
This item has no description.

Protected | `procedure doOnBrowserCreated(const browser_view: ICefBrowserView; const browser: ICefBrowser);`
ICefBrowserViewDelegateEvents

Protected | `procedure doOnBrowserDestroyed(const browser_view: ICefBrowserView; const browser: ICefBrowser);`
This item has no description.

Protected | `procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);`
This item has no description.

Protected | `procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);`
This item has no description.

Protected | `procedure doOnGetChromeToolbarType(const browser_view: ICefBrowserView; var aChromeToolbarType: TCefChromeToolbarType);`
This item has no description.

Protected | `procedure doOnUseFramelessWindowForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);`
This item has no description.

Protected | `procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);`
This item has no description.

Protected | `procedure doOnGetBrowserRuntimeStyle(var aResult : TCefRuntimeStyle);`
This item has no description.

Protected | `procedure doOnAllowMoveForPictureInPicture(const browser_view: ICefBrowserView; var aResult: boolean);`
This item has no description.

Protected | `procedure doOnAllowPictureInPictureWithoutUserActivation(const browser_view: ICefBrowserView; var aResult: boolean);`
This item has no description.

Public | `function CreateBrowserView(const client: ICefClient; const url: ustring; const settings: TCefBrowserSettings; const extra_info: ICefDictionaryValue; const request_context: ICefRequestContext): boolean;`
Create a new ICefBrowserView. The underlying ICefBrowser will not be created until this view is added to the views hierarchy. The optional |extra_info| parameter provides an opportunity to specify extra information specific to the created browser that will be passed to ICefRenderProcessHandler.OnBrowserCreated in the render process.

Public | `function GetForBrowser(const browser: ICefBrowser): boolean;`
Updates the internal ICefBrowserView with the ICefBrowserView associated with |browser|.

Public | `procedure SetPreferAccelerators(prefer_accelerators: boolean);`
Sets whether normal priority accelerators are first forwarded to the web content (`keydown` event handler) or ICefKeyboardHandler. Normal priority accelerators can be registered via ICefWindow.SetAccelerator (with |high_priority|=false) or internally for standard accelerators supported by Chrome style. If |prefer_accelerators| is true then the matching accelerator will be triggered immediately (calling ICefWindowDelegate.OnAccelerator or ICefCommandHandler.OnChromeCommand respectively) and the event will not be forwarded to the web content or ICefKeyboardHandler first. If |prefer_accelerators| is false then the matching accelerator will only be triggered if the event is not handled by web content (`keydown` event handler that calls `event.preventDefault()`) or by ICefKeyboardHandler. The default value is false.

### Properties

Public | `property Browser : ICefBrowser read GetBrowser;`
Returns the ICefBrowser hosted by this BrowserView. Will return NULL if the browser has not yet been created or has already been destroyed.

Public | `property BrowserView : ICefBrowserView read FBrowserView;`
ICefBrowserView assiciated to this component.

Public | `property ChromeToolbar : ICefView read GetChromeToolbar;`
Returns the Chrome toolbar associated with this BrowserView. Only supported when using Chrome style. The ICefBrowserViewDelegate.GetChromeToolbarType function must return a value other than CEF_CTT_NONE and the toolbar will not be available until after this BrowserView is added to a ICefWindow and ICefViewDelegate.OnWindowChanged() has been called.

Public | `property RuntimeStyle : TCefRuntimeStyle read GetRuntimeStyle;`
Returns the runtime style for this BrowserView (ALLOY or CHROME). See TCefRuntimeStyle documentation for details.

Published | `property OnBrowserCreated : TOnBrowserCreatedEvent read FOnBrowserCreated write FOnBrowserCreated;`
Called when |browser| associated with |browser_view| is created. This function will be called after ICefLifeSpanHandler.OnAfterCreated() is called for |browser| and before OnPopupBrowserViewCreated() is called for |browser|'s parent delegate if |browser| is a popup.

Published | `property OnBrowserDestroyed : TOnBrowserDestroyedEvent read FOnBrowserDestroyed write FOnBrowserDestroyed;`
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|.

Published | `property OnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent read FOnGetDelegateForPopupBrowserView write FOnGetDelegateForPopupBrowserView;`
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.

Published | `property OnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent read FOnPopupBrowserViewCreated write FOnPopupBrowserViewCreated;`
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.

Published | `property OnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent read FOnGetChromeToolbarType write FOnGetChromeToolbarType;`
Returns the Chrome toolbar type that will be available via ICefBrowserView.GetChromeToolbar(). See that function for related documentation.

Published | `property OnUseFramelessWindowForPictureInPicture : TOnUseFramelessWindowForPictureInPicture read FOnUseFramelessWindowForPictureInPicture write FOnUseFramelessWindowForPictureInPicture;`
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.

Published | `property OnGestureCommand : TOnGestureCommandEvent read FOnGestureCommand write FOnGestureCommand;`
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.

Published | `property OnGetBrowserRuntimeStyle : TOnGetBrowserRuntimeStyleEvent read FOnGetBrowserRuntimeStyle write FOnGetBrowserRuntimeStyle;`
Optionally change the runtime style for this BrowserView. See TCefRuntimeStyle documentation for details.

Published | `property OnAllowMoveForPictureInPicture : TOnAllowMoveForPictureInPictureEvent read FOnAllowMoveForPictureInPicture write FOnAllowMoveForPictureInPicture;`
Return true (1) to allow the use of JavaScript moveTo/By() and resizeTo/By() (without user activation) with Document picture-in-picture popups.

Published | `property OnAllowPictureInPictureWithoutUserActivation : TOnAllowPictureInPictureWithoutUserActivationEvent read FOnAllowPictureInPictureWithoutUserActivation write FOnAllowPictureInPictureWithoutUserActivation;`
Return true (1) to allow opening Document picture-in-picture without user activation. Default is false (0) (user activation required).

Generated by PasDoc 1.0.4.