Update to CEF 119.4.3

This commit is contained in:
salvadordf 2023-11-16 16:58:47 +01:00
parent 2ba413797f
commit 90db9ab70d
21 changed files with 1143 additions and 109 deletions

View File

@ -3,15 +3,15 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the LICENSE.md file. CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the LICENSE.md file.
CEF4Delphi uses CEF 118.7.1 which includes Chromium 118.0.5993.119. CEF4Delphi uses CEF 119.4.3 which includes Chromium 119.0.6045.159.
The CEF binaries used by CEF4Delphi are available for download at Spotify : The CEF binaries used by CEF4Delphi are available for download at Spotify :
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_118.7.1%2Bg99817d2%2Bchromium-118.0.5993.119_windows32.tar.bz2) * [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_119.4.3%2Bgc76a3b9%2Bchromium-119.0.6045.159_windows32.tar.bz2)
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.7.1%2Bg99817d2%2Bchromium-118.0.5993.119_windows64.tar.bz2) * [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_119.4.3%2Bgc76a3b9%2Bchromium-119.0.6045.159_windows64.tar.bz2)
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.7.1%2Bg99817d2%2Bchromium-118.0.5993.119_linux64.tar.bz2) * [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_119.4.3%2Bgc76a3b9%2Bchromium-119.0.6045.159_linux64.tar.bz2)
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_118.7.1%2Bg99817d2%2Bchromium-118.0.5993.119_linuxarm.tar.bz2) * [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_119.4.3%2Bgc76a3b9%2Bchromium-119.0.6045.159_linuxarm.tar.bz2)
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.7.1%2Bg99817d2%2Bchromium-118.0.5993.119_linuxarm64.tar.bz2) * [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_119.4.3%2Bgc76a3b9%2Bchromium-119.0.6045.159_linuxarm64.tar.bz2)
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_118.7.1%2Bg99817d2%2Bchromium-118.0.5993.119_macosx64.tar.bz2) * [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_119.4.3%2Bgc76a3b9%2Bchromium-119.0.6045.159_macosx64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 12.0 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 11 and Lazarus 2.2.6/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 12.0 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 11 and Lazarus 2.2.6/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.

Binary file not shown.

View File

@ -21,7 +21,7 @@
</CompilerOptions> </CompilerOptions>
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/> <Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
<License Value="MPL 1.1"/> <License Value="MPL 1.1"/>
<Version Major="118" Minor="7" Release="1"/> <Version Major="119" Minor="4" Release="3"/>
<Files Count="214"> <Files Count="214">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -22,6 +22,7 @@ type
function IsSame(const that: ICefBinaryValue): Boolean; function IsSame(const that: ICefBinaryValue): Boolean;
function IsEqual(const that: ICefBinaryValue): Boolean; function IsEqual(const that: ICefBinaryValue): Boolean;
function Copy: ICefBinaryValue; function Copy: ICefBinaryValue;
function GetRawData: Pointer;
function GetSize: NativeUInt; function GetSize: NativeUInt;
function GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt; function GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt;
@ -37,6 +38,7 @@ type
function IsSame(const that: ICefBinaryValue): Boolean; function IsSame(const that: ICefBinaryValue): Boolean;
function IsEqual(const that: ICefBinaryValue): Boolean; function IsEqual(const that: ICefBinaryValue): Boolean;
function Copy: ICefBinaryValue; function Copy: ICefBinaryValue;
function GetRawData: Pointer;
function GetSize: NativeUInt; function GetSize: NativeUInt;
function GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt; function GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt;
@ -60,6 +62,11 @@ begin
Result := UnWrap(PCefBinaryValue(FData)^.copy(PCefBinaryValue(FData))); Result := UnWrap(PCefBinaryValue(FData)^.copy(PCefBinaryValue(FData)));
end; end;
function TCefBinaryValueRef.GetRawData: Pointer;
begin
Result := PCefBinaryValue(FData)^.get_raw_data(PCefBinaryValue(FData));
end;
function TCefBinaryValueRef.GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt; function TCefBinaryValueRef.GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt;
begin begin
Result := PCefBinaryValue(FData)^.get_data(PCefBinaryValue(FData), buffer, bufferSize, dataOffset); Result := PCefBinaryValue(FData)^.get_data(PCefBinaryValue(FData), buffer, bufferSize, dataOffset);
@ -163,6 +170,17 @@ begin
Result := CefGetData(TCefBinaryValueOwn(TempObject).Copy); Result := CefGetData(TCefBinaryValueOwn(TempObject).Copy);
end; end;
function cef_binary_value_get_raw_data(self: PCefBinaryValue): Pointer; stdcall;
var
TempObject : TObject;
begin
Result := nil;
TempObject := CefGetObject(self);
if (TempObject <> nil) and (TempObject is TCefBinaryValueOwn) then
Result := TCefBinaryValueOwn(TempObject).GetRawData;
end;
function cef_binary_value_get_size(self: PCefBinaryValue): NativeUInt; stdcall; function cef_binary_value_get_size(self: PCefBinaryValue): NativeUInt; stdcall;
var var
TempObject : TObject; TempObject : TObject;
@ -191,13 +209,14 @@ begin
with PCefBinaryValue(FData)^ do with PCefBinaryValue(FData)^ do
begin begin
is_valid := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_valid; is_valid := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_valid;
is_owned := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_owned; is_owned := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_owned;
is_same := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_same; is_same := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_same;
is_equal := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_equal; is_equal := {$IFDEF FPC}@{$ENDIF}cef_binary_value_is_equal;
copy := {$IFDEF FPC}@{$ENDIF}cef_binary_value_copy; copy := {$IFDEF FPC}@{$ENDIF}cef_binary_value_copy;
get_size := {$IFDEF FPC}@{$ENDIF}cef_binary_value_get_size; get_raw_data := {$IFDEF FPC}@{$ENDIF}cef_binary_value_get_raw_data;
get_data := {$IFDEF FPC}@{$ENDIF}cef_binary_value_get_data; get_size := {$IFDEF FPC}@{$ENDIF}cef_binary_value_get_size;
get_data := {$IFDEF FPC}@{$ENDIF}cef_binary_value_get_data;
end; end;
end; end;
@ -226,6 +245,11 @@ begin
Result := nil; Result := nil;
end; end;
function TCefBinaryValueOwn.GetRawData: Pointer;
begin
Result := nil;
end;
function TCefBinaryValueOwn.GetSize: NativeUInt; function TCefBinaryValueOwn.GetSize: NativeUInt;
begin begin
Result := 0; Result := 0;

View File

@ -118,6 +118,8 @@ type
function IsAudioMuted : boolean; function IsAudioMuted : boolean;
function IsFullscreen : boolean; function IsFullscreen : boolean;
procedure ExitFullscreen(will_cause_resize: boolean); procedure ExitFullscreen(will_cause_resize: boolean);
function CanExecuteChromeCommand(command_id: integer): boolean;
procedure ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition);
public public
class function UnWrap(data: Pointer): ICefBrowserHost; class function UnWrap(data: Pointer): ICefBrowserHost;
@ -370,6 +372,16 @@ begin
PCefBrowserHost(FData)^.exit_fullscreen(PCefBrowserHost(FData), Ord(will_cause_resize)); PCefBrowserHost(FData)^.exit_fullscreen(PCefBrowserHost(FData), Ord(will_cause_resize));
end; end;
function TCefBrowserHostRef.CanExecuteChromeCommand(command_id: integer): boolean;
begin
Result := PCefBrowserHost(FData)^.can_execute_chrome_command(PCefBrowserHost(FData), command_id) <> 0;
end;
procedure TCefBrowserHostRef.ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition);
begin
PCefBrowserHost(FData)^.execute_chrome_command(PCefBrowserHost(FData), command_id, disposition);
end;
procedure TCefBrowserHostRef.DragTargetDragEnter(const dragData: ICefDragData; const event: PCefMouseEvent; allowedOps: TCefDragOperations); procedure TCefBrowserHostRef.DragTargetDragEnter(const dragData: ICefDragData; const event: PCefMouseEvent; allowedOps: TCefDragOperations);
begin begin
PCefBrowserHost(FData)^.drag_target_drag_enter(PCefBrowserHost(FData), CefGetData(dragData), event, allowedOps); PCefBrowserHost(FData)^.drag_target_drag_enter(PCefBrowserHost(FData), CefGetData(dragData), event, allowedOps);

View File

@ -184,6 +184,7 @@ type
// ICefLifeSpanHandler // ICefLifeSpanHandler
FOnBeforePopup : TOnBeforePopup; FOnBeforePopup : TOnBeforePopup;
FOnBeforeDevToolsPopup : TOnBeforeDevToolsPopup;
FOnAfterCreated : TOnAfterCreated; FOnAfterCreated : TOnAfterCreated;
FOnBeforeClose : TOnBeforeClose; FOnBeforeClose : TOnBeforeClose;
FOnClose : TOnClose; FOnClose : TOnClose;
@ -545,6 +546,7 @@ type
// ICefLifeSpanHandler // ICefLifeSpanHandler
function doOnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; virtual; function doOnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; virtual;
procedure doOnBeforeDevToolsPopup(const browser: ICefBrowser; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var use_default_window: boolean); virtual;
procedure doOnAfterCreated(const browser: ICefBrowser); virtual; procedure doOnAfterCreated(const browser: ICefBrowser); virtual;
procedure doOnBeforeClose(const browser: ICefBrowser); virtual; procedure doOnBeforeClose(const browser: ICefBrowser); virtual;
function doOnClose(const browser: ICefBrowser): Boolean; virtual; function doOnClose(const browser: ICefBrowser): Boolean; virtual;
@ -1283,6 +1285,26 @@ type
/// </summary> /// </summary>
procedure ExitFullscreen(will_cause_resize: boolean); procedure ExitFullscreen(will_cause_resize: boolean);
/// <summary> /// <summary>
/// Returns true (1) if a Chrome command is supported and enabled. Values for
/// |command_id| can be found in the cef_command_ids.h file. This function can
/// only be called on the UI thread. Only used with the Chrome runtime.
/// </summary>
/// <remarks>
/// <para><see cref="uCEFConstants">See the IDC_* constants in uCEFConstants.pas for all the |command_id| values.</see></para>
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/chrome_command_ids.h">The command_id values are also available in chrome/app/chrome_command_ids.h</see></para>
/// </remarks>
function CanExecuteChromeCommand(command_id: integer): boolean;
/// <summary>
/// Execute a Chrome command. Values for |command_id| can be found in the
/// cef_command_ids.h file. |disposition| provides information about the
/// intended command target. Only used with the Chrome runtime.
/// </summary>
/// <remarks>
/// <para><see cref="uCEFConstants">See the IDC_* constants in uCEFConstants.pas for all the |command_id| values.</see></para>
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/chrome_command_ids.h">The command_id values are also available in chrome/app/chrome_command_ids.h</see></para>
/// </remarks>
procedure ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition);
/// <summary>
/// Issue a BeginFrame request to Chromium. Only valid when /// Issue a BeginFrame request to Chromium. Only valid when
/// TCefWindowInfo.external_begin_frame_enabled is set to true (1). /// TCefWindowInfo.external_begin_frame_enabled is set to true (1).
/// </summary> /// </summary>
@ -2583,7 +2605,7 @@ type
/// </remarks> /// </remarks>
property OnDialogClosed : TOnDialogClosed read FOnDialogClosed write FOnDialogClosed; property OnDialogClosed : TOnDialogClosed read FOnDialogClosed write FOnDialogClosed;
/// <summary> /// <summary>
/// Called on the UI thread before a new popup browser is created. The /// Called on the CEF UI thread before a new popup browser is created. The
/// |browser| and |frame| values represent the source of the popup request. /// |browser| and |frame| values represent the source of the popup request.
/// The |target_url| and |target_frame_name| values indicate where the popup /// The |target_url| and |target_frame_name| values indicate where the popup
/// browser should navigate and may be NULL if not specified with the request. /// browser should navigate and may be NULL if not specified with the request.
@ -2613,6 +2635,28 @@ type
/// </remarks> /// </remarks>
property OnBeforePopup : TOnBeforePopup read FOnBeforePopup write FOnBeforePopup; property OnBeforePopup : TOnBeforePopup read FOnBeforePopup write FOnBeforePopup;
/// <summary> /// <summary>
/// <para>Called on the CEF UI thread before a new DevTools popup browser is created.
/// The |browser| value represents the source of the popup request. Optionally
/// modify |windowInfo|, |client|, |settings| and |extra_info| values. The
/// |client|, |settings| and |extra_info| values will default to the source
/// browser's values. Any modifications to |windowInfo| will be ignored if the
/// parent browser is Views-hosted (wrapped in a ICefBrowserView).</para>
/// <para>The |extra_info| parameter provides an opportunity to specify extra
/// information specific to the created popup browser that will be passed to
/// ICefRenderProcessHandler.OnBrowserCreated() in the render process.
/// The existing |extra_info| object, if any, will be read-only but may be
/// replaced with a new object.</para>
/// <para>Views-hosted source browsers will create Views-hosted DevTools popups
/// unless |use_default_window| is set to to true (1). DevTools popups can be
/// blocked by returning true (1) from ICefCommandHandler.OnChromeCommand
/// for IDC_DEV_TOOLS. Only used with the Chrome runtime.</para>
/// </summary>
/// <remarks>
/// <para>This event will be called on the browser process CEF UI thread.</para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_life_span_handler_capi.h">CEF source file: /include/capi/cef_life_span_handler_capi.h (cef_life_span_handler_t)</see></para>
/// </remarks>
property OnBeforeDevToolsPopup : TOnBeforeDevToolsPopup read FOnBeforeDevToolsPopup write FOnBeforeDevToolsPopup;
/// <summary>
/// Called after a new browser is created. It is now safe to begin performing /// Called after a new browser is created. It is now safe to begin performing
/// actions with |browser|. ICefFrameHandler callbacks related to initial /// actions with |browser|. ICefFrameHandler callbacks related to initial
/// main frame creation will arrive before this callback. See /// main frame creation will arrive before this callback. See
@ -4458,6 +4502,7 @@ begin
// ICefLifeSpanHandler // ICefLifeSpanHandler
FOnBeforePopup := nil; FOnBeforePopup := nil;
FOnBeforeDevToolsPopup := nil;
FOnAfterCreated := nil; FOnAfterCreated := nil;
FOnBeforeClose := nil; FOnBeforeClose := nil;
FOnClose := nil; FOnClose := nil;
@ -8173,6 +8218,18 @@ begin
settings, extra_info, noJavascriptAccess, Result); settings, extra_info, noJavascriptAccess, Result);
end; end;
procedure TChromiumCore.doOnBeforeDevToolsPopup(const browser : ICefBrowser;
var windowInfo : TCefWindowInfo;
var client : ICefClient;
var settings : TCefBrowserSettings;
var extra_info : ICefDictionaryValue;
var use_default_window : boolean);
begin
if assigned(FOnBeforeDevToolsPopup) then
FOnBeforeDevToolsPopup(Self, browser, windowInfo, client,
settings, extra_info, use_default_window);
end;
function TChromiumCore.doOnBeforeResourceLoad(const browser : ICefBrowser; function TChromiumCore.doOnBeforeResourceLoad(const browser : ICefBrowser;
const frame : ICefFrame; const frame : ICefFrame;
const request : ICefRequest; const request : ICefRequest;
@ -9353,6 +9410,18 @@ begin
Browser.Host.ExitFullscreen(will_cause_resize); Browser.Host.ExitFullscreen(will_cause_resize);
end; end;
function TChromiumCore.CanExecuteChromeCommand(command_id: integer): boolean;
begin
Result := Initialized and
Browser.Host.CanExecuteChromeCommand(command_id);
end;
procedure TChromiumCore.ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition);
begin
if Initialized then
Browser.Host.ExecuteChromeCommand(command_id, disposition);
end;
procedure TChromiumCore.SendExternalBeginFrame; procedure TChromiumCore.SendExternalBeginFrame;
begin begin
if Initialized then if Initialized then

View File

@ -73,6 +73,7 @@ type
// ICefLifeSpanHandler // ICefLifeSpanHandler
TOnBeforePopup = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean; var Result: Boolean) of object; TOnBeforePopup = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean; var Result: Boolean) of object;
TOnBeforeDevToolsPopup = procedure(Sender: TObject; const browser: ICefBrowser; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var use_default_window: boolean) of object;
TOnAfterCreated = procedure(Sender: TObject; const browser: ICefBrowser) of object; TOnAfterCreated = procedure(Sender: TObject; const browser: ICefBrowser) of object;
TOnBeforeClose = procedure(Sender: TObject; const browser: ICefBrowser) of object; TOnBeforeClose = procedure(Sender: TObject; const browser: ICefBrowser) of object;
TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction) of object; TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction) of object;

View File

@ -45,8 +45,18 @@ type
procedure PrependWrapper(const wrapper: ustring); procedure PrependWrapper(const wrapper: ustring);
public public
/// <summary>
/// Returns a ICefCommandLine instance using a PCefCommandLine data pointer.
/// </summary>
class function UnWrap(data: Pointer): ICefCommandLine; class function UnWrap(data: Pointer): ICefCommandLine;
/// <summary>
/// Create a new ICefCommandLine instance.
/// </summary>
class function New: ICefCommandLine; class function New: ICefCommandLine;
/// <summary>
/// Returns the singleton global ICefCommandLine object. The returned object
/// will be read-only.
/// </summary>
class function Global: ICefCommandLine; class function Global: ICefCommandLine;
end; end;

View File

@ -27,7 +27,7 @@ type
function IsElement: Boolean; function IsElement: Boolean;
function IsEditable: Boolean; function IsEditable: Boolean;
function IsFormControlElement: Boolean; function IsFormControlElement: Boolean;
function GetFormControlElementType: ustring; function GetFormControlElementType: TCefDomFormControlType;
function IsSame(const that: ICefDomNode): Boolean; function IsSame(const that: ICefDomNode): Boolean;
function GetName: ustring; function GetName: ustring;
function GetValue: ustring; function GetValue: ustring;
@ -146,9 +146,9 @@ begin
Result := TCefDomNodeRef.UnWrap(PCefDomNode(FData)^.get_first_child(PCefDomNode(FData))); Result := TCefDomNodeRef.UnWrap(PCefDomNode(FData)^.get_first_child(PCefDomNode(FData)));
end; end;
function TCefDomNodeRef.GetFormControlElementType: ustring; function TCefDomNodeRef.GetFormControlElementType: TCefDomFormControlType;
begin begin
Result := CefStringFreeAndGet(PCefDomNode(FData)^.get_form_control_element_type(PCefDomNode(FData))); Result := PCefDomNode(FData)^.get_form_control_element_type(PCefDomNode(FData));
end; end;
function TCefDomNodeRef.GetLastChild: ICefDomNode; function TCefDomNodeRef.GetLastChild: ICefDomNode;

View File

@ -367,6 +367,7 @@ type
// ICefLifeSpanHandler // ICefLifeSpanHandler
function doOnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; function doOnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean;
procedure doOnBeforeDevToolsPopup(const browser: ICefBrowser; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var use_default_window: boolean);
procedure doOnAfterCreated(const browser: ICefBrowser); procedure doOnAfterCreated(const browser: ICefBrowser);
procedure doOnBeforeClose(const browser: ICefBrowser); procedure doOnBeforeClose(const browser: ICefBrowser);
function doOnClose(const browser: ICefBrowser): Boolean; function doOnClose(const browser: ICefBrowser): Boolean;
@ -1317,7 +1318,26 @@ type
/// to true (1) if exiting browser fullscreen will cause a view resize. /// to true (1) if exiting browser fullscreen will cause a view resize.
/// </summary> /// </summary>
procedure ExitFullscreen(will_cause_resize: boolean); procedure ExitFullscreen(will_cause_resize: boolean);
/// <summary>
/// Returns true (1) if a Chrome command is supported and enabled. Values for
/// |command_id| can be found in the cef_command_ids.h file. This function can
/// only be called on the UI thread. Only used with the Chrome runtime.
/// </summary>
/// <remarks>
/// <para><see cref="uCEFConstants">See the IDC_* constants in uCEFConstants.pas for all the |command_id| values.</see></para>
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/chrome_command_ids.h">The command_id values are also available in chrome/app/chrome_command_ids.h</see></para>
/// </remarks>
function CanExecuteChromeCommand(command_id: integer): boolean;
/// <summary>
/// Execute a Chrome command. Values for |command_id| can be found in the
/// cef_command_ids.h file. |disposition| provides information about the
/// intended command target. Only used with the Chrome runtime.
/// </summary>
/// <remarks>
/// <para><see cref="uCEFConstants">See the IDC_* constants in uCEFConstants.pas for all the |command_id| values.</see></para>
/// <para><see href="https://source.chromium.org/chromium/chromium/src/+/main:chrome/app/chrome_command_ids.h">The command_id values are also available in chrome/app/chrome_command_ids.h</see></para>
/// </remarks>
procedure ExecuteChromeCommand(command_id: integer; disposition: TCefWindowOpenDisposition);
/// <summary> /// <summary>
/// Returns the hosted browser object. /// Returns the hosted browser object.
/// </summary> /// </summary>
@ -3337,6 +3357,16 @@ type
/// </summary> /// </summary>
function NeuterArrayBuffer : boolean; function NeuterArrayBuffer : boolean;
/// <summary> /// <summary>
/// Returns the length (in bytes) of the ArrayBuffer.
/// </summary>
function GetArrayBufferByteLength: NativeUInt;
/// <summary>
/// Returns a pointer to the beginning of the memory block for this
/// ArrayBuffer backing store. The returned pointer is valid as long as the
/// ICefv8value is alive.
/// </summary>
function GetArrayBufferData: Pointer;
/// <summary>
/// Returns the function name. /// Returns the function name.
/// </summary> /// </summary>
function GetFunctionName: ustring; function GetFunctionName: ustring;
@ -3744,7 +3774,7 @@ type
/// <summary> /// <summary>
/// Returns the type of this form control element node. /// Returns the type of this form control element node.
/// </summary> /// </summary>
function GetFormControlElementType: ustring; function GetFormControlElementType: TCefDomFormControlType;
/// <summary> /// <summary>
/// Returns true (1) if this object is pointing to the same handle as |that| /// Returns true (1) if this object is pointing to the same handle as |that|
/// object. /// object.
@ -5697,6 +5727,11 @@ type
/// </summary> /// </summary>
function Copy: ICefBinaryValue; function Copy: ICefBinaryValue;
/// <summary> /// <summary>
/// Returns a pointer to the beginning of the memory block. The returned
/// pointer is valid as long as the ICefBinaryValue is alive.
/// </summary>
function GetRawData: Pointer;
/// <summary>
/// Returns the data size. /// Returns the data size.
/// </summary> /// </summary>
function GetSize: NativeUInt; function GetSize: NativeUInt;
@ -6079,6 +6114,24 @@ type
/// </summary> /// </summary>
function OnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; function OnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean;
/// <summary> /// <summary>
/// <para>Called on the UI thread before a new DevTools popup browser is created.
/// The |browser| value represents the source of the popup request. Optionally
/// modify |windowInfo|, |client|, |settings| and |extra_info| values. The
/// |client|, |settings| and |extra_info| values will default to the source
/// browser's values. Any modifications to |windowInfo| will be ignored if the
/// parent browser is Views-hosted (wrapped in a ICefBrowserView).</para>
/// <para>The |extra_info| parameter provides an opportunity to specify extra
/// information specific to the created popup browser that will be passed to
/// ICefRenderProcessHandler.OnBrowserCreated() in the render process.
/// The existing |extra_info| object, if any, will be read-only but may be
/// replaced with a new object.</para>
/// <para>Views-hosted source browsers will create Views-hosted DevTools popups
/// unless |use_default_window| is set to to true (1). DevTools popups can be
/// blocked by returning true (1) from ICefCommandHandler.OnChromeCommand
/// for IDC_DEV_TOOLS. Only used with the Chrome runtime.</para>
/// </summary>
procedure OnBeforeDevToolsPopup(const browser: ICefBrowser; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var use_default_window: boolean);
/// <summary>
/// Called after a new browser is created. It is now safe to begin performing /// Called after a new browser is created. It is now safe to begin performing
/// actions with |browser|. ICefFrameHandler callbacks related to initial /// actions with |browser|. ICefFrameHandler callbacks related to initial
/// main frame creation will arrive before this callback. See /// main frame creation will arrive before this callback. See
@ -10371,13 +10424,18 @@ type
/// </summary> /// </summary>
function GetChromeToolbar : ICefView; function GetChromeToolbar : ICefView;
/// <summary> /// <summary>
/// Sets whether accelerators registered with ICefWindow.SetAccelerator are /// Sets whether normal priority accelerators are first forwarded to the web
/// triggered before or after the event is sent to the ICefBrowser. If /// content (`keydown` event handler) or ICefKeyboardHandler. Normal priority
/// |prefer_accelerators| is true (1) then the matching accelerator will be /// accelerators can be registered via ICefWindow.SetAccelerator (with
/// triggered immediately and the event will not be sent to the ICefBrowser. /// |high_priority|=false) or internally for standard accelerators supported
/// If |prefer_accelerators| is false (0) then the matching accelerator will /// by the Chrome runtime. If |prefer_accelerators| is true then the matching
/// only be triggered if the event is not handled by web content or by /// accelerator will be triggered immediately (calling
/// ICefKeyboardHandler. The default value is false (0). /// 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.
/// </summary> /// </summary>
procedure SetPreferAccelerators(prefer_accelerators: boolean); procedure SetPreferAccelerators(prefer_accelerators: boolean);
end; end;
@ -10855,12 +10913,19 @@ type
/// </summary> /// </summary>
procedure SendMouseEvents(button: TCefMouseButtonType; mouse_down, mouse_up: boolean); procedure SendMouseEvents(button: TCefMouseButtonType; mouse_down, mouse_up: boolean);
/// <summary> /// <summary>
/// Set the keyboard accelerator for the specified |command_id|. |key_code| /// <para>Set the keyboard accelerator for the specified |command_id|. |key_code|
/// can be any virtual key or character value. /// can be any virtual key or character value. Required modifier keys are
/// specified by |shift_pressed|, |ctrl_pressed| and/or |alt_pressed|.
/// ICefWindowDelegate.OnAccelerator will be called if the keyboard /// ICefWindowDelegate.OnAccelerator will be called if the keyboard
/// combination is triggered while this window has focus. /// combination is triggered while this window has focus.</para>
/// <para>The |high_priority| value will be considered if a child ICefBrowserView
/// has focus when the keyboard combination is triggered. If |high_priority|
/// is true (1) then the key event will not be forwarded to the web content
/// (`keydown` event handler) or ICefKeyboardHandler first. If
/// |high_priority| is false (0) then the behavior will depend on the
/// ICefBrowserView.SetPreferAccelerators configuration.</para>
/// </summary> /// </summary>
procedure SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed: boolean); procedure SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed, high_priority: boolean);
/// <summary> /// <summary>
/// Remove the keyboard accelerator for the specified |command_id|. /// Remove the keyboard accelerator for the specified |command_id|.
/// </summary> /// </summary>

View File

@ -22,24 +22,90 @@ uses
type type
TCEFJson = class TCEFJson = class
public public
/// <summary>
/// Returns the ICefValue value at the specified key.
/// </summary>
class function ReadValue(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefValue) : boolean; class function ReadValue(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefValue) : boolean;
/// <summary>
/// Returns the boolean value at the specified key.
/// </summary>
class function ReadBoolean(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : boolean) : boolean; class function ReadBoolean(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : boolean) : boolean;
/// <summary>
/// Returns the integer value at the specified key.
/// </summary>
class function ReadInteger(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : integer) : boolean; class function ReadInteger(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : integer) : boolean;
/// <summary>
/// Returns the double value at the specified key.
/// </summary>
class function ReadDouble(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : double) : boolean; class function ReadDouble(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : double) : boolean;
/// <summary>
/// Returns the ustring value at the specified key.
/// </summary>
class function ReadString(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ustring) : boolean; class function ReadString(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ustring) : boolean;
/// <summary>
/// Returns the ICefBinaryValue value at the specified key.
/// </summary>
class function ReadBinary(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefBinaryValue) : boolean; class function ReadBinary(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefBinaryValue) : boolean;
/// <summary>
/// Returns the ICefDictionaryValue value at the specified key.
/// </summary>
class function ReadDictionary(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefDictionaryValue) : boolean; class function ReadDictionary(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefDictionaryValue) : boolean;
/// <summary>
/// Returns the ICefListValue value at the specified key.
/// </summary>
class function ReadList(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefListValue) : boolean; class function ReadList(const aDictionary : ICefDictionaryValue; const aKey : string; var aValue : ICefListValue) : boolean;
/// <summary>
/// Parses the specified |json_string| and returns a dictionary or list
/// representation. If JSON parsing fails this function returns NULL.
/// </summary>
class function Parse(const jsonString: ustring; options: TCefJsonParserOptions = JSON_PARSER_RFC): ICefValue; overload; class function Parse(const jsonString: ustring; options: TCefJsonParserOptions = JSON_PARSER_RFC): ICefValue; overload;
/// <summary>
/// Parses the specified UTF8-encoded |json| buffer of size |json_size| and
/// returns a dictionary or list representation. If JSON parsing fails this
/// function returns NULL.
/// </summary>
class function Parse(const json: Pointer; json_size: NativeUInt; options: TCefJsonParserOptions = JSON_PARSER_RFC): ICefValue; overload; class function Parse(const json: Pointer; json_size: NativeUInt; options: TCefJsonParserOptions = JSON_PARSER_RFC): ICefValue; overload;
/// <summary>
/// Parses the specified |json_string| and returns a dictionary or list
/// representation. If JSON parsing fails this function returns NULL and
/// populates |error_msg_out| with a formatted error message.
/// </summary>
class function ParseAndReturnError(const jsonString: ustring; options: TCefJsonParserOptions; out errorMsgOut: ustring): ICefValue; class function ParseAndReturnError(const jsonString: ustring; options: TCefJsonParserOptions; out errorMsgOut: ustring): ICefValue;
/// <summary>
/// Generates a JSON string from the specified root |node|.
/// Returns an NULL string on failure. This function
/// requires exclusive access to |node| including any underlying data.
/// </summary>
class function Write(const node: ICefValue; options: TCefJsonWriterOptions = JSON_WRITER_DEFAULT): ustring; overload; class function Write(const node: ICefValue; options: TCefJsonWriterOptions = JSON_WRITER_DEFAULT): ustring; overload;
/// <summary>
/// Generates a JSON string from the specified root |node|.
/// Returns an NULL string on failure. This function
/// requires exclusive access to |node| including any underlying data.
/// </summary>
class function Write(const node: ICefDictionaryValue; options: TCefJsonWriterOptions = JSON_WRITER_DEFAULT): ustring; overload; class function Write(const node: ICefDictionaryValue; options: TCefJsonWriterOptions = JSON_WRITER_DEFAULT): ustring; overload;
/// <summary>
/// Generates a JSON string from the specified root |node|.
/// Returns an NULL string on failure. This function
/// requires exclusive access to |node| including any underlying data.
/// </summary>
class function Write(const node: ICefValue; var aRsltStrings: TStringList): boolean; overload; class function Write(const node: ICefValue; var aRsltStrings: TStringList): boolean; overload;
/// <summary>
/// Generates a JSON string from the specified root |node|.
/// Returns an NULL string on failure. This function
/// requires exclusive access to |node| including any underlying data.
/// </summary>
class function Write(const node: ICefDictionaryValue; var aRsltStrings: TStringList): boolean; overload; class function Write(const node: ICefDictionaryValue; var aRsltStrings: TStringList): boolean; overload;
/// <summary>
/// Saves the JSON data in |node| to a file in aFileName.
/// </summary>
class function SaveToFile(const node: ICefValue; const aFileName: ustring): boolean; overload; class function SaveToFile(const node: ICefValue; const aFileName: ustring): boolean; overload;
/// <summary>
/// Saves the JSON data in |node| to a file in aFileName.
/// </summary>
class function SaveToFile(const node: ICefDictionaryValue; const aFileName: ustring): boolean; overload; class function SaveToFile(const node: ICefDictionaryValue; const aFileName: ustring): boolean; overload;
/// <summary>
/// Loads the JSON data in |aFileName| using the |encoding| and returns an ICefValue node in |aRsltNode|.
/// </summary>
class function LoadFromFile(const aFileName: ustring; var aRsltNode: ICefValue; {$IFDEF DELPHI12_UP}encoding: TEncoding = nil;{$ENDIF} options: TCefJsonParserOptions = JSON_PARSER_RFC): boolean; class function LoadFromFile(const aFileName: ustring; var aRsltNode: ICefValue; {$IFDEF DELPHI12_UP}encoding: TEncoding = nil;{$ENDIF} options: TCefJsonParserOptions = JSON_PARSER_RFC): boolean;
end; end;

View File

@ -259,7 +259,7 @@ var
// /include/internal/cef_logging_internal.h // /include/internal/cef_logging_internal.h
cef_get_min_log_level : function : Integer; cdecl; cef_get_min_log_level : function : Integer; cdecl;
cef_get_vlog_level : function(const file_start: PAnsiChar; N: NativeInt): Integer; cdecl; cef_get_vlog_level : function(const file_start: PAnsiChar; N: NativeUInt): Integer; cdecl;
cef_log : procedure(const file_: PAnsiChar; line, severity: Integer; const message_: PAnsiChar); cdecl; cef_log : procedure(const file_: PAnsiChar; line, severity: Integer; const message_: PAnsiChar); cdecl;
// /include/internal/cef_string_list.h // /include/internal/cef_string_list.h

View File

@ -18,6 +18,7 @@ type
TCefLifeSpanHandlerOwn = class(TCefBaseRefCountedOwn, ICefLifeSpanHandler) TCefLifeSpanHandlerOwn = class(TCefBaseRefCountedOwn, ICefLifeSpanHandler)
protected protected
function OnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; virtual; function OnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; virtual;
procedure OnBeforeDevToolsPopup(const browser: ICefBrowser; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var use_default_window: boolean); virtual;
procedure OnAfterCreated(const browser: ICefBrowser); virtual; procedure OnAfterCreated(const browser: ICefBrowser); virtual;
function DoClose(const browser: ICefBrowser): Boolean; virtual; function DoClose(const browser: ICefBrowser): Boolean; virtual;
procedure OnBeforeClose(const browser: ICefBrowser); virtual; procedure OnBeforeClose(const browser: ICefBrowser); virtual;
@ -33,6 +34,7 @@ type
FEvents : Pointer; FEvents : Pointer;
function OnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; override; function OnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean): Boolean; override;
procedure OnBeforeDevToolsPopup(const browser: ICefBrowser; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var extra_info: ICefDictionaryValue; var use_default_window: boolean); override;
procedure OnAfterCreated(const browser: ICefBrowser); override; procedure OnAfterCreated(const browser: ICefBrowser); override;
function DoClose(const browser: ICefBrowser): Boolean; override; function DoClose(const browser: ICefBrowser): Boolean; override;
procedure OnBeforeClose(const browser: ICefBrowser); override; procedure OnBeforeClose(const browser: ICefBrowser); override;
@ -116,6 +118,55 @@ begin
end; end;
end; end;
procedure cef_life_span_handler_on_before_dev_tools_popup( self : PCefLifeSpanHandler;
browser : PCefBrowser;
windowInfo : PCefWindowInfo;
var client : PCefClient;
settings : PCefBrowserSettings;
var extra_info : PCefDictionaryValue;
use_default_window : PInteger); stdcall;
var
TempClient : ICefClient;
TempExtraInfo : ICefDictionaryValue;
TempUseDefWindow : boolean;
TempObject : TObject;
begin
try
TempObject := CefGetObject(self);
if (TempObject <> nil) and (TempObject is TCefLifeSpanHandlerOwn) then
begin
TempUseDefWindow := (use_default_window^ <> 0);
TempClient := TCefClientRef.UnWrap(client);
TempExtraInfo := TCefDictionaryValueRef.UnWrap(extra_info);
TCefLifeSpanHandlerOwn(TempObject).OnBeforeDevToolsPopup(TCefBrowserRef.UnWrap(browser),
windowInfo^,
TempClient,
settings^,
TempExtraInfo,
TempUseDefWindow);
use_default_window^ := Ord(TempUseDefWindow);
if (TempClient = nil) then
client := nil
else
if not(TempClient.SameAs(client)) then
client := TempClient.Wrap;
if (TempExtraInfo = nil) then
extra_info := nil
else
if not(TempExtraInfo.SameAs(extra_info)) then
extra_info := TempExtraInfo.Wrap;
end;
finally
TempClient := nil;
TempExtraInfo := nil;
end;
end;
procedure cef_life_span_handler_on_after_created(self : PCefLifeSpanHandler; procedure cef_life_span_handler_on_after_created(self : PCefLifeSpanHandler;
browser : PCefBrowser); stdcall; browser : PCefBrowser); stdcall;
var var
@ -156,10 +207,11 @@ begin
with PCefLifeSpanHandler(FData)^ do with PCefLifeSpanHandler(FData)^ do
begin begin
on_before_popup := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_on_before_popup; on_before_popup := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_on_before_popup;
on_after_created := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_on_after_created; on_before_dev_tools_popup := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_on_before_dev_tools_popup;
do_close := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_do_close; on_after_created := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_on_after_created;
on_before_close := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_on_before_close; do_close := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_do_close;
on_before_close := {$IFDEF FPC}@{$ENDIF}cef_life_span_handler_on_before_close;
end; end;
end; end;
@ -189,6 +241,16 @@ begin
Result := False; Result := False;
end; end;
procedure TCefLifeSpanHandlerOwn.OnBeforeDevToolsPopup(const browser : ICefBrowser;
var windowInfo : TCefWindowInfo;
var client : ICefClient;
var settings : TCefBrowserSettings;
var extra_info : ICefDictionaryValue;
var use_default_window : boolean);
begin
//
end;
function TCefLifeSpanHandlerOwn.DoClose(const browser: ICefBrowser): Boolean; function TCefLifeSpanHandlerOwn.DoClose(const browser: ICefBrowser): Boolean;
begin begin
Result := False; Result := False;
@ -261,4 +323,17 @@ begin
windowInfo, client, settings, extra_info, noJavascriptAccess); windowInfo, client, settings, extra_info, noJavascriptAccess);
end; end;
procedure TCustomLifeSpanHandler.OnBeforeDevToolsPopup(const browser : ICefBrowser;
var windowInfo : TCefWindowInfo;
var client : ICefClient;
var settings : TCefBrowserSettings;
var extra_info : ICefDictionaryValue;
var use_default_window : boolean);
begin
if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnBeforeDevToolsPopup(browser, windowInfo, client, settings, extra_info, use_default_window)
else
inherited OnBeforeDevToolsPopup(browser, windowInfo, client, settings, extra_info, use_default_window);
end;
end. end.

View File

@ -72,7 +72,9 @@ function CefGetData(const i: ICefBaseRefCounted): Pointer; {$IFDEF SUPPORTS_INLI
function CefStringAlloc(const str: ustring): TCefString; function CefStringAlloc(const str: ustring): TCefString;
function CefStringClearAndGet(str: PCefString): ustring; function CefStringClearAndGet(str: PCefString): ustring;
/// <summary>Converts ustring to TCefString.</summary>
function CefString(const str: ustring): TCefString; overload; function CefString(const str: ustring): TCefString; overload;
/// <summary>Converts PCefString to ustring.</summary>
function CefString(const str: PCefString): ustring; overload; function CefString(const str: PCefString): ustring; overload;
function CefUserFreeString(const str: ustring): PCefStringUserFree; function CefUserFreeString(const str: ustring): PCefStringUserFree;
procedure CefStringFree(const str: PCefString); procedure CefStringFree(const str: PCefString);
@ -80,40 +82,210 @@ function CefStringFreeAndGet(const str: PCefStringUserFree): ustring;
procedure CefStringSet(const str: PCefString; const value: ustring); procedure CefStringSet(const str: PCefString; const value: ustring);
procedure CefStringInitialize(const aCefString : PCefString); {$IFDEF SUPPORTS_INLINE}inline;{$ENDIF} procedure CefStringInitialize(const aCefString : PCefString); {$IFDEF SUPPORTS_INLINE}inline;{$ENDIF}
/// <summary>
/// Register a new V8 extension with the specified JavaScript extension code and
/// handler. Functions implemented by the handler are prototyped using the
/// keyword 'native'. The calling of a native function is restricted to the
/// scope in which the prototype of the native function is defined. This
/// function may only be called on the render process main thread.
///
/// Example JavaScript extension code: <pre>
/// // create the 'example' global object if it doesn't already exist.
/// if (!example)
/// example = {};
/// // create the 'example.test' global object if it doesn't already exist.
/// if (!example.test)
/// example.test = {};
/// (function() {
/// // Define the function 'example.test.myfunction'.
/// example.test.myfunction = function() {
/// // Call CefV8Handler::Execute() with the function name 'MyFunction'
/// // and no arguments.
/// native function MyFunction();
/// return MyFunction();
/// };
/// // Define the getter function for parameter 'example.test.myparam'.
/// example.test.__defineGetter__('myparam', function() {
/// // Call CefV8Handler::Execute() with the function name 'GetMyParam'
/// // and no arguments.
/// native function GetMyParam();
/// return GetMyParam();
/// });
/// // Define the setter function for parameter 'example.test.myparam'.
/// example.test.__defineSetter__('myparam', function(b) {
/// // Call CefV8Handler::Execute() with the function name 'SetMyParam'
/// // and a single argument.
/// native function SetMyParam();
/// if(b) SetMyParam(b);
/// });
///
/// // Extension definitions can also contain normal JavaScript variables
/// // and functions.
/// var myint = 0;
/// example.test.increment = function() {
/// myint += 1;
/// return myint;
/// };
/// })();
/// </pre>
///
/// Example usage in the page: <pre>
/// // Call the function.
/// example.test.myfunction();
/// // Set the parameter.
/// example.test.myparam = value;
/// // Get the parameter.
/// value = example.test.myparam;
/// // Call another function.
/// example.test.increment();
/// </pre>
/// </summary>
function CefRegisterExtension(const name, code: ustring; const Handler: ICefv8Handler): Boolean; function CefRegisterExtension(const name, code: ustring; const Handler: ICefv8Handler): Boolean;
/// <summary>
/// Post a task for execution on the specified thread. Equivalent to using
/// TCefTaskRunnerRef.GetForThread(threadId).PostTask(task).
/// </summary>
function CefPostTask(aThreadId : TCefThreadId; const aTask: ICefTask) : boolean; function CefPostTask(aThreadId : TCefThreadId; const aTask: ICefTask) : boolean;
/// <summary>
/// Post a task for delayed execution on the specified thread. Equivalent to
/// using TCefTaskRunnerRef.GetForThread(threadId).PostDelayedTask(task,
/// delay_ms).
/// </summary>
function CefPostDelayedTask(aThreadId : TCefThreadId; const aTask : ICefTask; aDelayMs : Int64) : boolean; function CefPostDelayedTask(aThreadId : TCefThreadId; const aTask : ICefTask; aDelayMs : Int64) : boolean;
/// <summary>
/// Returns true (1) if called on the specified thread. Equivalent to using
/// TCefTaskRunnerRef.GetForThread(threadId).BelongsToCurrentThread().
/// </summary>
function CefCurrentlyOn(aThreadId : TCefThreadId) : boolean; function CefCurrentlyOn(aThreadId : TCefThreadId) : boolean;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
/// <summary>
/// Converts a TCefTime value to TSystemTime.
/// </summary>
function CefTimeToSystemTime(const dt: TCefTime): TSystemTime; function CefTimeToSystemTime(const dt: TCefTime): TSystemTime;
/// <summary>
/// Converts a TSystemTime value to TCefTime.
/// </summary>
function SystemTimeToCefTime(const dt: TSystemTime): TCefTime; function SystemTimeToCefTime(const dt: TSystemTime): TCefTime;
{$ELSE} {$ELSE}
{$IFDEF LINUX} {$IFDEF LINUX}
{$IFDEF FPC} {$IFDEF FPC}
/// <summary>
/// Converts a TCefTime value to TSystemTime.
/// </summary>
function CefTimeToSystemTime(const dt: TCefTime): TSystemTime; function CefTimeToSystemTime(const dt: TCefTime): TSystemTime;
/// <summary>
/// Converts a TSystemTime value to TCefTime.
/// </summary>
function SystemTimeToCefTime(const dt: TSystemTime): TCefTime; function SystemTimeToCefTime(const dt: TSystemTime): TCefTime;
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
/// <summary>
/// Returns a new TCefTime with a valid time in case the original has errors.
/// </summary>
function FixCefTime(const dt : TCefTime): TCefTime; function FixCefTime(const dt : TCefTime): TCefTime;
/// <summary>
/// Converts a TCefTime value to TDateTime.
/// </summary>
function CefTimeToDateTime(const dt: TCefTime): TDateTime; function CefTimeToDateTime(const dt: TCefTime): TDateTime;
/// <summary>
/// Converts a TDateTime value to TCefTime.
/// </summary>
function DateTimeToCefTime(dt: TDateTime): TCefTime; function DateTimeToCefTime(dt: TDateTime): TCefTime;
/// <summary>
/// Converts a TDateTime value to TCefBaseTime.
/// </summary>
function DateTimeToCefBaseTime(dt: TDateTime): TCefBaseTime; function DateTimeToCefBaseTime(dt: TDateTime): TCefBaseTime;
/// <summary>
/// Converts TCefTime to a double which is the number of seconds since
/// epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0
/// means "not initialized".
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_to_doublet)</see></para>
/// </remarks>
function CefTimeToDouble(const dt: TCefTime): double; function CefTimeToDouble(const dt: TCefTime): double;
/// <summary>
/// Converts TCefTime from a double which is the number of seconds since
/// epoch (Jan 1, 1970). Webkit uses this format to represent time. A value of 0
/// means "not initialized".
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_from_doublet)</see></para>
/// </remarks>
function DoubleToCefTime(const dt: double): TCefTime; function DoubleToCefTime(const dt: double): TCefTime;
/// <summary>
/// Converts cef_time_t to time_t. time_t is almost always an integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to POSIX time.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_to_timet)</see></para>
/// </remarks>
function CefTimeToUnixTime(const dt: TCefTime): int64; function CefTimeToUnixTime(const dt: TCefTime): int64;
/// <summary>
/// Converts cef_time_t from time_t. time_t is almost always an integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to POSIX time.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_from_timet)</see></para>
/// </remarks>
function UnixTimeToCefTime(const dt: int64): TCefTime; function UnixTimeToCefTime(const dt: int64): TCefTime;
/// <summary>
/// Retrieve the current system time in a TCefTime type.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_now)</see></para>
/// </remarks>
function CefTimeNow: TCefTime; function CefTimeNow: TCefTime;
/// <summary>
/// Retrieve the current system time in a double type.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_now)</see></para>
/// </remarks>
function DoubleTimeNow: double; function DoubleTimeNow: double;
/// <summary>
/// Retrieve the delta in milliseconds between two time values.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_delta)</see></para>
/// </remarks>
function CefTimeDelta(const cef_time1, cef_time2: TCefTime): int64; function CefTimeDelta(const cef_time1, cef_time2: TCefTime): int64;
/// <summary>
/// Retrieve the current system time in a TCefBaseTime type.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_basetime_now)</see></para>
/// </remarks>
function CefBaseTimeNow: TCefBaseTime; function CefBaseTimeNow: TCefBaseTime;
/// <summary>
/// Converts TCefTime to TCefBaseTime.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_to_basetime)</see></para>
/// </remarks>
function CetTimeToCefBaseTime(const ct: TCefTime) : TCefBaseTime; function CetTimeToCefBaseTime(const ct: TCefTime) : TCefBaseTime;
/// <summary>
/// Converts TCefBaseTime to TCefTime.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_from_basetime)</see></para>
/// </remarks>
function CetTimeFromCefBaseTime(const cbt: TCefBaseTime) : TCefTime; function CetTimeFromCefBaseTime(const cbt: TCefBaseTime) : TCefTime;
/// <summary>
/// Converts TCefBaseTime to TDateTime.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_time.h">CEF source file: /include/internal/cef_time.h (cef_time_from_basetime)</see></para>
/// </remarks>
function CefBaseTimeToDateTime(const cbt: TCefBaseTime) : TDateTime; function CefBaseTimeToDateTime(const cbt: TCefBaseTime) : TDateTime;
/// <summary>
/// Returns the time interval between now and from_ in milliseconds.
/// This funcion should only be used by TCEFTimerWorkScheduler.
/// </summary>
function GetTimeIntervalMilliseconds(const from_: TCefTime): integer; function GetTimeIntervalMilliseconds(const from_: TCefTime): integer;
/// <summary>
/// Initialize a TCefTime variable.
/// </summary>
procedure InitializeCefTime(var aTime : TCefTime); procedure InitializeCefTime(var aTime : TCefTime);
function cef_string_wide_copy(const src: PWideChar; src_len: NativeUInt; output: PCefStringWide): Integer; function cef_string_wide_copy(const src: PWideChar; src_len: NativeUInt; output: PCefStringWide): Integer;
@ -168,34 +340,249 @@ const
{$ENDIF} {$ENDIF}
/// <summary>
/// Returns true if aPath is a relative path.
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisrelativew">See the PathIsRelativeW article.</see></para>
/// </remarks>
function CustomPathIsRelative(const aPath : string) : boolean; function CustomPathIsRelative(const aPath : string) : boolean;
/// <summary>
/// Simplifies a path by removing navigation elements such as "." and ".." to produce a direct, well-formed path.
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathcanonicalizew">See the PathCanonicalizeW article.</see></para>
/// </remarks>
function CustomPathCanonicalize(const aOriginalPath : string; var aCanonicalPath : string) : boolean; function CustomPathCanonicalize(const aOriginalPath : string; var aCanonicalPath : string) : boolean;
/// <summary>
/// Returns the absolute path version of aPath.
/// </summary>
function CustomAbsolutePath(const aPath : string; aMustExist : boolean = False) : string; function CustomAbsolutePath(const aPath : string; aMustExist : boolean = False) : string;
/// <summary>
/// Tests aPath to determine if it conforms to a valid URL format.
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisurlw">See the PathIsURLW article.</see></para>
/// </remarks>
function CustomPathIsURL(const aPath : string) : boolean; function CustomPathIsURL(const aPath : string) : boolean;
/// <summary>
/// Determines if aPath is a valid Universal Naming Convention (UNC) path, as opposed to a path based on a drive letter.
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-pathisuncw">See the PathIsUNCW article.</see></para>
/// </remarks>
function CustomPathIsUNC(const aPath : string) : boolean; function CustomPathIsUNC(const aPath : string) : boolean;
/// <summary>
/// Retrieves the fully qualified path for the current module.
/// </summary>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew">See the GetModuleFileNameW article.</see></para>
/// </remarks>
function GetModulePath : string; function GetModulePath : string;
/// <summary>
/// Returns true (1) if the certificate status represents an error.
/// </summary>
function CefIsCertStatusError(Status : TCefCertStatus) : boolean; function CefIsCertStatusError(Status : TCefCertStatus) : boolean;
/// <summary>
/// Crash reporting is configured using an INI-style config file named
/// "crash_reporter.cfg". On Windows and Linux this file must be placed next to
/// the main application executable. On macOS this file must be placed in the
/// top-level app bundle Resources directory (e.g.
/// "<appname>.app/Contents/Resources"). File contents are as follows:
///
/// <pre>
/// # Comments start with a hash character and must be on their own line.
///
/// [Config]
/// ProductName=<Value of the "prod" crash key; defaults to "cef">
/// ProductVersion=<Value of the "ver" crash key; defaults to the CEF version>
/// AppName=<Windows only; App-specific folder name component for storing crash
/// information; default to "CEF">
/// ExternalHandler=<Windows only; Name of the external handler exe to use
/// instead of re-launching the main exe; default to empty>
/// BrowserCrashForwardingEnabled=<macOS only; True if browser process crashes
/// should be forwarded to the system crash
/// reporter; default to false>
/// ServerURL=<crash server URL; default to empty>
/// RateLimitEnabled=<True if uploads should be rate limited; default to true>
/// MaxUploadsPerDay=<Max uploads per 24 hours, used if rate limit is enabled;
/// default to 5>
/// MaxDatabaseSizeInMb=<Total crash report disk usage greater than this value
/// will cause older reports to be deleted; default to 20>
/// MaxDatabaseAgeInDays=<Crash reports older than this value will be deleted;
/// default to 5>
///
/// [CrashKeys]
/// my_key1=<small|medium|large>
/// my_key2=<small|medium|large>
/// </pre>
///
/// <b>Config section:</b>
///
/// If "ProductName" and/or "ProductVersion" are set then the specified values
/// will be included in the crash dump metadata. On macOS if these values are
/// set to NULL then they will be retrieved from the Info.plist file using the
/// "CFBundleName" and "CFBundleShortVersionString" keys respectively.
///
/// If "AppName" is set on Windows then crash report information (metrics,
/// database and dumps) will be stored locally on disk under the
/// "C:\Users\[CurrentUser]\AppData\Local\[AppName]\User Data" folder. On other
/// platforms the cef_settings_t.root_cache_path value will be used.
///
/// If "ExternalHandler" is set on Windows then the specified exe will be
/// launched as the crashpad-handler instead of re-launching the main process
/// exe. The value can be an absolute path or a path relative to the main exe
/// directory. On Linux the cef_settings_t.browser_subprocess_path value will be
/// used. On macOS the existing subprocess app bundle will be used.
///
/// If "BrowserCrashForwardingEnabled" is set to true (1) on macOS then browser
/// process crashes will be forwarded to the system crash reporter. This results
/// in the crash UI dialog being displayed to the user and crash reports being
/// logged under "~/Library/Logs/DiagnosticReports". Forwarding of crash reports
/// from non-browser processes and Debug builds is always disabled.
///
/// If "ServerURL" is set then crashes will be uploaded as a multi-part POST
/// request to the specified URL. Otherwise, reports will only be stored locally
/// on disk.
///
/// If "RateLimitEnabled" is set to true (1) then crash report uploads will be
/// rate limited as follows:
/// 1. If "MaxUploadsPerDay" is set to a positive value then at most the
/// specified number of crashes will be uploaded in each 24 hour period.
/// 2. If crash upload fails due to a network or server error then an
/// incremental backoff delay up to a maximum of 24 hours will be applied
/// for retries.
/// 3. If a backoff delay is applied and "MaxUploadsPerDay" is > 1 then the
/// "MaxUploadsPerDay" value will be reduced to 1 until the client is
/// restarted. This helps to avoid an upload flood when the network or
/// server error is resolved.
/// Rate limiting is not supported on Linux.
///
/// If "MaxDatabaseSizeInMb" is set to a positive value then crash report
/// storage on disk will be limited to that size in megabytes. For example, on
/// Windows each dump is about 600KB so a "MaxDatabaseSizeInMb" value of 20
/// equates to about 34 crash reports stored on disk. Not supported on Linux.
///
/// If "MaxDatabaseAgeInDays" is set to a positive value then crash reports
/// older than the specified age in days will be deleted. Not supported on
/// Linux.
///
/// <b>CrashKeys section:</b>
///
/// A maximum of 26 crash keys of each size can be specified for use by the
/// application. Crash key values will be truncated based on the specified size
/// (small = 64 bytes, medium = 256 bytes, large = 1024 bytes). The value of
/// crash keys can be set from any thread or process using the
/// CefSetCrashKeyValue function. These key/value pairs will be sent to the
/// crash server along with the crash dump file.
/// </summary>
function CefCrashReportingEnabled : boolean; function CefCrashReportingEnabled : boolean;
/// <summary>
/// Sets or clears a specific key-value pair from the crash metadata.
/// </summary>
procedure CefSetCrashKeyValue(const aKey, aValue : ustring); procedure CefSetCrashKeyValue(const aKey, aValue : ustring);
/// <summary> /// <summary>
/// Add a log message. See the LogSeverity defines for supported |severity| /// Add a log message. See the LogSeverity defines for supported |severity|
/// values. /// values.
/// </summary> /// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/base/cef_logging.h">CEF source file: /include/base/cef_logging.h (cef_log)</see></para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/base/cef_logging.h">CEF source file: /include/base/cef_logging.h (LogSeverity)</see></para>
/// </remarks>
procedure CefLog(const aFile : string; aLine, aSeverity : integer; const aMessage : string); procedure CefLog(const aFile : string; aLine, aSeverity : integer; const aMessage : string);
procedure CefDebugLog(const aMessage : string; aSeverity : integer = CEF_LOG_SEVERITY_ERROR); procedure CefDebugLog(const aMessage : string; aSeverity : integer = CEF_LOG_SEVERITY_ERROR);
procedure CefKeyEventLog(const aEvent : TCefKeyEvent); procedure CefKeyEventLog(const aEvent : TCefKeyEvent);
procedure CefMouseEventLog(const aEvent : TCefMouseEvent); procedure CefMouseEventLog(const aEvent : TCefMouseEvent);
procedure OutputDebugMessage(const aMessage : string); procedure OutputDebugMessage(const aMessage : string);
function CustomExceptionHandler(const aFunctionName : string; const aException : exception) : boolean; function CustomExceptionHandler(const aFunctionName : string; const aException : exception) : boolean;
/// <summary>
/// Gets the current log verbose level (LogSeverity).
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/base/cef_logging.h">CEF source file: /include/base/cef_logging.h (cef_get_min_log_level)</see></para>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/base/cef_logging.h">CEF source file: /include/base/cef_logging.h (LogSeverity)</see></para>
/// </remarks>
function CefGetMinLogLevel: integer;
/// <summary>
/// Gets the current vlog level for the given file.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/base/cef_logging.h">CEF source file: /include/base/cef_logging.h (cef_get_vlog_level)</see></para>
/// </remarks>
function CefGetVLogLevel(const file_start : string): integer;
/// <summary>
/// Gets the log severity name.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/base/cef_logging.h">CEF source file: /include/base/cef_logging.h (LogSeverity)</see></para>
/// </remarks>
function CefGetLogSeverityName(aSeverity: integer): ustring;
/// <summary>
/// Register a scheme handler factory with the global request context. An NULL
/// |DomainName| value for a standard scheme will cause the factory to match
/// all domain names. The |DomainName| value will be ignored for non-standard
/// schemes. If |SchemeName| is a built-in scheme and no handler is returned by
/// |factory| then the built-in scheme handler factory will be called. If
/// |SchemeName| is a custom scheme then you must also implement the
/// ICefApp.OnRegisterCustomSchemes function in all processes. This
/// function may be called multiple times to change or remove the factory that
/// matches the specified |SchemeName| and optional |DomainName|. Returns
/// false (0) if an error occurs. This function may be called on any thread in
/// the browser process. Using this function is equivalent to calling cef_reques
/// t_context_t::cef_request_context_get_global_context()->register_scheme_handl
/// er_factory().
/// </summary>
function CefRegisterSchemeHandlerFactory(const SchemeName, DomainName : ustring; const handler: TCefResourceHandlerClass = nil): Boolean; function CefRegisterSchemeHandlerFactory(const SchemeName, DomainName : ustring; const handler: TCefResourceHandlerClass = nil): Boolean;
/// <summary>
/// Clear all scheme handler factories registered with the global request
/// context. Returns false (0) on error. This function may be called on any
/// thread in the browser process. Using this function is equivalent to calling
/// cef_request_context_t::cef_request_context_get_global_context()->clear_schem
/// e_handler_factories().
/// </summary>
function CefClearSchemeHandlerFactories : boolean; function CefClearSchemeHandlerFactories : boolean;
/// <summary>
/// <para>Add an entry to the cross-origin access whitelist.</para>
/// <para>The same-origin policy restricts how scripts hosted from different origins
/// (scheme + domain + port) can communicate. By default, scripts can only
/// access resources with the same origin. Scripts hosted on the HTTP and HTTPS
/// schemes (but no other schemes) can use the "Access-Control-Allow-Origin"
/// header to allow cross-origin requests. For example,
/// https://source.example.com can make XMLHttpRequest requests on
/// http://target.example.com if the http://target.example.com request returns
/// an "Access-Control-Allow-Origin: https://source.example.com" response
/// header.</para>
/// <para>Scripts in separate frames or iframes and hosted from the same protocol and
/// domain suffix can execute cross-origin JavaScript if both pages set the
/// document.domain value to the same domain suffix. For example,
/// scheme://foo.example.com and scheme://bar.example.com can communicate using
/// JavaScript if both domains set document.domain="example.com".</para>
/// <para>This function is used to allow access to origins that would otherwise
/// violate the same-origin policy. Scripts hosted underneath the fully
/// qualified |source_origin| URL (like http://www.example.com) will be allowed
/// access to all resources hosted on the specified |target_protocol| and
/// |target_domain|. If |target_domain| is non-NULL and
/// |allow_target_subdomains| is false (0) only exact domain matches will be
/// allowed. If |target_domain| contains a top- level domain component (like
/// "example.com") and |allow_target_subdomains| is true (1) sub-domain matches
/// will be allowed. If |target_domain| is NULL and |allow_target_subdomains| if
/// true (1) all domains and IP addresses will be allowed.</para>
/// <para>This function cannot be used to bypass the restrictions on local or display
/// isolated schemes. See the comments on CefRegisterCustomScheme for more
/// information.</para>
/// <para>This function may be called on any thread. Returns false (0) if
/// |source_origin| is invalid or the whitelist cannot be accessed.</para>
/// </summary>
function CefAddCrossOriginWhitelistEntry(const SourceOrigin, TargetProtocol, TargetDomain: ustring; AllowTargetSubdomains: Boolean): Boolean; function CefAddCrossOriginWhitelistEntry(const SourceOrigin, TargetProtocol, TargetDomain: ustring; AllowTargetSubdomains: Boolean): Boolean;
/// <summary>
/// Remove an entry from the cross-origin access whitelist. Returns false (0) if
/// |source_origin| is invalid or the whitelist cannot be accessed.
/// </summary>
function CefRemoveCrossOriginWhitelistEntry(const SourceOrigin, TargetProtocol, TargetDomain: ustring; AllowTargetSubdomains: Boolean): Boolean; function CefRemoveCrossOriginWhitelistEntry(const SourceOrigin, TargetProtocol, TargetDomain: ustring; AllowTargetSubdomains: Boolean): Boolean;
/// <summary>
/// Remove all entries from the cross-origin access whitelist. Returns false (0)
/// if the whitelist cannot be accessed.
/// </summary>
function CefClearCrossOriginWhitelist: Boolean; function CefClearCrossOriginWhitelist: Boolean;
procedure UInt64ToFileVersionInfo(const aVersion : uint64; var aVersionInfo : TFileVersionInfo); procedure UInt64ToFileVersionInfo(const aVersion : uint64; var aVersionInfo : TFileVersionInfo);
@ -223,29 +610,142 @@ function FileVersionInfoToString(const aVersionInfo : TFileVersionInfo) : string
function CheckFilesExist(var aList : TStringList; var aMissingFiles : string) : boolean; function CheckFilesExist(var aList : TStringList; var aMissingFiles : string) : boolean;
function Is32BitProcess : boolean; function Is32BitProcess : boolean;
/// <summary>
/// Combines specified |base_url| and |relative_url| into a ustring.
/// </summary>
function CefResolveUrl(const base_url, relative_url: ustring): ustring; function CefResolveUrl(const base_url, relative_url: ustring): ustring;
/// <summary>
/// Parse the specified |url| into its component parts. Returns false (0) if the
/// URL is invalid.
/// </summary>
function CefParseUrl(const url: ustring; var parts: TUrlParts): Boolean; function CefParseUrl(const url: ustring; var parts: TUrlParts): Boolean;
/// <summary>
/// Creates a URL from the specified |parts|, which must contain a non-NULL spec
/// or a non-NULL host and path (at a minimum), but not both.
/// </summary>
function CefCreateUrl(var parts: TUrlParts): ustring; function CefCreateUrl(var parts: TUrlParts): ustring;
/// <summary>
/// This is a convenience function for formatting a URL in a concise and human-
/// friendly way to help users make security-related decisions (or in other
/// circumstances when people need to distinguish sites, origins, or otherwise-
/// simplified URLs from each other). Internationalized domain names (IDN) may
/// be presented in Unicode if the conversion is considered safe. The returned
/// value will (a) omit the path for standard schemes, excepting file and
/// filesystem, and (b) omit the port if it is the default for the scheme. Do
/// not use this for URLs which will be parsed or sent to other applications.
/// </summary>
function CefFormatUrlForSecurityDisplay(const originUrl: string): string; function CefFormatUrlForSecurityDisplay(const originUrl: string): string;
/// <summary>
/// Returns the mime type for the specified file extension or an NULL string if
/// unknown.
/// </summary>
function CefGetMimeType(const extension: ustring): ustring; function CefGetMimeType(const extension: ustring): ustring;
/// <summary>
/// Get the extensions associated with the given mime type. This should be
/// passed in lower case. There could be multiple extensions for a given mime
/// type, like "html,htm" for "text/html", or "txt,text,html,..." for "text/*".
/// Any existing elements in the provided vector will not be erased.
/// </summary>
procedure CefGetExtensionsForMimeType(const mimeType: ustring; var extensions: TStringList); procedure CefGetExtensionsForMimeType(const mimeType: ustring; var extensions: TStringList);
/// <summary>
/// Encodes |data| as a base64 string.
/// </summary>
function CefBase64Encode(const data: Pointer; dataSize: NativeUInt): ustring; function CefBase64Encode(const data: Pointer; dataSize: NativeUInt): ustring;
/// <summary>
/// Decodes the base64 encoded string |data|. The returned value will be NULL if
/// the decoding fails.
/// </summary>
function CefBase64Decode(const data: ustring): ICefBinaryValue; function CefBase64Decode(const data: ustring): ICefBinaryValue;
/// <summary>
/// Escapes characters in |text| which are unsuitable for use as a query
/// parameter value. Everything except alphanumerics and -_.!~*'() will be
/// converted to "%XX". If |use_plus| is true (1) spaces will change to "+". The
/// result is basically the same as encodeURIComponent in Javacript.
/// </summary>
function CefUriEncode(const text: ustring; usePlus: Boolean): ustring; function CefUriEncode(const text: ustring; usePlus: Boolean): ustring;
/// <summary>
/// Unescapes |text| and returns the result. Unescaping consists of looking for
/// the exact pattern "%XX" where each X is a hex digit and converting to the
/// character with the numerical value of those digits (e.g. "i%20=%203%3b"
/// unescapes to "i = 3;"). If |convert_to_utf8| is true (1) this function will
/// attempt to interpret the initial decoded result as UTF-8. If the result is
/// convertable into UTF-8 it will be returned as converted. Otherwise the
/// initial decoded result will be returned. The |unescape_rule| parameter
/// supports further customization the decoding process.
/// </summary>
function CefUriDecode(const text: ustring; convertToUtf8: Boolean; unescapeRule: TCefUriUnescapeRule): ustring; function CefUriDecode(const text: ustring; convertToUtf8: Boolean; unescapeRule: TCefUriUnescapeRule): ustring;
/// <summary>
/// Retrieve the path associated with the specified |aPathKey|.
/// Can be called on any thread in the browser process.
/// </summary>
function CefGetPath(const aPathKey : TCefPathKey) : ustring; function CefGetPath(const aPathKey : TCefPathKey) : ustring;
/// <summary>
/// Returns true (1) if the application text direction is right-to-left.
/// </summary>
function CefIsRTL : boolean; function CefIsRTL : boolean;
/// <summary>
/// Creates a directory and all parent directories if they don't already exist.
/// Returns true (1) on successful creation or if the directory already exists.
/// The directory is only readable by the current user. Calling this function on
/// the browser process UI or IO threads is not allowed.
/// </summary>
function CefCreateDirectory(const fullPath: ustring): Boolean; function CefCreateDirectory(const fullPath: ustring): Boolean;
/// <summary>
/// Get the temporary directory provided by the system.
/// WARNING: In general, you should use the temp directory variants below
/// instead of this function. Those variants will ensure that the proper
/// permissions are set so that other users on the system can't edit them while
/// they're open (which could lead to security issues).
/// </summary>
function CefGetTempDirectory(out tempDir: ustring): Boolean; function CefGetTempDirectory(out tempDir: ustring): Boolean;
/// <summary>
/// Creates a new directory. On Windows if |prefix| is provided the new
/// directory name is in the format of "prefixyyyy". Returns true (1) on success
/// and sets |newTempPath| to the full path of the directory that was created.
/// The directory is only readable by the current user. Calling this function on
/// the browser process UI or IO threads is not allowed.
/// </summary>
function CefCreateNewTempDirectory(const prefix: ustring; out newTempPath: ustring): Boolean; function CefCreateNewTempDirectory(const prefix: ustring; out newTempPath: ustring): Boolean;
/// <summary>
/// Creates a directory within another directory. Extra characters will be
/// appended to |prefix| to ensure that the new directory does not have the same
/// name as an existing directory. Returns true (1) on success and sets
/// |newDir| to the full path of the directory that was created. The directory
/// is only readable by the current user. Calling this function on the browser
/// process UI or IO threads is not allowed.
/// </summary>
function CefCreateTempDirectoryInDirectory(const baseDir, prefix: ustring; out newDir: ustring): Boolean; function CefCreateTempDirectoryInDirectory(const baseDir, prefix: ustring; out newDir: ustring): Boolean;
/// <summary>
/// Returns true (1) if the given path exists and is a directory. Calling this
/// function on the browser process UI or IO threads is not allowed.
/// </summary>
function CefDirectoryExists(const path: ustring): Boolean; function CefDirectoryExists(const path: ustring): Boolean;
/// <summary>
/// Deletes the given path whether it's a file or a directory. If |path| is a
/// directory all contents will be deleted. If |recursive| is true (1) any sub-
/// directories and their contents will also be deleted (equivalent to executing
/// "rm -rf", so use with caution). On POSIX environments if |path| is a
/// symbolic link then only the symlink will be deleted. Returns true (1) on
/// successful deletion or if |path| does not exist. Calling this function on
/// the browser process UI or IO threads is not allowed.
/// </summary>
function CefDeleteFile(const path: ustring; recursive: Boolean): Boolean; function CefDeleteFile(const path: ustring; recursive: Boolean): Boolean;
/// <summary>
/// Writes the contents of |srcDir| into a zip archive at |destFile|. If
/// |includeHiddenFiles| is true (1) files starting with "." will be included.
/// Returns true (1) on success. Calling this function on the browser process
/// UI or IO threads is not allowed.
/// </summary>
function CefZipDirectory(const srcDir, destFile: ustring; includeHiddenFiles: Boolean): Boolean; function CefZipDirectory(const srcDir, destFile: ustring; includeHiddenFiles: Boolean): Boolean;
/// <summary>
/// Loads the existing "Certificate Revocation Lists" file that is managed by
/// Google Chrome. This file can generally be found in Chrome's User Data
/// directory (e.g. "C:\Users\[User]\AppData\Local\Google\Chrome\User Data\" on
/// Windows) and is updated periodically by Chrome's component updater service.
/// Must be called in the browser process after the context has been
/// initialized. See https://dev.chromium.org/Home/chromium-security/crlsets for
/// background.
/// </summary>
procedure CefLoadCRLSetsFile(const path : ustring); procedure CefLoadCRLSetsFile(const path : ustring);
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
@ -284,8 +784,13 @@ function GetDeviceScaleFactor : single;
function DeleteDirContents(const aDirectory : string; const aExcludeFiles : TStringList = nil) : boolean; function DeleteDirContents(const aDirectory : string; const aExcludeFiles : TStringList = nil) : boolean;
function DeleteFileList(const aFileList : TStringList) : boolean; function DeleteFileList(const aFileList : TStringList) : boolean;
function MoveFileList(const aFileList : TStringList; const aSrcDirectory, aDstDirectory : string) : boolean; function MoveFileList(const aFileList : TStringList; const aSrcDirectory, aDstDirectory : string) : boolean;
/// <summary>
/// Returns a URI with a DATA scheme using |aString| as the URI's data.
/// </summary>
function CefGetDataURI(const aString, aMimeType : ustring) : ustring; overload; function CefGetDataURI(const aString, aMimeType : ustring) : ustring; overload;
/// <summary>
/// Returns a URI with a DATA scheme encoding |aData| as a base64 string.
/// </summary>
function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustring; const aCharset : ustring = '') : ustring; overload; function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustring; const aCharset : ustring = '') : ustring; overload;
function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean; function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean;
@ -976,6 +1481,39 @@ begin
end; end;
end; end;
function CefGetMinLogLevel: integer;
begin
if (GlobalCEFApp <> nil) and GlobalCEFApp.LibLoaded then
Result := cef_get_min_log_level()
else
Result := 0;
end;
function CefGetVLogLevel(const file_start : string): integer;
var
TempFile : AnsiString;
begin
if (GlobalCEFApp <> nil) and GlobalCEFApp.LibLoaded and (length(file_start) > 0) then
begin
TempFile := AnsiString(file_start + #0);
Result := cef_get_vlog_level(@TempFile[1], length(file_start) + 1);
end
else
Result := 0;
end;
function CefGetLogSeverityName(aSeverity: integer): ustring;
begin
case aSeverity of
CEF_LOG_SEVERITY_VERBOSE : Result := 'VERBOSE';
CEF_LOG_SEVERITY_INFO : Result := 'INFO';
CEF_LOG_SEVERITY_WARNING : Result := 'WARNING';
CEF_LOG_SEVERITY_ERROR : Result := 'ERROR';
CEF_LOG_SEVERITY_FATAL : Result := 'FATAL';
else Result := 'UNKNOWN';
end;
end;
procedure CefDebugLog(const aMessage : string; aSeverity : integer); procedure CefDebugLog(const aMessage : string; aSeverity : integer);
const const
DEFAULT_LINE = 1; DEFAULT_LINE = 1;

View File

@ -16,16 +16,27 @@ uses
type type
TCefTaskRunnerRef = class(TCefBaseRefCountedRef, ICefTaskRunner) TCefTaskRunnerRef = class(TCefBaseRefCountedRef, ICefTaskRunner)
protected protected
function IsSame(const that: ICefTaskRunner): Boolean; function IsSame(const that: ICefTaskRunner): Boolean;
function BelongsToCurrentThread: Boolean; function BelongsToCurrentThread: Boolean;
function BelongsToThread(threadId: TCefThreadId): Boolean; function BelongsToThread(threadId: TCefThreadId): Boolean;
function PostTask(const task: ICefTask): Boolean; function PostTask(const task: ICefTask): Boolean;
function PostDelayedTask(const task: ICefTask; delayMs: Int64): Boolean; function PostDelayedTask(const task: ICefTask; delayMs: Int64): Boolean;
public public
class function UnWrap(data: Pointer): ICefTaskRunner; /// <summary>
class function GetForCurrentThread: ICefTaskRunner; /// Returns a ICefTaskRunner instance using a PCefTaskRunner data pointer.
class function GetForThread(threadId: TCefThreadId): ICefTaskRunner; /// </summary>
class function UnWrap(data: Pointer): ICefTaskRunner;
/// <summary>
/// Returns the task runner for the current thread. Only CEF threads will have
/// task runners. An NULL reference will be returned if this function is called
/// on an invalid thread.
/// </summary>
class function GetForCurrentThread: ICefTaskRunner;
/// <summary>
/// Returns the task runner for the specified CEF thread.
/// </summary>
class function GetForThread(threadId: TCefThreadId): ICefTaskRunner;
end; end;
implementation implementation

View File

@ -1544,6 +1544,49 @@ type
DOM_NODE_TYPE_DOCUMENT_FRAGMENT DOM_NODE_TYPE_DOCUMENT_FRAGMENT
); );
/// <summary>
/// DOM form control types. Should be kept in sync with Chromium's
/// blink::mojom::FormControlType type.
/// </summary>
/// <remarks>
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_dom_form_control_type_t)</see></para>
/// </remarks>
TCefDomFormControlType = (
DOM_FORM_CONTROL_TYPE_UNSUPPORTED = 0,
DOM_FORM_CONTROL_TYPE_BUTTON_BUTTON,
DOM_FORM_CONTROL_TYPE_BUTTON_SUBMIT,
DOM_FORM_CONTROL_TYPE_BUTTON_RESET,
DOM_FORM_CONTROL_TYPE_BUTTON_SELECT_LIST,
DOM_FORM_CONTROL_TYPE_FIELDSET,
DOM_FORM_CONTROL_TYPE_INPUT_BUTTON,
DOM_FORM_CONTROL_TYPE_INPUT_CHECKBOX,
DOM_FORM_CONTROL_TYPE_INPUT_COLOR,
DOM_FORM_CONTROL_TYPE_INPUT_DATE,
DOM_FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL,
DOM_FORM_CONTROL_TYPE_INPUT_EMAIL,
DOM_FORM_CONTROL_TYPE_INPUT_FILE,
DOM_FORM_CONTROL_TYPE_INPUT_HIDDEN,
DOM_FORM_CONTROL_TYPE_INPUT_IMAGE,
DOM_FORM_CONTROL_TYPE_INPUT_MONTH,
DOM_FORM_CONTROL_TYPE_INPUT_NUMBER,
DOM_FORM_CONTROL_TYPE_INPUT_PASSWORD,
DOM_FORM_CONTROL_TYPE_INPUT_RADIO,
DOM_FORM_CONTROL_TYPE_INPUT_RANGE,
DOM_FORM_CONTROL_TYPE_INPUT_RESET,
DOM_FORM_CONTROL_TYPE_INPUT_SEARCH,
DOM_FORM_CONTROL_TYPE_INPUT_SUBMIT,
DOM_FORM_CONTROL_TYPE_INPUT_TELEPHONE,
DOM_FORM_CONTROL_TYPE_INPUT_TEXT,
DOM_FORM_CONTROL_TYPE_INPUT_TIME,
DOM_FORM_CONTROL_TYPE_INPUT_URL,
DOM_FORM_CONTROL_TYPE_INPUT_WEEK,
DOM_FORM_CONTROL_TYPE_OUTPUT,
DOM_FORM_CONTROL_TYPE_SELECT_ONE,
DOM_FORM_CONTROL_TYPE_SELECT_MULTIPLE,
DOM_FORM_CONTROL_TYPE_SELECT_LIST,
DOM_FORM_CONTROL_TYPE_TEXT_AREA
);
/// <summary> /// <summary>
/// Supported context menu media types. These constants match their equivalents /// Supported context menu media types. These constants match their equivalents
/// in Chromium's ContextMenuDataMediaType and should not be renumbered. /// in Chromium's ContextMenuDataMediaType and should not be renumbered.
@ -4220,7 +4263,11 @@ type
/// <summary> /// <summary>
/// Website setting to store permissions metadata granted to paths on the /// Website setting to store permissions metadata granted to paths on the
/// local file system via the File System Access API. /// local file system via the File System Access API.
/// |FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting. /// |FILE_SYSTEM_WRITE_GUARD| is the corresponding "guard" setting. The stored
/// data represents valid permission only if
/// |FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION| is enabled via user opt-in.
/// Otherwise, they represent "recently granted but revoked permission", which
/// are used to restore the permission.
/// </summary> /// </summary>
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA, CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_CHOOSER_DATA,
/// <summary> /// <summary>
@ -4358,6 +4405,13 @@ type
/// `net::features::kTpcdMetadataGrants` is enabled. /// `net::features::kTpcdMetadataGrants` is enabled.
/// </summary> /// </summary>
CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS, CEF_CONTENT_SETTING_TYPE_TPCD_METADATA_GRANTS,
/// <summary>
/// Whether user has opted into keeping file/directory permissions persistent
/// between visits for a given origin. When enabled, permission metadata
/// stored under |FILE_SYSTEM_ACCESS_CHOOSER_DATA| can auto-grant incoming
/// permission request.
/// </summary>
CEF_CONTENT_SETTING_TYPE_FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION,
CEF_CONTENT_SETTING_TYPE_NUM_TYPES CEF_CONTENT_SETTING_TYPE_NUM_TYPES
); );
@ -4674,11 +4728,12 @@ type
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_life_span_handler_capi.h">CEF source file: /include/capi/cef_life_span_handler_capi.h (cef_life_span_handler_t)</see></para> /// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_life_span_handler_capi.h">CEF source file: /include/capi/cef_life_span_handler_capi.h (cef_life_span_handler_t)</see></para>
/// </remarks> /// </remarks>
TCefLifeSpanHandler = record TCefLifeSpanHandler = record
base : TCefBaseRefCounted; base : TCefBaseRefCounted;
on_before_popup : function(self: PCefLifeSpanHandler; browser: PCefBrowser; frame: PCefFrame; const target_url, target_frame_name: PCefString; target_disposition: TCefWindowOpenDisposition; user_gesture: Integer; const popupFeatures: PCefPopupFeatures; windowInfo: PCefWindowInfo; var client: PCefClient; settings: PCefBrowserSettings; var extra_info: PCefDictionaryValue; no_javascript_access: PInteger): Integer; stdcall; on_before_popup : function(self: PCefLifeSpanHandler; browser: PCefBrowser; frame: PCefFrame; const target_url, target_frame_name: PCefString; target_disposition: TCefWindowOpenDisposition; user_gesture: Integer; const popupFeatures: PCefPopupFeatures; windowInfo: PCefWindowInfo; var client: PCefClient; settings: PCefBrowserSettings; var extra_info: PCefDictionaryValue; no_javascript_access: PInteger): Integer; stdcall;
on_after_created : procedure(self: PCefLifeSpanHandler; browser: PCefBrowser); stdcall; on_before_dev_tools_popup : procedure(self: PCefLifeSpanHandler; browser: PCefBrowser; windowInfo: PCefWindowInfo; var client: PCefClient; settings: PCefBrowserSettings; var extra_info: PCefDictionaryValue; use_default_window: PInteger); stdcall;
do_close : function(self: PCefLifeSpanHandler; browser: PCefBrowser): Integer; stdcall; on_after_created : procedure(self: PCefLifeSpanHandler; browser: PCefBrowser); stdcall;
on_before_close : procedure(self: PCefLifeSpanHandler; browser: PCefBrowser); stdcall; do_close : function(self: PCefLifeSpanHandler; browser: PCefBrowser): Integer; stdcall;
on_before_close : procedure(self: PCefLifeSpanHandler; browser: PCefBrowser); stdcall;
end; end;
/// <summary> /// <summary>
@ -6045,14 +6100,15 @@ type
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_values_capi.h">CEF source file: /include/capi/cef_values_capi.h (cef_binary_value_t)</see></para> /// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_values_capi.h">CEF source file: /include/capi/cef_values_capi.h (cef_binary_value_t)</see></para>
/// </remarks> /// </remarks>
TCefBinaryValue = record TCefBinaryValue = record
base : TCefBaseRefCounted; base : TCefBaseRefCounted;
is_valid : function(self: PCefBinaryValue): Integer; stdcall; is_valid : function(self: PCefBinaryValue): Integer; stdcall;
is_owned : function(self: PCefBinaryValue): Integer; stdcall; is_owned : function(self: PCefBinaryValue): Integer; stdcall;
is_same : function(self, that: PCefBinaryValue):Integer; stdcall; is_same : function(self, that: PCefBinaryValue):Integer; stdcall;
is_equal : function(self, that: PCefBinaryValue): Integer; stdcall; is_equal : function(self, that: PCefBinaryValue): Integer; stdcall;
copy : function(self: PCefBinaryValue): PCefBinaryValue; stdcall; copy : function(self: PCefBinaryValue): PCefBinaryValue; stdcall;
get_size : function(self: PCefBinaryValue): NativeUInt; stdcall; get_raw_data : function(self: PCefBinaryValue): Pointer; stdcall;
get_data : function(self: PCefBinaryValue; buffer: Pointer; buffer_size, data_offset: NativeUInt): NativeUInt; stdcall; get_size : function(self: PCefBinaryValue): NativeUInt; stdcall;
get_data : function(self: PCefBinaryValue; buffer: Pointer; buffer_size, data_offset: NativeUInt): NativeUInt; stdcall;
end; end;
/// <summary> /// <summary>
@ -6458,7 +6514,7 @@ type
is_element : function(self: PCefDomNode): Integer; stdcall; is_element : function(self: PCefDomNode): Integer; stdcall;
is_editable : function(self: PCefDomNode): Integer; stdcall; is_editable : function(self: PCefDomNode): Integer; stdcall;
is_form_control_element : function(self: PCefDomNode): Integer; stdcall; is_form_control_element : function(self: PCefDomNode): Integer; stdcall;
get_form_control_element_type : function(self: PCefDomNode): PCefStringUserFree; stdcall; get_form_control_element_type : function(self: PCefDomNode): TCefDomFormControlType; stdcall;
is_same : function(self, that: PCefDomNode): Integer; stdcall; is_same : function(self, that: PCefDomNode): Integer; stdcall;
get_name : function(self: PCefDomNode): PCefStringUserFree; stdcall; get_name : function(self: PCefDomNode): PCefStringUserFree; stdcall;
get_value : function(self: PCefDomNode): PCefStringUserFree; stdcall; get_value : function(self: PCefDomNode): PCefStringUserFree; stdcall;
@ -6612,6 +6668,8 @@ type
get_array_length : function(self: PCefv8Value): Integer; stdcall; get_array_length : function(self: PCefv8Value): Integer; stdcall;
get_array_buffer_release_callback : function(self: PCefv8Value): PCefv8ArrayBufferReleaseCallback; stdcall; get_array_buffer_release_callback : function(self: PCefv8Value): PCefv8ArrayBufferReleaseCallback; stdcall;
neuter_array_buffer : function(self: PCefv8Value): Integer; stdcall; neuter_array_buffer : function(self: PCefv8Value): Integer; stdcall;
get_array_buffer_byte_length : function(self: PCefv8Value): NativeUInt; stdcall;
get_array_buffer_data : function(self: PCefv8Value): Pointer; stdcall;
get_function_name : function(self: PCefv8Value): PCefStringUserFree; stdcall; get_function_name : function(self: PCefv8Value): PCefStringUserFree; stdcall;
get_function_handler : function(self: PCefv8Value): PCefv8Handler; stdcall; get_function_handler : function(self: PCefv8Value): PCefv8Handler; stdcall;
execute_function : function(self: PCefv8Value; obj: PCefv8Value; argumentsCount: NativeUInt; const arguments: PPCefV8Value): PCefv8Value; stdcall; execute_function : function(self: PCefv8Value; obj: PCefv8Value; argumentsCount: NativeUInt; const arguments: PPCefV8Value): PCefv8Value; stdcall;
@ -6961,6 +7019,8 @@ type
is_audio_muted : function(self: PCefBrowserHost): integer; stdcall; is_audio_muted : function(self: PCefBrowserHost): integer; stdcall;
is_fullscreen : function(self: PCefBrowserHost): integer; stdcall; is_fullscreen : function(self: PCefBrowserHost): integer; stdcall;
exit_fullscreen : procedure(self: PCefBrowserHost; will_cause_resize: 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;
end; end;
/// <summary> /// <summary>
@ -7632,7 +7692,7 @@ type
send_key_press : procedure(self: PCefWindow; key_code: Integer; event_flags: cardinal); stdcall; send_key_press : procedure(self: PCefWindow; key_code: Integer; event_flags: cardinal); stdcall;
send_mouse_move : procedure(self: PCefWindow; screen_x, screen_y: Integer); stdcall; send_mouse_move : procedure(self: PCefWindow; screen_x, screen_y: Integer); stdcall;
send_mouse_events : procedure(self: PCefWindow; button: TCefMouseButtonType; mouse_down, mouse_up: Integer); stdcall; send_mouse_events : procedure(self: PCefWindow; button: TCefMouseButtonType; mouse_down, mouse_up: Integer); stdcall;
set_accelerator : procedure(self: PCefWindow; command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed: Integer); stdcall; set_accelerator : procedure(self: PCefWindow; command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed, high_priority: Integer); stdcall;
remove_accelerator : procedure(self: PCefWindow; command_id: Integer); stdcall; remove_accelerator : procedure(self: PCefWindow; command_id: Integer); stdcall;
remove_all_accelerators : procedure(self: PCefWindow); stdcall; remove_all_accelerators : procedure(self: PCefWindow); stdcall;
end; end;

View File

@ -1,9 +1,9 @@
CEF_SUPPORTED_VERSION_MAJOR = 118; CEF_SUPPORTED_VERSION_MAJOR = 119;
CEF_SUPPORTED_VERSION_MINOR = 7; CEF_SUPPORTED_VERSION_MINOR = 4;
CEF_SUPPORTED_VERSION_RELEASE = 1; CEF_SUPPORTED_VERSION_RELEASE = 3;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR; CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR;
CEF_CHROMEELF_VERSION_MINOR = 0; CEF_CHROMEELF_VERSION_MINOR = 0;
CEF_CHROMEELF_VERSION_RELEASE = 5993; CEF_CHROMEELF_VERSION_RELEASE = 6045;
CEF_CHROMEELF_VERSION_BUILD = 119; CEF_CHROMEELF_VERSION_BUILD = 159;

View File

@ -171,12 +171,12 @@ type
function GetWindowAppIcon : ICefImage; function GetWindowAppIcon : ICefImage;
/// <summary> /// <summary>
/// Add a View that will be overlayed on the Window contents with absolute /// <para>Add a View that will be overlayed on the Window contents with absolute
/// positioning and high z-order. Positioning is controlled by |docking_mode| /// positioning and high z-order. Positioning is controlled by |docking_mode|
/// as described below. The returned cef_overlay_controller_t object is used /// as described below. The returned cef_overlay_controller_t object is used
/// to control the overlay. Overlays are hidden by default. /// to control the overlay. Overlays are hidden by default.</para>
/// /// <para>With CEF_DOCKING_MODE_CUSTOM:</para>
/// With CEF_DOCKING_MODE_CUSTOM: /// <code>
/// 1. The overlay is initially hidden, sized to |view|'s preferred size, /// 1. The overlay is initially hidden, sized to |view|'s preferred size,
/// and positioned in the top-left corner. /// and positioned in the top-left corner.
/// 2. Optionally change the overlay position and/or size by calling /// 2. Optionally change the overlay position and/or size by calling
@ -186,18 +186,19 @@ type
/// changes. Optionally change the overlay position and/or size when /// changes. Optionally change the overlay position and/or size when
/// OnLayoutChanged is called on the Window's delegate to indicate a /// OnLayoutChanged is called on the Window's delegate to indicate a
/// change in Window bounds. /// change in Window bounds.
/// /// </code>
/// With other docking modes: /// <para>With other docking modes:</para>
/// <code>
/// 1. The overlay is initially hidden, sized to |view|'s preferred size, /// 1. The overlay is initially hidden, sized to |view|'s preferred size,
/// and positioned based on |docking_mode|. /// and positioned based on |docking_mode|.
/// 2. Call CefOverlayController::SetVisible(true) to show the overlay. /// 2. Call CefOverlayController::SetVisible(true) to show the overlay.
/// 3. The overlay will be automatically re-sized if |view|'s layout changes /// 3. The overlay will be automatically re-sized if |view|'s layout changes
/// and re-positioned as appropriate when the Window resizes. /// and re-positioned as appropriate when the Window resizes.
/// /// </code>
/// Overlays created by this function will receive a higher z-order then any /// <para>Overlays created by this function will receive a higher z-order then any
/// child Views added previously. It is therefore recommended to call this /// child Views added previously. It is therefore recommended to call this
/// function last after all other child Views have been added so that the /// function last after all other child Views have been added so that the
/// overlay displays as the top-most child of the Window. /// overlay displays as the top-most child of the Window.</para>
/// </summary> /// </summary>
function AddOverlayView(const view: ICefView; docking_mode: TCefDockingMode): ICefOverlayController; function AddOverlayView(const view: ICefView; docking_mode: TCefDockingMode): ICefOverlayController;
@ -266,12 +267,19 @@ type
procedure SendMouseEvents(button: TCefMouseButtonType; mouse_down, mouse_up: boolean); procedure SendMouseEvents(button: TCefMouseButtonType; mouse_down, mouse_up: boolean);
/// <summary> /// <summary>
/// Set the keyboard accelerator for the specified |command_id|. |key_code| /// <para>Set the keyboard accelerator for the specified |command_id|. |key_code|
/// can be any virtual key or character value. /// can be any virtual key or character value. Required modifier keys are
/// cef_window_delegate_t::OnAccelerator will be called if the keyboard /// specified by |shift_pressed|, |ctrl_pressed| and/or |alt_pressed|.
/// combination is triggered while this window has focus. /// ICefWindowDelegate.OnAccelerator will be called if the keyboard
/// combination is triggered while this window has focus.</para>
/// <para>The |high_priority| value will be considered if a child ICefBrowserView
/// has focus when the keyboard combination is triggered. If |high_priority|
/// is true (1) then the key event will not be forwarded to the web content
/// (`keydown` event handler) or ICefKeyboardHandler first. If
/// |high_priority| is false (0) then the behavior will depend on the
/// ICefBrowserView.SetPreferAccelerators configuration.</para>
/// </summary> /// </summary>
procedure SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed: boolean); procedure SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed, high_priority: boolean);
/// <summary> /// <summary>
/// Remove the keyboard accelerator for the specified |command_id|. /// Remove the keyboard accelerator for the specified |command_id|.
@ -493,14 +501,16 @@ procedure TCefWindowRef.SetAccelerator(command_id : Integer;
key_code : Integer; key_code : Integer;
shift_pressed : boolean; shift_pressed : boolean;
ctrl_pressed : boolean; ctrl_pressed : boolean;
alt_pressed : boolean); alt_pressed : boolean;
high_priority : boolean);
begin begin
PCefWindow(FData)^.set_accelerator(PCefWindow(FData), PCefWindow(FData)^.set_accelerator(PCefWindow(FData),
command_id, command_id,
key_code, key_code,
ord(shift_pressed), ord(shift_pressed),
ord(ctrl_pressed), ord(ctrl_pressed),
ord(alt_pressed)); ord(alt_pressed),
ord(high_priority));
end; end;
procedure TCefWindowRef.RemoveAccelerator(command_id: Integer); procedure TCefWindowRef.RemoveAccelerator(command_id: Integer);

View File

@ -112,12 +112,12 @@ type
/// <summary> /// <summary>
/// Show the Window as a browser modal dialog relative to |browser_view|. A /// Show the Window as a browser modal dialog relative to |browser_view|. A
/// parent Window must be returned via /// parent Window must be returned via
/// cef_window_delegate_t::get_parent_window() and |browser_view| must belong /// ICefWindowDelegate.OnGetParentWindow and |browser_view| must belong
/// to that parent Window. While this Window is visible, |browser_view| will /// to that parent Window. While this Window is visible, |browser_view| will
/// be disabled while other controls in the parent Window remain enabled. /// be disabled while other controls in the parent Window remain enabled.
/// Navigating or destroying the |browser_view| will close this Window /// Navigating or destroying the |browser_view| will close this Window
/// automatically. Alternately, use show() and return true (1) from /// automatically. Alternately, use show() and return true (1) from
/// cef_window_delegate_t::is_window_modal_dialog() for a window modal dialog /// ICefWindowDelegate.OnIsWindowModalDialog for a window modal dialog
/// where all controls in the parent Window are disabled. /// where all controls in the parent Window are disabled.
/// </summary> /// </summary>
procedure ShowAsBrowserModalDialog(const browser_view: ICefBrowserView); procedure ShowAsBrowserModalDialog(const browser_view: ICefBrowserView);
@ -229,12 +229,19 @@ type
/// </summary> /// </summary>
procedure SendMouseEvents(button: TCefMouseButtonType; mouse_down, mouse_up: boolean); procedure SendMouseEvents(button: TCefMouseButtonType; mouse_down, mouse_up: boolean);
/// <summary> /// <summary>
/// Set the keyboard accelerator for the specified |command_id|. |key_code| /// <para>Set the keyboard accelerator for the specified |command_id|. |key_code|
/// can be any virtual key or character value. /// can be any virtual key or character value. Required modifier keys are
/// cef_window_delegate_t::OnAccelerator will be called if the keyboard /// specified by |shift_pressed|, |ctrl_pressed| and/or |alt_pressed|.
/// combination is triggered while this window has focus. /// ICefWindowDelegate.OnAccelerator will be called if the keyboard
/// combination is triggered while this window has focus.</para>
/// <para>The |high_priority| value will be considered if a child ICefBrowserView
/// has focus when the keyboard combination is triggered. If |high_priority|
/// is true (1) then the key event will not be forwarded to the web content
/// (`keydown` event handler) or ICefKeyboardHandler first. If
/// |high_priority| is false (0) then the behavior will depend on the
/// ICefBrowserView.SetPreferAccelerators configuration.</para>
/// </summary> /// </summary>
procedure SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed: boolean); procedure SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed, high_priority: boolean);
/// <summary> /// <summary>
/// Remove the keyboard accelerator for the specified |command_id|. /// Remove the keyboard accelerator for the specified |command_id|.
/// </summary> /// </summary>
@ -855,9 +862,9 @@ begin
if Initialized then FWindow.SendMouseEvents(button, mouse_down, mouse_up); if Initialized then FWindow.SendMouseEvents(button, mouse_down, mouse_up);
end; end;
procedure TCEFWindowComponent.SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed: boolean); procedure TCEFWindowComponent.SetAccelerator(command_id, key_code : Integer; shift_pressed, ctrl_pressed, alt_pressed, high_priority: boolean);
begin begin
if Initialized then FWindow.SetAccelerator(command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed); if Initialized then FWindow.SetAccelerator(command_id, key_code, shift_pressed, ctrl_pressed, alt_pressed, high_priority);
end; end;
procedure TCEFWindowComponent.RemoveAccelerator(command_id: Integer); procedure TCEFWindowComponent.RemoveAccelerator(command_id: Integer);

View File

@ -65,7 +65,9 @@ type
function AdjustExternallyAllocatedMemory(changeInBytes: Integer): Integer; function AdjustExternallyAllocatedMemory(changeInBytes: Integer): Integer;
function GetArrayLength: Integer; function GetArrayLength: Integer;
function GetArrayBufferReleaseCallback : ICefv8ArrayBufferReleaseCallback; function GetArrayBufferReleaseCallback : ICefv8ArrayBufferReleaseCallback;
function NeuterArrayBuffer : boolean; function NeuterArrayBuffer: boolean;
function GetArrayBufferByteLength: NativeUInt;
function GetArrayBufferData: Pointer;
function GetFunctionName: ustring; function GetFunctionName: ustring;
function GetFunctionHandler: ICefv8Handler; function GetFunctionHandler: ICefv8Handler;
function ExecuteFunction(const obj: ICefv8Value; const arguments: TCefv8ValueArray): ICefv8Value; function ExecuteFunction(const obj: ICefv8Value; const arguments: TCefv8ValueArray): ICefv8Value;
@ -74,25 +76,99 @@ type
function RejectPromise(const errorMsg: ustring): boolean; function RejectPromise(const errorMsg: ustring): boolean;
public public
/// <summary>
/// Returns a ICefv8Value instance using a PCefv8Value data pointer.
/// </summary>
class function UnWrap(data: Pointer): ICefv8Value; class function UnWrap(data: Pointer): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type undefined.
/// </summary>
class function NewUndefined: ICefv8Value; class function NewUndefined: ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type null.
/// </summary>
class function NewNull: ICefv8Value; class function NewNull: ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type bool.
/// </summary>
class function NewBool(value: Boolean): ICefv8Value; class function NewBool(value: Boolean): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type int.
/// </summary>
class function NewInt(value: Integer): ICefv8Value; class function NewInt(value: Integer): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type unsigned int.
/// </summary>
class function NewUInt(value: Cardinal): ICefv8Value; class function NewUInt(value: Cardinal): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type double.
/// </summary>
class function NewDouble(value: Double): ICefv8Value; class function NewDouble(value: Double): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type Date. This function should only be
/// called from within the scope of a ICefRenderProcessHandler,
/// ICefv8Handler or ICefv8Accessor callback, or in combination with calling
/// enter() and exit() on a stored ICefv8Context reference.
/// </summary>
class function NewDate(value: TDateTime): ICefv8Value; class function NewDate(value: TDateTime): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type string.
/// </summary>
class function NewString(const str: ustring): ICefv8Value; class function NewString(const str: ustring): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type object with optional accessor
/// and/or interceptor. This function should only be called from within the
/// scope of a ICefRenderProcessHandler, ICefv8Handler or ICefv8Accessor
/// callback, or in combination with calling enter() and exit() on a stored
/// ICefv8Context reference.
/// </summary>
class function NewObject(const Accessor: ICefV8Accessor; const Interceptor: ICefV8Interceptor): ICefv8Value; class function NewObject(const Accessor: ICefV8Accessor; const Interceptor: ICefV8Interceptor): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type object with optional accessor
/// and/or interceptor. This function should only be called from within the
/// scope of a ICefRenderProcessHandler, ICefv8Handler or ICefv8Accessor
/// callback, or in combination with calling enter() and exit() on a stored
/// ICefv8Context reference.
/// </summary>
class function NewObjectProc(const getter : TCefV8AccessorGetterProc; class function NewObjectProc(const getter : TCefV8AccessorGetterProc;
const setter : TCefV8AccessorSetterProc; const setter : TCefV8AccessorSetterProc;
const getterbyname : TCefV8InterceptorGetterByNameProc; const getterbyname : TCefV8InterceptorGetterByNameProc;
const setterbyname : TCefV8InterceptorSetterByNameProc; const setterbyname : TCefV8InterceptorSetterByNameProc;
const getterbyindex : TCefV8InterceptorGetterByIndexProc; const getterbyindex : TCefV8InterceptorGetterByIndexProc;
const setterbyindex : TCefV8InterceptorSetterByIndexProc): ICefv8Value; const setterbyindex : TCefV8InterceptorSetterByIndexProc): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type array with the specified |length|.
/// If |length| is negative the returned array will have length 0. This function
/// should only be called from within the scope of a
/// ICefRenderProcessHandler, ICefv8Handler or ICefv8Accessor callback,
/// or in combination with calling enter() and exit() on a stored
/// ICefv8Context reference.
/// </summary>
class function NewArray(len: Integer): ICefv8Value; class function NewArray(len: Integer): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type ArrayBuffer which wraps the
/// provided |buffer| of size |length| bytes. The ArrayBuffer is externalized,
/// meaning that it does not own |buffer|. The caller is responsible for freeing
/// |buffer| when requested via a call to
/// ICefv8ArrayBufferReleaseCallback.ReleaseBuffer. This function should
/// only be called from within the scope of a ICefRenderProcessHandler,
/// ICefv8Handler or ICefv8Accessor callback, or in combination with calling
/// enter() and exit() on a stored ICefv8Context reference.
/// </summary>
class function NewArrayBuffer(buffer: Pointer; length: NativeUInt; const callback : ICefv8ArrayBufferReleaseCallback): ICefv8Value; class function NewArrayBuffer(buffer: Pointer; length: NativeUInt; const callback : ICefv8ArrayBufferReleaseCallback): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type function. This function should
/// only be called from within the scope of a ICefRenderProcessHandler,
/// ICefv8Handler or ICefv8Accessor callback, or in combination with calling
/// enter() and exit() on a stored ICefv8Context reference.
/// </summary>
class function NewFunction(const name: ustring; const handler: ICefv8Handler): ICefv8Value; class function NewFunction(const name: ustring; const handler: ICefv8Handler): ICefv8Value;
/// <summary>
/// Create a new ICefv8Value object of type Promise. This function should only
/// be called from within the scope of a ICefRenderProcessHandler,
/// ICefv8Handler or ICefv8Accessor callback, or in combination with calling
/// enter() and exit() on a stored ICefv8Context reference.
/// </summary>
class function NewPromise: ICefv8Value; class function NewPromise: ICefv8Value;
end; end;
@ -316,6 +392,16 @@ begin
Result := PCefV8Value(FData)^.neuter_array_buffer(PCefV8Value(FData)) <> 0; Result := PCefV8Value(FData)^.neuter_array_buffer(PCefV8Value(FData)) <> 0;
end; end;
function TCefv8ValueRef.GetArrayBufferByteLength: NativeUInt;
begin
Result := PCefV8Value(FData)^.get_array_buffer_byte_length(PCefV8Value(FData));
end;
function TCefv8ValueRef.GetArrayBufferData: Pointer;
begin
Result := PCefV8Value(FData)^.get_array_buffer_data(PCefV8Value(FData));
end;
function TCefv8ValueRef.GetBoolValue: Boolean; function TCefv8ValueRef.GetBoolValue: Boolean;
begin begin
Result := PCefV8Value(FData)^.get_bool_value(PCefV8Value(FData)) <> 0; Result := PCefV8Value(FData)^.get_bool_value(PCefV8Value(FData)) <> 0;

View File

@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 540, "InternalVersion" : 541,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "118.7.1" "Version" : "119.4.3"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {