-CEF_CHROMEELF_VERSION_BUILD = 101; |
+CEF_CHROMEELF_VERSION_BUILD = 44; |
This item has no description. |
diff --git a/docs/html/uCEFBrowser.TCefBrowserHostRef.html b/docs/html/uCEFBrowser.TCefBrowserHostRef.html
index 690207d2..847a0818 100644
--- a/docs/html/uCEFBrowser.TCefBrowserHostRef.html
+++ b/docs/html/uCEFBrowser.TCefBrowserHostRef.html
@@ -38,273 +38,277 @@
|
-procedure SetFocus(focus: Boolean); |
+function IsReadyToBeClosed: Boolean; |
|
+procedure SetFocus(focus: Boolean); |
+
+
+ |
function GetWindowHandle: TCefWindowHandle; |
-
+
|
function GetOpenerWindowHandle: TCefWindowHandle; |
-
+
|
function HasView: Boolean; |
-
+
|
function GetClient: ICefClient; |
-
+
|
function GetRequestContext: ICefRequestContext; |
-
+
|
function CanZoom(command: TCefZoomCommand): boolean; |
-
+
|
procedure Zoom(command: TCefZoomCommand); |
-
+
|
function GetDefaultZoomLevel: Double; |
-
+
|
function GetZoomLevel: Double; |
-
+
|
procedure SetZoomLevel(const zoomLevel: Double); |
-
+
|
procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefRunFileDialogCallback); |
-
+
|
procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: TCefRunFileDialogCallbackProc); |
-
+
|
procedure StartDownload(const url: ustring); |
-
+
|
procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback); |
-
+
|
procedure DownloadImageProc(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: TOnDownloadImageFinishedProc); |
-
+
|
procedure Print; |
-
+
|
procedure PrintToPdf(const path: ustring; settings: PCefPdfPrintSettings; const callback: ICefPdfPrintCallback); |
-
+
|
procedure PrintToPdfProc(const path: ustring; settings: PCefPdfPrintSettings; const callback: TOnPdfPrintFinishedProc); |
-
+
|
procedure Find(const searchText: ustring; forward_, matchCase, findNext: Boolean); |
-
+
|
procedure StopFinding(clearSelection: Boolean); |
-
+
|
procedure ShowDevTools(const windowInfo: PCefWindowInfo; const client: ICefClient; const settings: PCefBrowserSettings; inspectElementAt: PCefPoint); |
-
+
|
procedure CloseDevTools; |
-
+
|
function HasDevTools: Boolean; |
-
+
|
function SendDevToolsMessage(const message_: ustring): boolean; |
-
+
|
function ExecuteDevToolsMethod(message_id: integer; const method: ustring; const params: ICefDictionaryValue): Integer; |
-
+
|
function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration; |
-
+
|
procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); |
-
+
|
procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); |
-
+
|
procedure ReplaceMisspelling(const word: ustring); |
-
+
|
procedure AddWordToDictionary(const word: ustring); |
-
+
|
function IsWindowRenderingDisabled: Boolean; |
-
+
|
procedure WasResized; |
-
+
|
procedure NotifyScreenInfoChanged; |
-
+
|
procedure WasHidden(hidden: Boolean); |
-
+
|
procedure Invalidate(type_: TCefPaintElementType); |
-
+
|
procedure SendExternalBeginFrame; |
-
+
|
procedure SendKeyEvent(const event: PCefKeyEvent); |
-
+
|
procedure SendMouseClickEvent(const event: PCefMouseEvent; type_: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); |
-
+
|
procedure SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); |
-
+
|
procedure SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); |
-
+
|
procedure SendTouchEvent(const event: PCefTouchEvent); |
-
+
|
procedure SendCaptureLostEvent; |
-
+
|
procedure NotifyMoveOrResizeStarted; |
-
+
|
function GetWindowlessFrameRate: Integer; |
-
+
|
procedure SetWindowlessFrameRate(frameRate: Integer); |
-
+
|
procedure IMESetComposition(const text: ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : PCefRange); |
-
+
|
procedure IMECommitText(const text: ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); |
-
+
|
procedure IMEFinishComposingText(keep_selection : boolean); |
-
+
|
procedure IMECancelComposition; |
-
+
|
procedure DragTargetDragEnter(const dragData: ICefDragData; const event: PCefMouseEvent; allowedOps: TCefDragOperations); |
-
+
|
procedure DragTargetDragOver(const event: PCefMouseEvent; allowedOps: TCefDragOperations); |
-
+
|
procedure DragTargetDragLeave; |
-
+
|
procedure DragTargetDrop(const event: PCefMouseEvent); |
-
+
|
procedure DragSourceEndedAt(x, y: Integer; op: TCefDragOperation); |
-
+
|
procedure DragSourceSystemDragEnded; |
-
+
|
function GetVisibleNavigationEntry: ICefNavigationEntry; |
-
+
|
procedure SetAccessibilityState(accessibilityState: TCefState); |
-
+
|
procedure SetAutoResizeEnabled(enabled: boolean; const min_size, max_size: PCefSize); |
-
+
|
procedure SetAudioMuted(mute: boolean); |
-
+
|
function IsAudioMuted: boolean; |
-
+
|
function IsFullscreen: boolean; |
-
+
|
procedure ExitFullscreen(will_cause_resize: boolean); |
-
+
|
function CanExecuteChromeCommand(command_id: integer): boolean; |
-
+
|
procedure ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition); |
-
+
|
function IsRenderProcessUnresponsive: boolean; |
-
+
|
function GetRuntimeStyle: TCefRuntimeStyle; |
-
+
|
class function UnWrap(data: Pointer): ICefBrowserHost; |
@@ -328,7 +332,13 @@
This item has no description. Showing description inherited from ICefBrowserHost.CloseBrowser.
- Request that the browser close. The JavaScript 'onbeforeunload' event will be fired. If |force_close| is false (0) the event handler, if any, will be allowed to prompt the user and the user can optionally cancel the close. If |force_close| is true (1) the prompt will not be displayed and the close will proceed. Results in a call to ICefLifeSpanHandler.DoClose() if the event handler allows the close or if |force_close| is true (1). See ICefLifeSpanHandler.DoClose() documentation for additional usage information.
+
+
+Request that the browser close. Closing a browser is a multi-stage process that may complete either synchronously or asynchronously, and involves events such as TChromiumCore.OnClose (Alloy style only), TChromiumCore.OnBeforeClose, and a top-level window close handler such as TCEFWindowComponent.OnCanClose (or platform-specific equivalent). In some cases a close request may be delayed or canceled by the user. Using TryCloseBrowser() instead of CloseBrowser() is recommended for most use cases. See TChromiumCore.OnClose documentation for detailed usage and examples.
+
+ If |aForceClose| is false (0) then JavaScript unload handlers, if any, may be fired and the close may be delayed or canceled by the user. If |aForceClose| is true (1) then the user will not be prompted and the close will proceed immediately (possibly asynchronously). If browser close is delayed and not canceled the default behavior is to call the top-level window close handler once the browser is ready to be closed. This default behavior can be changed for Alloy style browsers by implementing TChromiumCore.OnClose. IsReadyToBeClosed() can be used to detect mandatory browser close events when customizing close behavior on the browser process UI thread.
+
+
|
diff --git a/docs/html/uCEFChromiumCore.TChromiumCore.html b/docs/html/uCEFChromiumCore.TChromiumCore.html
index f0da497a..b184ef40 100644
--- a/docs/html/uCEFChromiumCore.TChromiumCore.html
+++ b/docs/html/uCEFChromiumCore.TChromiumCore.html
@@ -2204,501 +2204,505 @@
|
-function SelectBrowser(aID : integer) : boolean; |
+function IsReadyToBeClosed: boolean; |
|
+function SelectBrowser(aID : integer) : boolean; |
+
+
+ |
function IndexOfBrowserID(aID : integer) : integer; |
-
+
|
function ShareRequestContext(var aContext : ICefRequestContext; const aHandler : ICefRequestContextHandler = nil) : boolean; |
-
+
|
procedure InitializeDragAndDrop(const aDropTargetWnd : HWND); |
-
+
|
procedure ShutdownDragAndDrop; |
-
+
|
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean; |
-
+
|
function CreateBrowser(aParentHandle : TCefWindowHandle; aParentRect : TRect; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil; aForceAsPopup : boolean = False) : boolean; overload; virtual; |
-
+
|
function CreateBrowser(const aURL : ustring; const aBrowserViewComp : TCEFBrowserViewComponent; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual; |
-
+
|
procedure LoadURL(const aURL : ustring; const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''); overload; |
-
+
|
procedure LoadURL(const aURL : ustring; const aFrame : ICefFrame); overload; |
-
+
|
procedure LoadString(const aHTML : ustring; const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''); overload; |
-
+
|
procedure LoadString(const aHTML : ustring; const aFrame : ICefFrame); overload; |
-
+
|
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''); overload; |
-
+
|
procedure LoadResource(const aStream : TCustomMemoryStream; const aMimeType, aCharset : string; const aFrame : ICefFrame); overload; |
-
+
|
procedure LoadRequest(const aRequest: ICefRequest); |
-
+
|
procedure GoBack; |
-
+
|
procedure GoForward; |
-
+
|
procedure Reload; |
-
+
|
procedure ReloadIgnoreCache; |
-
+
|
procedure StopLoad; |
-
+
|
procedure StartDownload(const aURL : ustring); |
-
+
|
procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: cardinal; bypassCache: Boolean); |
-
+
|
procedure SimulateMouseWheel(aDeltaX, aDeltaY : integer); |
-
+
|
procedure SimulateKeyEvent(type_: TSimulatedCefKeyEventType; modifiers: integer = CEF_MOUSETOUCH_EVENT_MODIFIERS_NONE; timestamp: single = 0; const text: ustring = ''; const unmodifiedtext: ustring = ''; const keyIdentifier: ustring = ''; const code: ustring = ''; const key: ustring = ''; windowsVirtualKeyCode: integer = 0; nativeVirtualKeyCode: integer = 0; autoRepeat: boolean = False; isKeypad: boolean = False; isSystemKey: boolean = False; location: TCefKeyLocation = CEF_KEYLOCATION_NONE; commands: TCefEditingCommand = ecNone); |
-
+
|
procedure SimulateMouseEvent(type_: TCefSimulatedMouseEventType; x, y: single; modifiers: integer = CEF_MOUSETOUCH_EVENT_MODIFIERS_NONE; timestamp: single = 0; button: TCefSimulatedMouseButton = CEF_SIMULATEDMOUSEBUTTON_NONE; buttons: integer = CEF_PRESSED_MOUSE_BUTTONS_NONE; clickCount: integer = 0; force: single = 0; tangentialPressure: single = 0; tiltX: single = 0; tiltY: single = 0; twist: integer = 0; deltaX: single = 0; deltaY: single = 0; pointerType: TCefSimulatedPointerType = CEF_SIMULATEDPOINTERTYPE_MOUSE); |
-
+
|
procedure SimulateTouchEvent(type_: TCefSimulatedTouchEventType; var touchPoints: TCefSimulatedTouchPointArray; modifiers: integer = CEF_MOUSETOUCH_EVENT_MODIFIERS_NONE; timestamp: single = 0); |
-
+
|
procedure SimulateEditingCommand(command : TCefEditingCommand); |
-
+
|
function ClearCertificateExceptions(aClearImmediately : boolean = True) : boolean; |
-
+
|
function ClearHttpAuthCredentials(aClearImmediately : boolean = True) : boolean; |
-
+
|
function CloseAllConnections(aCloseImmediately : boolean = True) : boolean; |
-
+
|
procedure RetrieveHTML(const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''); overload; |
-
+
|
procedure RetrieveHTML(const aFrame : ICefFrame); overload; |
-
+
|
procedure RetrieveText(const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''); overload; |
-
+
|
procedure RetrieveText(const aFrame : ICefFrame); overload; |
-
+
|
procedure GetNavigationEntries(currentOnly: Boolean); |
-
+
|
function GetFrameNames(var aFrameNames : TStrings) : boolean; |
-
+
|
function GetFrameIdentifiers(var aFrameIdentifiers : TStrings) : boolean; |
-
+
|
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''; aStartLine : integer = 0); overload; |
-
+
|
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrame : ICefFrame; aStartLine : integer = 0); overload; |
-
+
|
procedure UpdatePreferences; |
-
+
|
procedure SavePreferences(const aFileName : string); |
-
+
|
procedure ResolveHost(const aURL : ustring); |
-
+
|
function IsSameBrowser(const aBrowser : ICefBrowser) : boolean; |
-
+
|
function ExecuteTaskOnCefThread(aCefThreadId : TCefThreadId; aTaskID : cardinal; aDelayMs : Int64 = 0) : boolean; |
-
+
|
procedure SetUserAgentOverride(const aUserAgent : ustring; const aAcceptLanguage : ustring = ''; const aPlatform : ustring = ''); |
-
+
|
procedure ClearDataForOrigin(const aOrigin : ustring; aStorageTypes : TCefClearDataStorageTypes = cdstAll); |
-
+
|
procedure ClearCache; |
-
+
|
procedure ToggleAudioMuted; |
-
+
|
function DeleteCookies(const url : ustring = ''; const cookieName : ustring = ''; aDeleteImmediately : boolean = False) : boolean; |
-
+
|
function VisitAllCookies(aID : integer = 0) : boolean; |
-
+
|
function VisitURLCookies(const url : ustring; includeHttpOnly : boolean = False; aID : integer = 0) : boolean; |
-
+
|
function SetCookie(const url, name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; same_site : TCefCookieSameSite; priority : TCefCookiePriority; aSetImmediately : boolean = True; aID : integer = 0): Boolean; |
-
+
|
function FlushCookieStore(aFlushImmediately : boolean = True) : boolean; |
-
+
|
procedure ShowDevTools(const inspectElementAt: TPoint; aWindowInfo: PCefWindowInfo); |
-
+
|
procedure CloseDevTools; overload; |
-
+
|
procedure CloseDevTools(const aDevToolsWnd : TCefWindowHandle); overload; |
-
+
|
function SendDevToolsMessage(const message_: ustring): boolean; |
-
+
|
function ExecuteDevToolsMethod(message_id: integer; const method: ustring; const params: ICefDictionaryValue): Integer; |
-
+
|
function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration; |
-
+
|
procedure Find(const aSearchText : ustring; aForward, aMatchCase, aFindNext : Boolean); |
-
+
|
procedure StopFinding(aClearSelection : Boolean); |
-
+
|
procedure Print; |
-
+
|
procedure PrintToPDF(const aFilePath : ustring); |
-
+
|
procedure ClipboardCopy; |
-
+
|
procedure ClipboardPaste; |
-
+
|
procedure ClipboardCut; |
-
+
|
procedure ClipboardUndo; |
-
+
|
procedure ClipboardRedo; |
-
+
|
procedure ClipboardDel; |
-
+
|
procedure SelectAll; |
-
+
|
procedure IncZoomStep; |
-
+
|
procedure DecZoomStep; |
-
+
|
procedure IncZoomPct; |
-
+
|
procedure DecZoomPct; |
-
+
|
procedure ResetZoomStep; |
-
+
|
procedure ResetZoomLevel; |
-
+
|
procedure ResetZoomPct; |
-
+
|
procedure ReadZoom; |
-
+
|
procedure IncZoomCommand; |
-
+
|
procedure DecZoomCommand; |
-
+
|
procedure ResetZoomCommand; |
-
+
|
procedure WasResized; |
-
+
|
procedure WasHidden(hidden: Boolean); |
-
+
|
procedure NotifyScreenInfoChanged; |
-
+
|
procedure NotifyMoveOrResizeStarted; |
-
+
|
procedure Invalidate(type_: TCefPaintElementType = PET_VIEW); |
-
+
|
procedure ExitFullscreen(will_cause_resize: boolean); |
-
+
|
function CanExecuteChromeCommand(command_id: integer): boolean; |
-
+
|
procedure ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition); |
-
+
|
procedure SendExternalBeginFrame; |
-
+
|
procedure SendKeyEvent(const event: PCefKeyEvent); |
-
+
|
procedure SendMouseClickEvent(const event: PCefMouseEvent; type_: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); |
-
+
|
procedure SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); |
-
+
|
procedure SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); |
-
+
|
procedure SendTouchEvent(const event: PCefTouchEvent); |
-
+
|
procedure SendCaptureLostEvent; |
-
+
|
procedure SendProcessMessage(targetProcess: TCefProcessId; const ProcMessage: ICefProcessMessage; const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''); overload; |
-
+
|
procedure SendProcessMessage(targetProcess: TCefProcessId; const ProcMessage: ICefProcessMessage; const aFrame : ICefFrame); overload; |
-
+
|
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrameName : ustring = ''; const aFrameIdentifier : ustring = ''): ICefUrlRequest; overload; |
-
+
|
function CreateUrlRequest(const request: ICefRequest; const client: ICefUrlrequestClient; const aFrame : ICefFrame): ICefUrlRequest; overload; |
-
+
|
procedure SetFocus(focus: Boolean); |
-
+
|
procedure SetAccessibilityState(accessibilityState: TCefState); |
-
+
|
procedure DragTargetDragEnter(const dragData: ICefDragData; const event: PCefMouseEvent; allowedOps: TCefDragOperations); |
-
+
|
procedure DragTargetDragOver(const event: PCefMouseEvent; allowedOps: TCefDragOperations); |
-
+
|
procedure DragTargetDragLeave; |
-
+
|
procedure DragTargetDrop(const event: PCefMouseEvent); |
-
+
|
procedure DragSourceEndedAt(x, y: Integer; op: TCefDragOperation); |
-
+
|
procedure DragSourceSystemDragEnded; |
-
+
|
procedure IMESetComposition(const text: ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : PCefRange); |
-
+
|
procedure IMECommitText(const text: ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); |
-
+
|
procedure IMEFinishComposingText(keep_selection : boolean); |
-
+
|
procedure IMECancelComposition; |
-
+
|
procedure ReplaceMisspelling(const aWord : ustring); |
-
+
|
procedure AddWordToDictionary(const aWord : ustring); |
-
+
|
function AddObserver(const observer: ICefMediaObserver): ICefRegistration; |
-
+
|
function GetSource(const urn: ustring): ICefMediaSource; |
-
+
|
procedure NotifyCurrentSinks; |
-
+
|
procedure NotifyCurrentRoutes; |
-
+
|
procedure CreateRoute(const source: ICefMediaSource; const sink: ICefMediaSink); |
-
+
|
procedure GetDeviceInfo(const aMediaSink: ICefMediaSink); |
-
+
|
function GetWebsiteSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes): ICefValue; |
-
+
|
procedure SetWebsiteSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes; const value: ICefValue); |
-
+
|
function GetContentSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes): TCefContentSettingValues; |
-
+
|
procedure SetContentSetting(const requesting_url, top_level_url: ustring; content_type: TCefContentSettingTypes; value: TCefContentSettingValues); |
-
+
|
procedure SetChromeColorScheme(variant: TCefColorVariant; user_color: TCefColor); |
@@ -8084,7 +8088,13 @@ Custom
- Request that the browser close. The JavaScript 'onbeforeunload' event will be fired. If |aForceClose| is false (0) the event handler, if any, will be allowed to prompt the user and the user can optionally cancel the close. If |aForceClose| is true (1) the prompt will not be displayed and the close will proceed. Results in a call to ICefLifeSpanHandler.DoClose() if the event handler allows the close or if |aForceClose| is true (1). See ICefLifeSpanHandler.DoClose() documentation for additional usage information.
+
+
+Request that the browser close. Closing a browser is a multi-stage process that may complete either synchronously or asynchronously, and involves events such as TChromiumCore.OnClose (Alloy style only), TChromiumCore.OnBeforeClose, and a top-level window close handler such as TCEFWindowComponent.OnCanClose (or platform-specific equivalent). In some cases a close request may be delayed or canceled by the user. Using TryCloseBrowser() instead of CloseBrowser() is recommended for most use cases. See TChromiumCore.OnClose documentation for detailed usage and examples.
+
+ If |aForceClose| is false (0) then JavaScript unload handlers, if any, may be fired and the close may be delayed or canceled by the user. If |aForceClose| is true (1) then the user will not be prompted and the close will proceed immediately (possibly asynchronously). If browser close is delayed and not canceled the default behavior is to call the top-level window close handler once the browser is ready to be closed. This default behavior can be changed for Alloy style browsers by implementing TChromiumCore.OnClose. IsReadyToBeClosed() can be used to detect mandatory browser close events when customizing close behavior on the browser process UI thread.
+
+
|
@@ -11643,21 +11663,21 @@ Custom
-
Called when a browser has recieved a request to close. This may result directly from a call to ICefBrowserHost.*CloseBrowser or indirectly if the browser is parented to a top-level window created by CEF and the user attempts to close that window (by clicking the 'X', for example). The OnClose function will be called after the JavaScript 'onunload' event has been fired.
+
Called when an Alloy style browser is ready to be closed, meaning that the close has already been initiated and that JavaScript unload handlers have already executed or should be ignored. This may result directly from a call to TChromiumCore.[Try]CloseBrowser() or indirectly if the browser's top-level parent window was created by CEF and the user attempts to close that window (by clicking the 'X', for example). TChromiumCore.OnClose will not be called if the browser's host window/view has already been destroyed (via parent window/view hierarchy tear-down, for example), as it is no longer possible to customize the close behavior at that point.
-
An application should handle top-level owner window close notifications by calling ICefBrowserHost.TryCloseBrowser or ICefBrowserHost.CloseBrowser(false) instead of allowing the window to close immediately (see the examples below). This gives CEF an opportunity to process the 'onbeforeunload' event and optionally cancel the close before OnClose is called.
+
An application should handle top-level parent window close notifications by calling TChromiumCore.TryCloseBrowser() or TChromiumCore.CloseBrowser(false) instead of allowing the window to close immediately (see the examples below). This gives CEF an opportunity to process JavaScript unload handlers and optionally cancel the close before TChromiumCore.OnClose is called.
-
When windowed rendering is enabled CEF will internally create a window or view to host the browser. In that case returning false (0) from OnClose() will send the standard close notification to the browser's top-level owner window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on Linux or ICefWindowDelegate.CanClose callback from Views). If the browser's host window/view has already been destroyed (via view hierarchy tear-down, for example) then OnClose() will not be called for that browser since is no longer possible to cancel the close.
+
When windowed rendering is enabled CEF will create an internal child window/view to host the browser. In that case returning false (0) from TChromiumCore.OnClose will send the standard close notification to the browser's top- level parent window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on Linux or TCEFWindowComponent.OnCanClose callback from Views).
-
When windowed rendering is disabled returning false (0) from OnClose() will cause the browser object to be destroyed immediately.
+
When windowed rendering is disabled there is no internal window/view and returning false (0) from TChromiumCore.OnClose will cause the browser object to be destroyed immediately.
-
If the browser's top-level owner window requires a non-standard close notification then send that notification from OnClose() and return true.
+
If the browser's top-level parent window requires a non-standard close notification then send that notification from TChromiumCore.OnClose and return true (1). You are still required to complete the browser close as soon as possible (either by calling TChromiumCore.[Try]CloseBrowser() or by proceeding with window/view hierarchy tear-down), otherwise the browser will be left in a partially closed state that interferes with proper functioning. Top-level windows created on the browser process UI thread can alternately call TChromiumCore.IsReadyToBeClosed() in the close handler to check close status instead of relying on custom TChromiumCore.OnClose handling. See documentation on that function for additional details.
-
The ICefLifeSpanHandler.OnBeforeClose function will be called after OnClose() (if OnClose() is called) and immediately before the browser object is destroyed. The application should only exit after OnBeforeClose() has been called for all existing browsers.
+
The TChromiumCore.OnBeforeClose event will be called after TChromiumCore.OnClose (if TChromiumCore.OnClose is called) and immediately before the browser object is destroyed. The application should only exit after TChromiumCore.OnBeforeClose has been called for all existing browsers.
The below examples describe what should happen during window close when the browser is parented to an application-provided top-level window.
-
Example 1: Using ICefBrowserHost.TryCloseBrowser(). This is recommended for clients using standard close handling and windows created on the browser process UI thread.
+
Example 1: Using TChromiumCore.TryCloseBrowser(). This is recommended for clients using standard close handling and windows created on the browser process UI thread.
@@ -11665,26 +11685,30 @@ Custom
1. User clicks the window close button which sends a close notification
to the application's top-level window.
2. Application's top-level window receives the close notification and
- calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
- TryCloseBrowser() returns false so the client cancels the window
+ calls TChromiumCore.TryCloseBrowser() (similar to calling TChromiumCore.CloseBrowser(false)).
+ TChromiumCore.TryCloseBrowser() returns false so the client cancels the window
close.
3. JavaScript 'onbeforeunload' handler executes and shows the close
- confirmation dialog (which can be overridden via
- ICefJSDialogHandler.OnBeforeUnloadDialog()).
+ confirmation dialog (which can be overridden via TChromiumCore.OnBeforeUnloadDialog).
4. User approves the close.
5. JavaScript 'onunload' handler executes.
-6. CEF sends a close notification to the application's top-level window
- (because OnClose() returned false by default).
-7. Application's top-level window receives the close notification and
+6. Application's TChromiumCore.OnClose handler is called and returns false (0) by
+ default.
+7. CEF sends a close notification to the application's top-level window
+ (because TChromiumCore.OnClose returned false).
+8. Application's top-level window receives the close notification and
calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
allows the window close.
-8. Application's top-level window is destroyed.
-9. Application's OnBeforeClose() handler is called and the browser object is destroyed.
-10. Application exits by calling cef_quit_message_loop() if no other browsers exist.
+9. Application's top-level window is destroyed, triggering destruction
+ of the child browser window.
+10. Application's TChromiumCore.OnBeforeClose handler is called and the browser object
+ is destroyed.
+11. Application exits by calling TCefApplicationCore.QuitMessageLoop if no other browsers
+ exist.
-
Example 2: Using ICefBrowserHost::CloseBrowser(false) and implementing the OnClose() callback. This is recommended for clients using non-standard close handling or windows that were not created on the browser process UI thread.
+
Example 2: Using TChromiumCore.CloseBrowser(false) and implementing the TChromiumCore.OnClose event. This is recommended for clients using non-standard close handling or windows that were not created on the browser process UI thread.
@@ -11695,19 +11719,22 @@ Custom
A. Calls ICefBrowserHost.CloseBrowser(false).
B. Cancels the window close.
3. JavaScript 'onbeforeunload' handler executes and shows the close
- confirmation dialog (which can be overridden via
- ICefJSDialogHandler.OnBeforeUnloadDialog()).
+ confirmation dialog (which can be overridden via TChromiumCore.OnBeforeUnloadDialog).
4. User approves the close.
5. JavaScript 'onunload' handler executes.
-6. Application's OnClose() handler is called. Application will:
- A. Set a flag to indicate that the next close attempt will be allowed.
+6. Application's TChromiumCore.OnClose handler is called. Application will:
+ A. Set a flag to indicate that the next top-level window close attempt
+ will be allowed.
B. Return false.
-7. CEF sends an close notification to the application's top-level window.
+7. CEF sends a close notification to the application's top-level window
+ (because TChromiumCore.OnClose returned false).
8. Application's top-level window receives the close notification and
- allows the window to close based on the flag from #6B.
-9. Application's top-level window is destroyed.
-10. Application's OnBeforeClose() handler is called and the browser object is destroyed.
-11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
+ allows the window to close based on the flag from #6A.
+9. Application's top-level window is destroyed, triggering destruction
+ of the child browser window.
+10. Application's TChromiumCore.OnBeforeClose handler is called and the browser object
+ is destroyed.
+11. Application exits by calling TCefApplicationCore.QuitMessageLoop if no other browsers exist.
@@ -11729,7 +11756,7 @@ Custom
Called on the UI thread before browser navigation. Return true (1) to cancel the navigation or false (0) to allow the navigation to proceed. The |request| object cannot be modified in this callback.
-
ICefLoadHandler.OnLoadingStateChange will be called twice in all cases. If the navigation is allowed ICefLoadHandler.OnLoadStart and ICefLoadHandler.OnLoadEnd will be called. If the navigation is canceled ICefLoadHandler.OnLoadError will be called with an |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true (1) if the browser navigated via explicit user gesture (e.g. clicking a link) or false (0) if it navigated automatically (e.g. via the DomContentLoaded event).
+
TChromiumCore.OnLoadingStateChange will be called twice in all cases. If the navigation is allowed TChromiumCore.OnLoadStart and TChromiumCore.OnLoadEnd will be called. If the navigation is canceled TChromiumCore.OnLoadError will be called with an |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true (1) if the browser navigated via explicit user gesture (e.g. clicking a link) or false (0) if it navigated automatically (e.g. via the DomContentLoaded event).
diff --git a/docs/html/uCEFConstants.html b/docs/html/uCEFConstants.html
index d194ec82..df3e8230 100644
--- a/docs/html/uCEFConstants.html
+++ b/docs/html/uCEFConstants.html
@@ -2680,46 +2680,52 @@
CEF_PERMISSION_TYPE_GEOLOCATION = 1 shl 9; |
-CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = 1 shl 10; |
+CEF_PERMISSION_TYPE_HAND_TRACKING = 1 shl 10; |
-CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 shl 11; |
+CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = 1 shl 11; |
-CEF_PERMISSION_TYPE_MIC_STREAM = 1 shl 12; |
+CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 shl 12; |
-CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 shl 13; |
+CEF_PERMISSION_TYPE_MIC_STREAM = 1 shl 13; |
-CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 shl 14; |
+CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 shl 14; |
-CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 shl 15; |
+CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 shl 15; |
-CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 shl 16; |
+CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 shl 16; |
-CEF_PERMISSION_TYPE_POINTER_LOCK = 1 shl 17; |
+CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 shl 17; |
-CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 shl 18; |
+CEF_PERMISSION_TYPE_POINTER_LOCK = 1 shl 18; |
-CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 shl 19; |
+CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 shl 19; |
-CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 shl 20; |
+CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 shl 20; |
-CEF_PERMISSION_TYPE_VR_SESSION = 1 shl 21; |
+CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 shl 21; |
-CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 shl 22; |
+CEF_PERMISSION_TYPE_VR_SESSION = 1 shl 22; |
-CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 shl 23; |
+CEF_PERMISSION_TYPE_WEB_APP_INSTALLATION = 1 shl 23; |
+
+
+CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 shl 24; |
+
+
+CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 shl 25; |
CEF_API_HASH_PLATFORM = 0; |
@@ -12590,98 +12596,112 @@ Custom menu items originating from the renderer process.
+
+CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 shl 25; |
This item has no description. |
diff --git a/docs/html/uCEFInterfaces.ICefBrowserHost.html b/docs/html/uCEFInterfaces.ICefBrowserHost.html
index 38e9a300..95578b87 100644
--- a/docs/html/uCEFInterfaces.ICefBrowserHost.html
+++ b/docs/html/uCEFInterfaces.ICefBrowserHost.html
@@ -46,265 +46,269 @@
|
-procedure SetFocus(focus: Boolean); |
+function IsReadyToBeClosed: Boolean; |
|
+procedure SetFocus(focus: Boolean); |
+
+
+ |
function GetWindowHandle: TCefWindowHandle; |
-
+
|
function GetOpenerWindowHandle: TCefWindowHandle; |
-
+
|
function HasView: Boolean; |
-
+
|
function GetClient: ICefClient; |
-
+
|
function GetRequestContext: ICefRequestContext; |
-
+
|
function CanZoom(command: TCefZoomCommand): boolean; |
-
+
|
procedure Zoom(command: TCefZoomCommand); |
-
+
|
function GetDefaultZoomLevel: Double; |
-
+
|
function GetZoomLevel: Double; |
-
+
|
procedure SetZoomLevel(const zoomLevel: Double); |
-
+
|
procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: ICefRunFileDialogCallback); |
-
+
|
procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; const acceptFilters: TStrings; const callback: TCefRunFileDialogCallbackProc); |
-
+
|
procedure StartDownload(const url: ustring); |
-
+
|
procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback); |
-
+
|
procedure Print; |
-
+
|
procedure PrintToPdf(const path: ustring; settings: PCefPdfPrintSettings; const callback: ICefPdfPrintCallback); |
-
+
|
procedure PrintToPdfProc(const path: ustring; settings: PCefPdfPrintSettings; const callback: TOnPdfPrintFinishedProc); |
-
+
|
procedure Find(const searchText: ustring; forward_, matchCase, findNext: Boolean); |
-
+
|
procedure StopFinding(clearSelection: Boolean); |
-
+
|
procedure ShowDevTools(const windowInfo: PCefWindowInfo; const client: ICefClient; const settings: PCefBrowserSettings; inspectElementAt: PCefPoint); |
-
+
|
procedure CloseDevTools; |
-
+
|
function HasDevTools: Boolean; |
-
+
|
function SendDevToolsMessage(const message_: ustring): boolean; |
-
+
|
function ExecuteDevToolsMethod(message_id: integer; const method: ustring; const params: ICefDictionaryValue): Integer; |
-
+
|
function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration; |
-
+
|
procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); |
-
+
|
procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); |
-
+
|
procedure ReplaceMisspelling(const word: ustring); |
-
+
|
procedure AddWordToDictionary(const word: ustring); |
-
+
|
function IsWindowRenderingDisabled: Boolean; |
-
+
|
procedure WasResized; |
-
+
|
procedure WasHidden(hidden: Boolean); |
-
+
|
procedure NotifyScreenInfoChanged; |
-
+
|
procedure Invalidate(kind: TCefPaintElementType); |
-
+
|
procedure SendExternalBeginFrame; |
-
+
|
procedure SendKeyEvent(const event: PCefKeyEvent); |
-
+
|
procedure SendMouseClickEvent(const event: PCefMouseEvent; type_: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); |
-
+
|
procedure SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); |
-
+
|
procedure SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); |
-
+
|
procedure SendTouchEvent(const event: PCefTouchEvent); |
-
+
|
procedure SendCaptureLostEvent; |
-
+
|
procedure NotifyMoveOrResizeStarted; |
-
+
|
function GetWindowlessFrameRate: Integer; |
-
+
|
procedure SetWindowlessFrameRate(frameRate: Integer); |
-
+
|
procedure IMESetComposition(const text: ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : PCefRange); |
-
+
|
procedure IMECommitText(const text: ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); |
-
+
|
procedure IMEFinishComposingText(keep_selection : boolean); |
-
+
|
procedure IMECancelComposition; |
-
+
|
procedure DragTargetDragEnter(const dragData: ICefDragData; const event: PCefMouseEvent; allowedOps: TCefDragOperations); |
-
+
|
procedure DragTargetDragOver(const event: PCefMouseEvent; allowedOps: TCefDragOperations); |
-
+
|
procedure DragTargetDragLeave; |
-
+
|
procedure DragTargetDrop(const event: PCefMouseEvent); |
-
+
|
procedure DragSourceEndedAt(x, y: Integer; op: TCefDragOperation); |
-
+
|
procedure DragSourceSystemDragEnded; |
-
+
|
function GetVisibleNavigationEntry: ICefNavigationEntry; |
-
+
|
procedure SetAccessibilityState(accessibilityState: TCefState); |
-
+
|
procedure SetAutoResizeEnabled(enabled: boolean; const min_size, max_size: PCefSize); |
-
+
|
procedure SetAudioMuted(mute: boolean); |
-
+
|
function IsAudioMuted: boolean; |
-
+
|
function IsFullscreen: boolean; |
-
+
|
procedure ExitFullscreen(will_cause_resize: boolean); |
-
+
|
function CanExecuteChromeCommand(command_id: integer): boolean; |
-
+
|
procedure ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition); |
-
+
|
function IsRenderProcessUnresponsive: boolean; |
-
+
|
function GetRuntimeStyle: TCefRuntimeStyle; |
@@ -368,7 +372,13 @@
- Request that the browser close. The JavaScript 'onbeforeunload' event will be fired. If |force_close| is false (0) the event handler, if any, will be allowed to prompt the user and the user can optionally cancel the close. If |force_close| is true (1) the prompt will not be displayed and the close will proceed. Results in a call to ICefLifeSpanHandler.DoClose() if the event handler allows the close or if |force_close| is true (1). See ICefLifeSpanHandler.DoClose() documentation for additional usage information.
+
+
+Request that the browser close. Closing a browser is a multi-stage process that may complete either synchronously or asynchronously, and involves events such as TChromiumCore.OnClose (Alloy style only), TChromiumCore.OnBeforeClose, and a top-level window close handler such as TCEFWindowComponent.OnCanClose (or platform-specific equivalent). In some cases a close request may be delayed or canceled by the user. Using TryCloseBrowser() instead of CloseBrowser() is recommended for most use cases. See TChromiumCore.OnClose documentation for detailed usage and examples.
+
+ If |aForceClose| is false (0) then JavaScript unload handlers, if any, may be fired and the close may be delayed or canceled by the user. If |aForceClose| is true (1) then the user will not be prompted and the close will proceed immediately (possibly asynchronously). If browser close is delayed and not canceled the default behavior is to call the top-level window close handler once the browser is ready to be closed. This default behavior can be changed for Alloy style browsers by implementing TChromiumCore.OnClose. IsReadyToBeClosed() can be used to detect mandatory browser close events when customizing close behavior on the browser process UI thread.
+
+
|
diff --git a/docs/html/uCEFTypes.TCefBrowserHost.html b/docs/html/uCEFTypes.TCefBrowserHost.html
index c9c7f960..0ffaf490 100644
--- a/docs/html/uCEFTypes.TCefBrowserHost.html
+++ b/docs/html/uCEFTypes.TCefBrowserHost.html
@@ -47,253 +47,257 @@
|
-set_focus: procedure(self: PCefBrowserHost; focus: Integer); stdcall; |
+is_ready_to_be_closed: function(self: PCefBrowserHost): Integer; stdcall; |
|
+set_focus: procedure(self: PCefBrowserHost; focus: Integer); stdcall; |
+
+
+ |
get_window_handle: function(self: PCefBrowserHost): TCefWindowHandle; stdcall; |
-
+
|
get_opener_window_handle: function(self: PCefBrowserHost): TCefWindowHandle; stdcall; |
-
+
|
has_view: function(self: PCefBrowserHost): Integer; stdcall; |
-
+
|
get_client: function(self: PCefBrowserHost): PCefClient; stdcall; |
-
+
|
get_request_context: function(self: PCefBrowserHost): PCefRequestContext; stdcall; |
-
+
|
can_zoom: function(self: PCefBrowserHost; command: TCefZoomCommand): Integer; stdcall; |
-
+
|
zoom: procedure(self: PCefBrowserHost; command: TCefZoomCommand); stdcall; |
-
+
|
get_default_zoom_level: function(self: PCefBrowserHost): Double; stdcall; |
-
+
|
get_zoom_level: function(self: PCefBrowserHost): Double; stdcall; |
-
+
|
set_zoom_level: procedure(self: PCefBrowserHost; zoomLevel: Double); stdcall; |
-
+
|
run_file_dialog: procedure(self: PCefBrowserHost; mode: TCefFileDialogMode; const title, default_file_path: PCefString; accept_filters: TCefStringList; callback: PCefRunFileDialogCallback); stdcall; |
-
+
|
start_download: procedure(self: PCefBrowserHost; const url: PCefString); stdcall; |
-
+
|
download_image: procedure(self: PCefBrowserHost; const image_url: PCefString; is_favicon: Integer; max_image_size: Cardinal; bypass_cache: Integer; callback: PCefDownloadImageCallback); stdcall; |
-
+
|
print: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
print_to_pdf: procedure(self: PCefBrowserHost; const path: PCefString; const settings: PCefPdfPrintSettings; callback: PCefPdfPrintCallback); stdcall; |
-
+
|
find: procedure(self: PCefBrowserHost; const searchText: PCefString; forward_, matchCase, findNext: Integer); stdcall; |
-
+
|
stop_finding: procedure(self: PCefBrowserHost; clearSelection: Integer); stdcall; |
-
+
|
show_dev_tools: procedure(self: PCefBrowserHost; const windowInfo: PCefWindowInfo; client: PCefClient; const settings: PCefBrowserSettings; const inspect_element_at: PCefPoint); stdcall; |
-
+
|
close_dev_tools: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
has_dev_tools: function(self: PCefBrowserHost): Integer; stdcall; |
-
+
|
send_dev_tools_message: function(self: PCefBrowserHost; const message_: Pointer; message_size: NativeUInt): Integer; stdcall; |
-
+
|
execute_dev_tools_method: function(self: PCefBrowserHost; message_id: integer; const method: PCefString; params: PCefDictionaryValue): Integer; stdcall; |
-
+
|
add_dev_tools_message_observer: function(self: PCefBrowserHost; observer: PCefDevToolsMessageObserver): PCefRegistration; stdcall; |
-
+
|
get_navigation_entries: procedure(self: PCefBrowserHost; visitor: PCefNavigationEntryVisitor; current_only: Integer); stdcall; |
-
+
|
replace_misspelling: procedure(self: PCefBrowserHost; const word: PCefString); stdcall; |
-
+
|
add_word_to_dictionary: procedure(self: PCefBrowserHost; const word: PCefString); stdcall; |
-
+
|
is_window_rendering_disabled: function(self: PCefBrowserHost): Integer; stdcall; |
-
+
|
was_resized: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
was_hidden: procedure(self: PCefBrowserHost; hidden: Integer); stdcall; |
-
+
|
notify_screen_info_changed: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
invalidate: procedure(self: PCefBrowserHost; type_: TCefPaintElementType); stdcall; |
-
+
|
send_external_begin_frame: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
send_key_event: procedure(self: PCefBrowserHost; const event: PCefKeyEvent); stdcall; |
-
+
|
send_mouse_click_event: procedure(self: PCefBrowserHost; const event: PCefMouseEvent; type_: TCefMouseButtonType; mouseUp, clickCount: Integer); stdcall; |
-
+
|
send_mouse_move_event: procedure(self: PCefBrowserHost; const event: PCefMouseEvent; mouseLeave: Integer); stdcall; |
-
+
|
send_mouse_wheel_event: procedure(self: PCefBrowserHost; const event: PCefMouseEvent; deltaX, deltaY: Integer); stdcall; |
-
+
|
send_touch_event: procedure(self: PCefBrowserHost; const event: PCefTouchEvent); stdcall; |
-
+
|
send_capture_lost_event: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
notify_move_or_resize_started: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
get_windowless_frame_rate: function(self: PCefBrowserHost): Integer; stdcall; |
-
+
|
set_windowless_frame_rate: procedure(self: PCefBrowserHost; frame_rate: Integer); stdcall; |
-
+
|
ime_set_composition: procedure(self: PCefBrowserHost; const text: PCefString; underlinesCount : NativeUInt; const underlines : PCefCompositionUnderline; const replacement_range, selection_range : PCefRange); stdcall; |
-
+
|
ime_commit_text: procedure(self: PCefBrowserHost; const text: PCefString; const replacement_range : PCefRange; relative_cursor_pos : integer); stdcall; |
-
+
|
ime_finish_composing_text: procedure(self: PCefBrowserHost; keep_selection : integer); stdcall; |
-
+
|
ime_cancel_composition: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
drag_target_drag_enter: procedure(self: PCefBrowserHost; drag_data: PCefDragData; const event: PCefMouseEvent; allowed_ops: TCefDragOperations); stdcall; |
-
+
|
drag_target_drag_over: procedure(self: PCefBrowserHost; const event: PCefMouseEvent; allowed_ops: TCefDragOperations); stdcall; |
-
+
|
drag_target_drag_leave: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
drag_target_drop: procedure(self: PCefBrowserHost; const event: PCefMouseEvent); stdcall; |
-
+
|
drag_source_ended_at: procedure(self: PCefBrowserHost; x, y: Integer; op: TCefDragOperation); stdcall; |
-
+
|
drag_source_system_drag_ended: procedure(self: PCefBrowserHost); stdcall; |
-
+
|
get_visible_navigation_entry: function(self: PCefBrowserHost): PCefNavigationEntry; stdcall; |
-
+
|
set_accessibility_state: procedure(self: PCefBrowserHost; accessibility_state: TCefState); stdcall; |
-
+
|
set_auto_resize_enabled: procedure(self: PCefBrowserHost; enabled: integer; const min_size, max_size: PCefSize); stdcall; |
-
+
|
set_audio_muted: procedure(self: PCefBrowserHost; mute: integer); stdcall; |
-
+
|
is_audio_muted: function(self: PCefBrowserHost): integer; stdcall; |
-
+
|
is_fullscreen: function(self: PCefBrowserHost): integer; stdcall; |
-
+
|
exit_fullscreen: procedure(self: PCefBrowserHost; will_cause_resize: integer); stdcall; |
-
+
|
can_execute_chrome_command: function(self: PCefBrowserHost; command_id: integer): integer; stdcall; |
-
+
|
execute_chrome_command: procedure(self: PCefBrowserHost; command_id: integer; disposition: TCefWindowOpenDisposition); stdcall; |
-
+
|
is_render_process_unresponsive: function(self: PCefBrowserHost): integer; stdcall; |
-
+
|
get_runtime_style: function(self: PCefBrowserHost): TCefRuntimeStyle; stdcall; |
@@ -335,6 +339,14 @@
|
+is_ready_to_be_closed: function(self: PCefBrowserHost): Integer; stdcall; |
+
+
+ This item has no description. |
+
+
+
+ |
set_focus: procedure(self: PCefBrowserHost; focus: Integer); stdcall; |
diff --git a/docs/html/uCEFTypes.html b/docs/html/uCEFTypes.html
index 58789468..5dbb8333 100644
--- a/docs/html/uCEFTypes.html
+++ b/docs/html/uCEFTypes.html
@@ -7144,6 +7144,10 @@ Ranges:
<see href="https://github.com/cfredric/storage-access-headers">See also: https://github.com/cfredric/storage-access-headers.)
+
+CEF_CONTENT_SETTING_TYPE_HAND_TRACKING: Whether or not sites can request Hand Tracking data within WebXR Sessions.
+
+CEF_CONTENT_SETTING_TYPE_WEB_APP_INSTALLATION: Website setting to indicate whether user has opted in to allow web apps to install other web apps.
|
diff --git a/packages/cef4delphi_lazarus.lpk b/packages/cef4delphi_lazarus.lpk
index fa57f2d2..5fecb94d 100644
--- a/packages/cef4delphi_lazarus.lpk
+++ b/packages/cef4delphi_lazarus.lpk
@@ -21,7 +21,7 @@
-
+
diff --git a/source/uCEFBrowser.pas b/source/uCEFBrowser.pas
index bfdd9e00..3a5fe02a 100644
--- a/source/uCEFBrowser.pas
+++ b/source/uCEFBrowser.pas
@@ -53,6 +53,7 @@ type
function GetBrowser: ICefBrowser;
procedure CloseBrowser(forceClose: Boolean);
function TryCloseBrowser: Boolean;
+ function IsReadyToBeClosed: Boolean;
procedure SetFocus(focus: Boolean);
function GetWindowHandle: TCefWindowHandle;
function GetOpenerWindowHandle: TCefWindowHandle;
@@ -748,6 +749,11 @@ begin
Result := PCefBrowserHost(FData)^.try_close_browser(PCefBrowserHost(FData)) <> 0;
end;
+function TCefBrowserHostRef.IsReadyToBeClosed: Boolean;
+begin
+ Result := PCefBrowserHost(FData)^.is_ready_to_be_closed(PCefBrowserHost(FData)) <> 0;
+end;
+
class function TCefBrowserHostRef.UnWrap(data: Pointer): ICefBrowserHost;
begin
if (data <> nil) then
diff --git a/source/uCEFChromiumCore.pas b/source/uCEFChromiumCore.pas
index 86d7c800..ec960700 100644
--- a/source/uCEFChromiumCore.pas
+++ b/source/uCEFChromiumCore.pas
@@ -731,14 +731,26 @@ type
///
function CreateClientHandler(var aClient : ICefClient; aIsOSR : boolean = True) : boolean; overload;
///
- /// Request that the browser close. The JavaScript 'onbeforeunload' event will
- /// be fired. If |aForceClose| is false (0) the event handler, if any, will be
- /// allowed to prompt the user and the user can optionally cancel the close.
- /// If |aForceClose| is true (1) the prompt will not be displayed and the
- /// close will proceed. Results in a call to
- /// ICefLifeSpanHandler.DoClose() if the event handler allows the close
- /// or if |aForceClose| is true (1). See ICefLifeSpanHandler.DoClose()
- /// documentation for additional usage information.
+ /// Request that the browser close. Closing a browser is a multi-stage process
+ /// that may complete either synchronously or asynchronously, and involves
+ /// events such as TChromiumCore.OnClose (Alloy style only),
+ /// TChromiumCore.OnBeforeClose, and a top-level window close
+ /// handler such as TCEFWindowComponent.OnCanClose (or platform-specific
+ /// equivalent). In some cases a close request may be delayed or canceled by
+ /// the user. Using TryCloseBrowser() instead of CloseBrowser() is
+ /// recommended for most use cases. See TChromiumCore.OnClose
+ /// documentation for detailed usage and examples.
+ ///
+ /// If |aForceClose| is false (0) then JavaScript unload handlers, if any, may
+ /// be fired and the close may be delayed or canceled by the user. If
+ /// |aForceClose| is true (1) then the user will not be prompted and the close
+ /// will proceed immediately (possibly asynchronously). If browser close is
+ /// delayed and not canceled the default behavior is to call the top-level
+ /// window close handler once the browser is ready to be closed. This default
+ /// behavior can be changed for Alloy style browsers by implementing
+ /// TChromiumCore.OnClose. IsReadyToBeClosed() can be used
+ /// to detect mandatory browser close events when customizing close behavior
+ /// on the browser process UI thread.
///
procedure CloseBrowser(aForceClose : boolean);
///
@@ -746,16 +758,36 @@ type
///
procedure CloseAllBrowsers;
///
- /// Helper for closing a browser. Call this function from the top-level window
- /// close handler (if any). Internally this calls CloseBrowser(false (0)) if
- /// the close has not yet been initiated. This function returns false (0)
- /// while the close is pending and true (1) after the close has completed. See
- /// CloseBrowser() and ICefLifeSpanHandler.DoClose() documentation for
- /// additional usage information. This function must be called on the browser
- /// process UI thread.
+ /// Helper for closing a browser. This is similar in behavior to
+ /// CLoseBrowser(false) but returns a boolean to reflect the immediate
+ /// close status. Call this function from a top-level window close handler
+ /// such as TCEFWindowComponent.OnCanClose (or platform-specific equivalent)
+ /// to request that the browser close, and return the result to indicate if
+ /// the window close should proceed. Returns false (0) if the close will be
+ /// delayed (JavaScript unload handlers triggered but still pending) or true
+ /// (1) if the close will proceed immediately (possibly asynchronously). See
+ /// CloseBrowser() documentation for additional usage information. This
+ /// function must be called on the browser process UI thread.
///
function TryCloseBrowser : boolean;
///
+ /// Returns true (1) if the browser is ready to be closed, meaning that the
+ /// close has already been initiated and that JavaScript unload handlers have
+ /// already executed or should be ignored. This can be used from a top-level
+ /// window close handler such as TCEFWindowComponent.OnCanClose (or platform-
+ /// specific equivalent) to distringuish between potentially cancelable
+ /// browser close events (like the user clicking the top-level window close
+ /// button before browser close has started) and mandatory browser close
+ /// events (like JavaScript `window.close()` or after browser close has
+ /// started in response to [Try]CloseBrowser()). Not completing the browser
+ /// close for mandatory close events (when this function returns true (1))
+ /// will leave the browser in a partially closed state that interferes with
+ /// proper functioning. See CloseBrowser() documentation for additional usage
+ /// information. This function must be called on the browser process UI
+ /// thread.
+ ///
+ function IsReadyToBeClosed : boolean;
+ ///
/// Select the browser with the aID identifier when TChromiumCore uses the
/// multi-browser mode.
///
@@ -2680,69 +2712,84 @@ type
///
property OnBeforeClose : TOnBeforeClose read FOnBeforeClose write FOnBeforeClose;
///
- /// Called when a browser has recieved a request to close. This may result
- /// directly from a call to ICefBrowserHost.*CloseBrowser or indirectly
- /// if the browser is parented to a top-level window created by CEF and the
- /// user attempts to close that window (by clicking the 'X', for example). The
- /// OnClose function will be called after the JavaScript 'onunload' event
- /// has been fired.
+ /// Called when an Alloy style browser is ready to be closed, meaning that the
+ /// close has already been initiated and that JavaScript unload handlers have
+ /// already executed or should be ignored. This may result directly from a
+ /// call to TChromiumCore.[Try]CloseBrowser() or indirectly if the
+ /// browser's top-level parent window was created by CEF and the user attempts
+ /// to close that window (by clicking the 'X', for example). TChromiumCore.OnClose will
+ /// not be called if the browser's host window/view has already been destroyed
+ /// (via parent window/view hierarchy tear-down, for example), as it is no
+ /// longer possible to customize the close behavior at that point.
///
- /// An application should handle top-level owner window close notifications by
- /// calling ICefBrowserHost.TryCloseBrowser or
- /// ICefBrowserHost.CloseBrowser(false) instead of allowing the window
+ /// An application should handle top-level parent window close notifications
+ /// by calling TChromiumCore.TryCloseBrowser() or
+ /// TChromiumCore.CloseBrowser(false) instead of allowing the window
/// to close immediately (see the examples below). This gives CEF an
- /// opportunity to process the 'onbeforeunload' event and optionally cancel
- /// the close before OnClose is called.
+ /// opportunity to process JavaScript unload handlers and optionally cancel
+ /// the close before TChromiumCore.OnClose is called.
///
- /// When windowed rendering is enabled CEF will internally create a window or
- /// view to host the browser. In that case returning false (0) from OnClose()
- /// will send the standard close notification to the browser's top-level owner
- /// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
- /// Linux or ICefWindowDelegate.CanClose callback from Views). If the
- /// browser's host window/view has already been destroyed (via view hierarchy
- /// tear-down, for example) then OnClose() will not be called for that
- /// browser since is no longer possible to cancel the close.
+ /// When windowed rendering is enabled CEF will create an internal child
+ /// window/view to host the browser. In that case returning false (0) from
+ /// TChromiumCore.OnClose will send the standard close notification to the browser's top-
+ /// level parent window (e.g. WM_CLOSE on Windows, performClose: on OS X,
+ /// "delete_event" on Linux or TCEFWindowComponent.OnCanClose callback
+ /// from Views).
///
- /// When windowed rendering is disabled returning false (0) from OnClose()
- /// will cause the browser object to be destroyed immediately.
+ /// When windowed rendering is disabled there is no internal window/view and
+ /// returning false (0) from TChromiumCore.OnClose will cause the browser object to be
+ /// destroyed immediately.
///
- /// If the browser's top-level owner window requires a non-standard close
- /// notification then send that notification from OnClose() and return true.
+ /// If the browser's top-level parent window requires a non-standard close
+ /// notification then send that notification from TChromiumCore.OnClose and return true
+ /// (1). You are still required to complete the browser close as soon as
+ /// possible (either by calling TChromiumCore.[Try]CloseBrowser() or by proceeding with
+ /// window/view hierarchy tear-down), otherwise the browser will be left in a
+ /// partially closed state that interferes with proper functioning. Top-level
+ /// windows created on the browser process UI thread can alternately call
+ /// TChromiumCore.IsReadyToBeClosed() in the close handler to check
+ /// close status instead of relying on custom TChromiumCore.OnClose handling. See
+ /// documentation on that function for additional details.
///
- /// The ICefLifeSpanHandler.OnBeforeClose function will be called
- /// after OnClose() (if OnClose() is called) and immediately before the
+ /// The TChromiumCore.OnBeforeClose event will be called
+ /// after TChromiumCore.OnClose (if TChromiumCore.OnClose is called) and immediately before the
/// browser object is destroyed. The application should only exit after
- /// OnBeforeClose() has been called for all existing browsers.
+ /// TChromiumCore.OnBeforeClose has been called for all existing browsers.
///
/// The below examples describe what should happen during window close when
/// the browser is parented to an application-provided top-level window.
///
- /// Example 1: Using ICefBrowserHost.TryCloseBrowser(). This is
+ /// Example 1: Using TChromiumCore.TryCloseBrowser(). This is
/// recommended for clients using standard close handling and windows created
/// on the browser process UI thread.
///
/// 1. User clicks the window close button which sends a close notification
/// to the application's top-level window.
/// 2. Application's top-level window receives the close notification and
- /// calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
- /// TryCloseBrowser() returns false so the client cancels the window
+ /// calls TChromiumCore.TryCloseBrowser() (similar to calling TChromiumCore.CloseBrowser(false)).
+ /// TChromiumCore.TryCloseBrowser() returns false so the client cancels the window
/// close.
/// 3. JavaScript 'onbeforeunload' handler executes and shows the close
- /// confirmation dialog (which can be overridden via
- /// ICefJSDialogHandler.OnBeforeUnloadDialog()).
+ /// confirmation dialog (which can be overridden via TChromiumCore.OnBeforeUnloadDialog).
/// 4. User approves the close.
/// 5. JavaScript 'onunload' handler executes.
- /// 6. CEF sends a close notification to the application's top-level window
- /// (because OnClose() returned false by default).
- /// 7. Application's top-level window receives the close notification and
+ /// 6. Application's TChromiumCore.OnClose handler is called and returns false (0) by
+ /// default.
+ /// 7. CEF sends a close notification to the application's top-level window
+ /// (because TChromiumCore.OnClose returned false).
+ /// 8. Application's top-level window receives the close notification and
/// calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
/// allows the window close.
- /// 8. Application's top-level window is destroyed.
- /// 9. Application's OnBeforeClose() handler is called and the browser object is destroyed.
- /// 10. Application exits by calling cef_quit_message_loop() if no other browsers exist.
+ /// 9. Application's top-level window is destroyed, triggering destruction
+ /// of the child browser window.
+ /// 10. Application's TChromiumCore.OnBeforeClose handler is called and the browser object
+ /// is destroyed.
+ /// 11. Application exits by calling TCefApplicationCore.QuitMessageLoop if no other browsers
+ /// exist.
///
- /// Example 2: Using ICefBrowserHost::CloseBrowser(false) and
- /// implementing the OnClose() callback. This is recommended for clients
+ ///
+ /// Example 2: Using TChromiumCore.CloseBrowser(false) and
+ /// implementing the TChromiumCore.OnClose event. This is recommended for clients
/// using non-standard close handling or windows that were not created on the
/// browser process UI thread.
///
@@ -2752,19 +2799,22 @@ type
/// A. Calls ICefBrowserHost.CloseBrowser(false).
/// B. Cancels the window close.
/// 3. JavaScript 'onbeforeunload' handler executes and shows the close
- /// confirmation dialog (which can be overridden via
- /// ICefJSDialogHandler.OnBeforeUnloadDialog()).
+ /// confirmation dialog (which can be overridden via TChromiumCore.OnBeforeUnloadDialog).
/// 4. User approves the close.
/// 5. JavaScript 'onunload' handler executes.
- /// 6. Application's OnClose() handler is called. Application will:
- /// A. Set a flag to indicate that the next close attempt will be allowed.
+ /// 6. Application's TChromiumCore.OnClose handler is called. Application will:
+ /// A. Set a flag to indicate that the next top-level window close attempt
+ /// will be allowed.
/// B. Return false.
- /// 7. CEF sends an close notification to the application's top-level window.
+ /// 7. CEF sends a close notification to the application's top-level window
+ /// (because TChromiumCore.OnClose returned false).
/// 8. Application's top-level window receives the close notification and
- /// allows the window to close based on the flag from #6B.
- /// 9. Application's top-level window is destroyed.
- /// 10. Application's OnBeforeClose() handler is called and the browser object is destroyed.
- /// 11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
+ /// allows the window to close based on the flag from #6A.
+ /// 9. Application's top-level window is destroyed, triggering destruction
+ /// of the child browser window.
+ /// 10. Application's TChromiumCore.OnBeforeClose handler is called and the browser object
+ /// is destroyed.
+ /// 11. Application exits by calling TCefApplicationCore.QuitMessageLoop if no other browsers exist.
///
///
///
@@ -2776,10 +2826,10 @@ type
/// Called on the UI thread before browser navigation. Return true (1) to
/// cancel the navigation or false (0) to allow the navigation to proceed. The
/// |request| object cannot be modified in this callback.
- /// ICefLoadHandler.OnLoadingStateChange will be called twice in all
- /// cases. If the navigation is allowed ICefLoadHandler.OnLoadStart and
- /// ICefLoadHandler.OnLoadEnd will be called. If the navigation is
- /// canceled ICefLoadHandler.OnLoadError will be called with an
+ /// TChromiumCore.OnLoadingStateChange will be called twice in all
+ /// cases. If the navigation is allowed TChromiumCore.OnLoadStart and
+ /// TChromiumCore.OnLoadEnd will be called. If the navigation is
+ /// canceled TChromiumCore.OnLoadError will be called with an
/// |errorCode| value of ERR_ABORTED. The |user_gesture| value will be true
/// (1) if the browser navigated via explicit user gesture (e.g. clicking a
/// link) or false (0) if it navigated automatically (e.g. via the
@@ -4897,6 +4947,12 @@ begin
Result := True;
end;
+function TChromiumCore.IsReadyToBeClosed : boolean;
+begin
+ Result := Initialized and
+ Browser.Host.IsReadyToBeClosed;
+end;
+
function TChromiumCore.CreateBrowserHost( aWindowInfo : PCefWindowInfo;
const aURL : ustring;
const aSettings : PCefBrowserSettings;
diff --git a/source/uCEFConstants.pas b/source/uCEFConstants.pas
index 9732dc33..717007d7 100644
--- a/source/uCEFConstants.pas
+++ b/source/uCEFConstants.pas
@@ -3911,20 +3911,22 @@ const
CEF_PERMISSION_TYPE_DISK_QUOTA = 1 shl 7;
CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 shl 8;
CEF_PERMISSION_TYPE_GEOLOCATION = 1 shl 9;
- CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = 1 shl 10;
- CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 shl 11;
- CEF_PERMISSION_TYPE_MIC_STREAM = 1 shl 12;
- CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 shl 13;
- CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 shl 14;
- CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 shl 15;
- CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 shl 16;
- CEF_PERMISSION_TYPE_POINTER_LOCK = 1 shl 17;
- CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 shl 18;
- CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 shl 19;
- CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 shl 20;
- CEF_PERMISSION_TYPE_VR_SESSION = 1 shl 21;
- CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 shl 22;
- CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 shl 23;
+ CEF_PERMISSION_TYPE_HAND_TRACKING = 1 shl 10;
+ CEF_PERMISSION_TYPE_IDENTITY_PROVIDER = 1 shl 11;
+ CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 shl 12;
+ CEF_PERMISSION_TYPE_MIC_STREAM = 1 shl 13;
+ CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 shl 14;
+ CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 shl 15;
+ CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 shl 16;
+ CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 shl 17;
+ CEF_PERMISSION_TYPE_POINTER_LOCK = 1 shl 18;
+ CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 shl 19;
+ CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 shl 20;
+ CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 shl 21;
+ CEF_PERMISSION_TYPE_VR_SESSION = 1 shl 22;
+ CEF_PERMISSION_TYPE_WEB_APP_INSTALLATION = 1 shl 23;
+ CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 shl 24;
+ CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 shl 25;
///
diff --git a/source/uCEFInterfaces.pas b/source/uCEFInterfaces.pas
index 3a580ab9..435cd6d7 100644
--- a/source/uCEFInterfaces.pas
+++ b/source/uCEFInterfaces.pas
@@ -803,27 +803,59 @@ type
///
function GetBrowser: ICefBrowser;
///
- /// Request that the browser close. The JavaScript 'onbeforeunload' event will
- /// be fired. If |force_close| is false (0) the event handler, if any, will be
- /// allowed to prompt the user and the user can optionally cancel the close.
- /// If |force_close| is true (1) the prompt will not be displayed and the
- /// close will proceed. Results in a call to
- /// ICefLifeSpanHandler.DoClose() if the event handler allows the close
- /// or if |force_close| is true (1). See ICefLifeSpanHandler.DoClose()
- /// documentation for additional usage information.
+ /// Request that the browser close. Closing a browser is a multi-stage process
+ /// that may complete either synchronously or asynchronously, and involves
+ /// events such as TChromiumCore.OnClose (Alloy style only),
+ /// TChromiumCore.OnBeforeClose, and a top-level window close
+ /// handler such as TCEFWindowComponent.OnCanClose (or platform-specific
+ /// equivalent). In some cases a close request may be delayed or canceled by
+ /// the user. Using TryCloseBrowser() instead of CloseBrowser() is
+ /// recommended for most use cases. See TChromiumCore.OnClose
+ /// documentation for detailed usage and examples.
+ ///
+ /// If |aForceClose| is false (0) then JavaScript unload handlers, if any, may
+ /// be fired and the close may be delayed or canceled by the user. If
+ /// |aForceClose| is true (1) then the user will not be prompted and the close
+ /// will proceed immediately (possibly asynchronously). If browser close is
+ /// delayed and not canceled the default behavior is to call the top-level
+ /// window close handler once the browser is ready to be closed. This default
+ /// behavior can be changed for Alloy style browsers by implementing
+ /// TChromiumCore.OnClose. IsReadyToBeClosed() can be used
+ /// to detect mandatory browser close events when customizing close behavior
+ /// on the browser process UI thread.
///
procedure CloseBrowser(forceClose: Boolean);
///
- /// Helper for closing a browser. Call this function from the top-level window
- /// close handler (if any). Internally this calls CloseBrowser(false (0)) if
- /// the close has not yet been initiated. This function returns false (0)
- /// while the close is pending and true (1) after the close has completed. See
- /// CloseBrowser() and ICefLifeSpanHandler.DoClose() documentation for
- /// additional usage information. This function must be called on the browser
- /// process UI thread.
+ /// Helper for closing a browser. This is similar in behavior to
+ /// CLoseBrowser(false) but returns a boolean to reflect the immediate
+ /// close status. Call this function from a top-level window close handler
+ /// such as TCEFWindowComponent.OnCanClose (or platform-specific equivalent)
+ /// to request that the browser close, and return the result to indicate if
+ /// the window close should proceed. Returns false (0) if the close will be
+ /// delayed (JavaScript unload handlers triggered but still pending) or true
+ /// (1) if the close will proceed immediately (possibly asynchronously). See
+ /// CloseBrowser() documentation for additional usage information. This
+ /// function must be called on the browser process UI thread.
///
function TryCloseBrowser: Boolean;
///
+ /// Returns true (1) if the browser is ready to be closed, meaning that the
+ /// close has already been initiated and that JavaScript unload handlers have
+ /// already executed or should be ignored. This can be used from a top-level
+ /// window close handler such as TCEFWindowComponent.OnCanClose (or platform-
+ /// specific equivalent) to distringuish between potentially cancelable
+ /// browser close events (like the user clicking the top-level window close
+ /// button before browser close has started) and mandatory browser close
+ /// events (like JavaScript `window.close()` or after browser close has
+ /// started in response to [Try]CloseBrowser()). Not completing the browser
+ /// close for mandatory close events (when this function returns true (1))
+ /// will leave the browser in a partially closed state that interferes with
+ /// proper functioning. See CloseBrowser() documentation for additional usage
+ /// information. This function must be called on the browser process UI
+ /// thread.
+ ///
+ function IsReadyToBeClosed: Boolean;
+ ///
/// Set whether the browser is focused.
///
procedure SetFocus(focus: Boolean);
@@ -6233,90 +6265,110 @@ type
///
procedure OnAfterCreated(const browser: ICefBrowser);
///
- /// Called when a browser has received a request to close. This may result
- /// directly from a call to ICefBrowserHost.*CloseBrowser or indirectly
- /// if the browser is parented to a top-level window created by CEF and the
- /// user attempts to close that window (by clicking the 'X', for example). The
- /// DoClose function will be called after the JavaScript 'onunload' event
- /// has been fired.
+ /// Called when an Alloy style browser is ready to be closed, meaning that the
+ /// close has already been initiated and that JavaScript unload handlers have
+ /// already executed or should be ignored. This may result directly from a
+ /// call to TChromiumCore.[Try]CloseBrowser() or indirectly if the
+ /// browser's top-level parent window was created by CEF and the user attempts
+ /// to close that window (by clicking the 'X', for example). TChromiumCore.OnClose will
+ /// not be called if the browser's host window/view has already been destroyed
+ /// (via parent window/view hierarchy tear-down, for example), as it is no
+ /// longer possible to customize the close behavior at that point.
///
- /// An application should handle top-level owner window close notifications by
- /// calling ICefBrowserHost.TryCloseBrowser or
- /// ICefBrowserHost.CloseBrowser(false) instead of allowing the window
+ /// An application should handle top-level parent window close notifications
+ /// by calling TChromiumCore.TryCloseBrowser() or
+ /// TChromiumCore.CloseBrowser(false) instead of allowing the window
/// to close immediately (see the examples below). This gives CEF an
- /// opportunity to process the 'onbeforeunload' event and optionally cancel
- /// the close before DoClose is called.
+ /// opportunity to process JavaScript unload handlers and optionally cancel
+ /// the close before TChromiumCore.OnClose is called.
///
- /// When windowed rendering is enabled CEF will internally create a window or
- /// view to host the browser. In that case returning false (0) from DoClose()
- /// will send the standard close notification to the browser's top-level owner
- /// window (e.g. WM_CLOSE on Windows, performClose: on OS X, "delete_event" on
- /// Linux or ICefWindowDelegate.CanClose callback from Views). If the
- /// browser's host window/view has already been destroyed (via view hierarchy
- /// tear-down, for example) then DoClose() will not be called for that
- /// browser since is no longer possible to cancel the close.
+ /// When windowed rendering is enabled CEF will create an internal child
+ /// window/view to host the browser. In that case returning false (0) from
+ /// TChromiumCore.OnClose will send the standard close notification to the browser's top-
+ /// level parent window (e.g. WM_CLOSE on Windows, performClose: on OS X,
+ /// "delete_event" on Linux or TCEFWindowComponent.OnCanClose callback
+ /// from Views).
///
- /// When windowed rendering is disabled returning false (0) from DoClose()
- /// will cause the browser object to be destroyed immediately.
+ /// When windowed rendering is disabled there is no internal window/view and
+ /// returning false (0) from TChromiumCore.OnClose will cause the browser object to be
+ /// destroyed immediately.
///
- /// If the browser's top-level owner window requires a non-standard close
- /// notification then send that notification from DoClose() and return true
- /// (1).
+ /// If the browser's top-level parent window requires a non-standard close
+ /// notification then send that notification from TChromiumCore.OnClose and return true
+ /// (1). You are still required to complete the browser close as soon as
+ /// possible (either by calling TChromiumCore.[Try]CloseBrowser() or by proceeding with
+ /// window/view hierarchy tear-down), otherwise the browser will be left in a
+ /// partially closed state that interferes with proper functioning. Top-level
+ /// windows created on the browser process UI thread can alternately call
+ /// TChromiumCore.IsReadyToBeClosed() in the close handler to check
+ /// close status instead of relying on custom TChromiumCore.OnClose handling. See
+ /// documentation on that function for additional details.
///
- /// The ICefLifeSpanHandler.OnBeforeClose function will be called
- /// after DoClose() (if DoClose() is called) and immediately before the
+ /// The TChromiumCore.OnBeforeClose event will be called
+ /// after TChromiumCore.OnClose (if TChromiumCore.OnClose is called) and immediately before the
/// browser object is destroyed. The application should only exit after
- /// OnBeforeClose() has been called for all existing browsers.
+ /// TChromiumCore.OnBeforeClose has been called for all existing browsers.
///
- /// The below examples describe what should happen during window close when
- /// the browser is parented to an application-provided top-level window.
+ /// The below examples describe what should happen during window close when
+ /// the browser is parented to an application-provided top-level window.
///
- /// Example 1: Using ICefBrowserHost.TryCloseBrowser(). This is
+ /// Example 1: Using TChromiumCore.TryCloseBrowser(). This is
/// recommended for clients using standard close handling and windows created
- /// on the browser process UI thread.
+ /// on the browser process UI thread.
+ ///
/// 1. User clicks the window close button which sends a close notification
/// to the application's top-level window.
/// 2. Application's top-level window receives the close notification and
- /// calls TryCloseBrowser() (which internally calls CloseBrowser(false)).
- /// TryCloseBrowser() returns false so the client cancels the window
+ /// calls TChromiumCore.TryCloseBrowser() (similar to calling TChromiumCore.CloseBrowser(false)).
+ /// TChromiumCore.TryCloseBrowser() returns false so the client cancels the window
/// close.
/// 3. JavaScript 'onbeforeunload' handler executes and shows the close
- /// confirmation dialog (which can be overridden via
- /// ICefJSDialogHandler.OnBeforeUnloadDialog()).
+ /// confirmation dialog (which can be overridden via TChromiumCore.OnBeforeUnloadDialog).
/// 4. User approves the close.
/// 5. JavaScript 'onunload' handler executes.
- /// 6. CEF sends a close notification to the application's top-level window
- /// (because DoClose() returned false by default).
- /// 7. Application's top-level window receives the close notification and
+ /// 6. Application's TChromiumCore.OnClose handler is called and returns false (0) by
+ /// default.
+ /// 7. CEF sends a close notification to the application's top-level window
+ /// (because TChromiumCore.OnClose returned false).
+ /// 8. Application's top-level window receives the close notification and
/// calls TryCloseBrowser(). TryCloseBrowser() returns true so the client
/// allows the window close.
- /// 8. Application's top-level window is destroyed.
- /// 9. Application's OnBeforeClose() handler is called and the browser object is destroyed.
- /// 10. Application exits by calling cef_quit_message_loop() if no other browsers exist.
+ /// 9. Application's top-level window is destroyed, triggering destruction
+ /// of the child browser window.
+ /// 10. Application's TChromiumCore.OnBeforeClose handler is called and the browser object
+ /// is destroyed.
+ /// 11. Application exits by calling TCefApplicationCore.QuitMessageLoop if no other browsers
+ /// exist.
+ ///
///
- /// Example 2: Using ICefBrowserHost::CloseBrowser(false) and
- /// implementing the DoClose() callback. This is recommended for clients
+ /// Example 2: Using TChromiumCore.CloseBrowser(false) and
+ /// implementing the TChromiumCore.OnClose event. This is recommended for clients
/// using non-standard close handling or windows that were not created on the
- /// browser process UI thread.
+ /// browser process UI thread.
+ ///
/// 1. User clicks the window close button which sends a close notification
/// to the application's top-level window.
/// 2. Application's top-level window receives the close notification and:
/// A. Calls ICefBrowserHost.CloseBrowser(false).
/// B. Cancels the window close.
/// 3. JavaScript 'onbeforeunload' handler executes and shows the close
- /// confirmation dialog (which can be overridden via
- /// ICefJSDialogHandler.OnBeforeUnloadDialog()).
+ /// confirmation dialog (which can be overridden via TChromiumCore.OnBeforeUnloadDialog).
/// 4. User approves the close.
/// 5. JavaScript 'onunload' handler executes.
- /// 6. Application's DoClose() handler is called. Application will:
- /// A. Set a flag to indicate that the next close attempt will be allowed.
+ /// 6. Application's TChromiumCore.OnClose handler is called. Application will:
+ /// A. Set a flag to indicate that the next top-level window close attempt
+ /// will be allowed.
/// B. Return false.
- /// 7. CEF sends an close notification to the application's top-level window.
+ /// 7. CEF sends a close notification to the application's top-level window
+ /// (because TChromiumCore.OnClose returned false).
/// 8. Application's top-level window receives the close notification and
- /// allows the window to close based on the flag from #6B.
- /// 9. Application's top-level window is destroyed.
- /// 10. Application's OnBeforeClose() handler is called and the browser object is destroyed.
- /// 11. Application exits by calling cef_quit_message_loop() if no other browsers exist.
+ /// allows the window to close based on the flag from #6A.
+ /// 9. Application's top-level window is destroyed, triggering destruction
+ /// of the child browser window.
+ /// 10. Application's TChromiumCore.OnBeforeClose handler is called and the browser object
+ /// is destroyed.
+ /// 11. Application exits by calling TCefApplicationCore.QuitMessageLoop if no other browsers exist.
+ ///
///
function DoClose(const browser: ICefBrowser): Boolean;
///
diff --git a/source/uCEFTypes.pas b/source/uCEFTypes.pas
index c16b639c..3c9199e3 100644
--- a/source/uCEFTypes.pas
+++ b/source/uCEFTypes.pas
@@ -5213,9 +5213,9 @@ type
///
CEF_CONTENT_SETTING_TYPE_JAVASCRIPT_OPTIMIZER,
///
- /// Content Setting for the Storage Access Headers persistent origin trial that
- /// allows origins to opt into the storage access header behavior. Should be
- /// scoped to `REQUESTING_ORIGIN_AND_TOP_SCHEMEFUL_SITE_SCOPE` in order to
+ /// Content Setting for the Storage Access Headers persistent origin trial
+ /// that allows origins to opt into the storage access header behavior. Should
+ /// be scoped to `REQUESTING_ORIGIN_AND_TOP_SCHEMEFUL_SITE_SCOPE` in order to
/// correspond to the design of persistent origin trials.
/// ALLOW: storage access request headers will be attached to cross-site
/// requests, and url requests will look for response headers from
@@ -5225,7 +5225,16 @@ type
///
/// See also: https://github.com/cfredric/storage-access-headers.
///
- CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS_HEADER_ORIGIN_TRIAL
+ CEF_CONTENT_SETTING_TYPE_STORAGE_ACCESS_HEADER_ORIGIN_TRIAL,
+ ///
+ /// Whether or not sites can request Hand Tracking data within WebXR Sessions.
+ ///
+ CEF_CONTENT_SETTING_TYPE_HAND_TRACKING,
+ ///
+ /// Website setting to indicate whether user has opted in to allow web apps to
+ /// install other web apps.
+ ///
+ CEF_CONTENT_SETTING_TYPE_WEB_APP_INSTALLATION
);
///
@@ -7746,6 +7755,7 @@ type
get_browser : function(self: PCefBrowserHost): PCefBrowser; stdcall;
close_browser : procedure(self: PCefBrowserHost; force_close: Integer); stdcall;
try_close_browser : function(self: PCefBrowserHost): Integer; stdcall;
+ is_ready_to_be_closed : function(self: PCefBrowserHost): Integer; stdcall;
set_focus : procedure(self: PCefBrowserHost; focus: Integer); stdcall;
get_window_handle : function(self: PCefBrowserHost): TCefWindowHandle; stdcall;
get_opener_window_handle : function(self: PCefBrowserHost): TCefWindowHandle; stdcall;
diff --git a/source/uCEFVersion.inc b/source/uCEFVersion.inc
index afeb2423..658e3c3a 100644
--- a/source/uCEFVersion.inc
+++ b/source/uCEFVersion.inc
@@ -1,9 +1,9 @@
- CEF_SUPPORTED_VERSION_MAJOR = 129;
- CEF_SUPPORTED_VERSION_MINOR = 0;
- CEF_SUPPORTED_VERSION_RELEASE = 12;
+ CEF_SUPPORTED_VERSION_MAJOR = 130;
+ CEF_SUPPORTED_VERSION_MINOR = 1;
+ CEF_SUPPORTED_VERSION_RELEASE = 2;
CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR;
CEF_CHROMEELF_VERSION_MINOR = 0;
- CEF_CHROMEELF_VERSION_RELEASE = 6668;
- CEF_CHROMEELF_VERSION_BUILD = 101;
+ CEF_CHROMEELF_VERSION_RELEASE = 6723;
+ CEF_CHROMEELF_VERSION_BUILD = 44;
diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json
index b8dcfe69..1ab7c0b6 100644
--- a/update_CEF4Delphi.json
+++ b/update_CEF4Delphi.json
@@ -2,9 +2,9 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
- "InternalVersion" : 665,
+ "InternalVersion" : 666,
"Name" : "cef4delphi_lazarus.lpk",
- "Version" : "129.0.12"
+ "Version" : "130.1.2"
}
],
"UpdatePackageData" : {