1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Update to CEF 87.1.6

This commit is contained in:
Salvador Diaz Fau
2020-11-19 18:55:17 +01:00
parent 2f3c23c202
commit 8e7660ccf8
14 changed files with 207 additions and 114 deletions

View File

@@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
CEF4Delphi uses CEF 86.0.24 which includes Chromium 86.0.4240.198. CEF4Delphi uses CEF 87.1.6 which includes Chromium 87.0.4280.66.
The CEF binaries used by CEF4Delphi are available for download at spotify : The CEF binaries used by CEF4Delphi are available for download at spotify :
* [32 bits](https://cef-builds.spotifycdn.com/cef_binary_86.0.24%2Bg85e79d4%2Bchromium-86.0.4240.198_windows32.tar.bz2) * [32 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.6%2Bg315d248%2Bchromium-87.0.4280.66_windows32.tar.bz2)
* [64 bits](https://cef-builds.spotifycdn.com/cef_binary_86.0.24%2Bg85e79d4%2Bchromium-86.0.4240.198_windows64.tar.bz2) * [64 bits](https://cef-builds.spotifycdn.com/cef_binary_87.1.6%2Bg315d248%2Bchromium-87.0.4280.66_windows64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 10.4.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.10/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 10.4.1 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.10/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.

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="86" Release="24"/> <Version Major="87" Minor="1" Release="6"/>
<Files Count="189"> <Files Count="189">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@@ -57,15 +57,15 @@ uses
uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar; uCEFTypes, uCEFInterfaces, uCEFBaseRefCounted, uCEFSchemeRegistrar;
const const
CEF_SUPPORTED_VERSION_MAJOR = 86; CEF_SUPPORTED_VERSION_MAJOR = 87;
CEF_SUPPORTED_VERSION_MINOR = 0; CEF_SUPPORTED_VERSION_MINOR = 1;
CEF_SUPPORTED_VERSION_RELEASE = 24; CEF_SUPPORTED_VERSION_RELEASE = 6;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = 86; CEF_CHROMEELF_VERSION_MAJOR = 87;
CEF_CHROMEELF_VERSION_MINOR = 0; CEF_CHROMEELF_VERSION_MINOR = 0;
CEF_CHROMEELF_VERSION_RELEASE = 4240; CEF_CHROMEELF_VERSION_RELEASE = 4280;
CEF_CHROMEELF_VERSION_BUILD = 198; CEF_CHROMEELF_VERSION_BUILD = 66;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
LIBCEF_DLL = 'libcef.dll'; LIBCEF_DLL = 'libcef.dll';
@@ -197,9 +197,11 @@ type
FMustCreateLoadHandler : boolean; FMustCreateLoadHandler : boolean;
// ICefBrowserProcessHandler // ICefBrowserProcessHandler
FOnGetCookieableSchemes : TOnGetCookieableSchemesEvent;
FOnContextInitialized : TOnContextInitializedEvent; FOnContextInitialized : TOnContextInitializedEvent;
FOnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent; FOnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent;
FOnScheduleMessagePumpWork : TOnScheduleMessagePumpWorkEvent; FOnScheduleMessagePumpWork : TOnScheduleMessagePumpWorkEvent;
FOnGetDefaultClient : TOnGetDefaultClientEvent;
// ICefResourceBundleHandler // ICefResourceBundleHandler
FOnGetLocalizedString : TOnGetLocalizedStringEvent; FOnGetLocalizedString : TOnGetLocalizedStringEvent;
@@ -362,6 +364,8 @@ type
procedure Internal_OnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType); procedure Internal_OnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType);
procedure Internal_OnLoadEnd(const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer); procedure Internal_OnLoadEnd(const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer);
procedure Internal_OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring); procedure Internal_OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring);
procedure Internal_GetCookieableSchemes(var schemes: TStringList; var include_defaults : boolean);
procedure Internal_GetDefaultClient(var aClient : ICefClient);
// Properties used to populate TCefSettings (cef_settings_t) // Properties used to populate TCefSettings (cef_settings_t)
property NoSandbox : Boolean read FNoSandbox write FNoSandbox; property NoSandbox : Boolean read FNoSandbox write FNoSandbox;
@@ -493,9 +497,11 @@ type
property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes; property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
// ICefBrowserProcessHandler // ICefBrowserProcessHandler
property OnGetCookieableSchemes : TOnGetCookieableSchemesEvent read FOnGetCookieableSchemes write FOnGetCookieableSchemes;
property OnContextInitialized : TOnContextInitializedEvent read FOnContextInitialized write FOnContextInitialized; property OnContextInitialized : TOnContextInitializedEvent read FOnContextInitialized write FOnContextInitialized;
property OnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent read FOnBeforeChildProcessLaunch write FOnBeforeChildProcessLaunch; property OnBeforeChildProcessLaunch : TOnBeforeChildProcessLaunchEvent read FOnBeforeChildProcessLaunch write FOnBeforeChildProcessLaunch;
property OnScheduleMessagePumpWork : TOnScheduleMessagePumpWorkEvent read FOnScheduleMessagePumpWork write FOnScheduleMessagePumpWork; property OnScheduleMessagePumpWork : TOnScheduleMessagePumpWorkEvent read FOnScheduleMessagePumpWork write FOnScheduleMessagePumpWork;
property OnGetDefaultClient : TOnGetDefaultClientEvent read FOnGetDefaultClient write FOnGetDefaultClient;
// ICefResourceBundleHandler // ICefResourceBundleHandler
property OnGetLocalizedString : TOnGetLocalizedStringEvent read FOnGetLocalizedString write FOnGetLocalizedString; property OnGetLocalizedString : TOnGetLocalizedStringEvent read FOnGetLocalizedString write FOnGetLocalizedString;
@@ -704,9 +710,11 @@ begin
FMustCreateLoadHandler := False; FMustCreateLoadHandler := False;
// ICefBrowserProcessHandler // ICefBrowserProcessHandler
FOnGetCookieableSchemes := nil;
FOnContextInitialized := nil; FOnContextInitialized := nil;
FOnBeforeChildProcessLaunch := nil; FOnBeforeChildProcessLaunch := nil;
FOnScheduleMessagePumpWork := nil; FOnScheduleMessagePumpWork := nil;
FOnGetDefaultClient := nil;
// ICefResourceBundleHandler // ICefResourceBundleHandler
FOnGetLocalizedString := nil; FOnGetLocalizedString := nil;
@@ -1628,6 +1636,18 @@ begin
FOnLoadError(browser, frame, errorCode, errorText, failedUrl); FOnLoadError(browser, frame, errorCode, errorText, failedUrl);
end; end;
procedure TCefApplicationCore.Internal_GetCookieableSchemes(var schemes: TStringList; var include_defaults : boolean);
begin
if assigned(FOnGetCookieableSchemes) then
FOnGetCookieableSchemes(schemes, include_defaults);
end;
procedure TCefApplicationCore.Internal_GetDefaultClient(var aClient : ICefClient);
begin
if assigned(FOnGetDefaultClient) then
FOnGetDefaultClient(aClient);
end;
procedure TCefApplicationCore.AppendSwitch(var aKeys, aValues : TStringList; const aNewKey, aNewValue : ustring); procedure TCefApplicationCore.AppendSwitch(var aKeys, aValues : TStringList; const aNewKey, aNewValue : ustring);
var var
TempKey : ustring; TempKey : ustring;
@@ -1958,9 +1978,11 @@ function TCefApplicationCore.GetMustCreateBrowserProcessHandler : boolean;
begin begin
Result := ((FSingleProcess or (FProcessType = ptBrowser)) and Result := ((FSingleProcess or (FProcessType = ptBrowser)) and
(FMustCreateBrowserProcessHandler or (FMustCreateBrowserProcessHandler or
assigned(FOnGetCookieableSchemes) or
assigned(FOnContextInitialized) or assigned(FOnContextInitialized) or
assigned(FOnBeforeChildProcessLaunch) or assigned(FOnBeforeChildProcessLaunch) or
assigned(FOnScheduleMessagePumpWork))); assigned(FOnScheduleMessagePumpWork)) or
assigned(FOnGetDefaultClient));
end; end;
function TCefApplicationCore.GetMustCreateRenderProcessHandler : boolean; function TCefApplicationCore.GetMustCreateRenderProcessHandler : boolean;

View File

@@ -114,8 +114,6 @@ type
function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration; function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration;
procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean);
procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean);
procedure SetMouseCursorChangeDisabled(disabled: Boolean);
function IsMouseCursorChangeDisabled: Boolean;
procedure ReplaceMisspelling(const word: ustring); procedure ReplaceMisspelling(const word: ustring);
procedure AddWordToDictionary(const word: ustring); procedure AddWordToDictionary(const word: ustring);
function IsWindowRenderingDisabled: Boolean; function IsWindowRenderingDisabled: Boolean;
@@ -546,11 +544,6 @@ begin
PCefBrowserHost(FData)^.set_focus(PCefBrowserHost(FData), Ord(focus)); PCefBrowserHost(FData)^.set_focus(PCefBrowserHost(FData), Ord(focus));
end; end;
procedure TCefBrowserHostRef.SetMouseCursorChangeDisabled(disabled: Boolean);
begin
PCefBrowserHost(FData)^.set_mouse_cursor_change_disabled(PCefBrowserHost(FData), Ord(disabled));
end;
procedure TCefBrowserHostRef.SetWindowlessFrameRate(frameRate: Integer); procedure TCefBrowserHostRef.SetWindowlessFrameRate(frameRate: Integer);
begin begin
PCefBrowserHost(FData)^.set_windowless_frame_rate(PCefBrowserHost(FData), frameRate); PCefBrowserHost(FData)^.set_windowless_frame_rate(PCefBrowserHost(FData), frameRate);
@@ -706,11 +699,6 @@ begin
PCefBrowserHost(FData)^.send_external_begin_frame(PCefBrowserHost(FData)); PCefBrowserHost(FData)^.send_external_begin_frame(PCefBrowserHost(FData));
end; end;
function TCefBrowserHostRef.IsMouseCursorChangeDisabled: Boolean;
begin
Result := PCefBrowserHost(FData)^.is_mouse_cursor_change_disabled(PCefBrowserHost(FData)) <> 0;
end;
function TCefBrowserHostRef.IsWindowRenderingDisabled: Boolean; function TCefBrowserHostRef.IsWindowRenderingDisabled: Boolean;
begin begin
Result := PCefBrowserHost(FData)^.is_window_rendering_disabled(PCefBrowserHost(FData)) <> 0; Result := PCefBrowserHost(FData)^.is_window_rendering_disabled(PCefBrowserHost(FData)) <> 0;

View File

@@ -49,15 +49,22 @@ unit uCEFBrowserProcessHandler;
interface interface
uses uses
{$IFDEF DELPHI16_UP}
System.Classes,
{$ELSE}
Classes,
{$ENDIF}
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplicationCore; uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFApplicationCore;
type type
TCefBrowserProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefBrowserProcessHandler) TCefBrowserProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefBrowserProcessHandler)
protected protected
procedure GetCookieableSchemes(var schemes: TStringList; var include_defaults : boolean); virtual; abstract;
procedure OnContextInitialized; virtual; abstract; procedure OnContextInitialized; virtual; abstract;
procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); virtual; abstract; procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); virtual; abstract;
procedure GetPrintHandler(var aHandler : ICefPrintHandler); virtual; procedure GetPrintHandler(var aHandler : ICefPrintHandler); virtual;
procedure OnScheduleMessagePumpWork(const delayMs: Int64); virtual; abstract; procedure OnScheduleMessagePumpWork(const delayMs: Int64); virtual; abstract;
procedure GetDefaultClient(var aClient : ICefClient); virtual;
procedure RemoveReferences; virtual; abstract; procedure RemoveReferences; virtual; abstract;
@@ -69,9 +76,11 @@ type
protected protected
FCefApp : TCefApplicationCore; FCefApp : TCefApplicationCore;
procedure GetCookieableSchemes(var schemes: TStringList; var include_defaults : boolean); override;
procedure OnContextInitialized; override; procedure OnContextInitialized; override;
procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); override; procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); override;
procedure OnScheduleMessagePumpWork(const delayMs: Int64); override; procedure OnScheduleMessagePumpWork(const delayMs: Int64); override;
procedure GetDefaultClient(var aClient : ICefClient); override;
procedure RemoveReferences; override; procedure RemoveReferences; override;
@@ -88,7 +97,46 @@ uses
{$ELSE} {$ELSE}
SysUtils, SysUtils,
{$ENDIF} {$ENDIF}
uCEFMiscFunctions, uCEFLibFunctions, uCEFCommandLine, uCEFListValue, uCEFConstants; uCEFMiscFunctions, uCEFLibFunctions, uCEFCommandLine, uCEFListValue, uCEFConstants, uCEFStringList;
procedure cef_browser_process_handler_get_cookieable_schemes(self : PCefBrowserProcessHandler;
schemes : TCefStringList;
include_defaults : PInteger); stdcall;
var
TempSL : TStringList;
TempCefSL : ICefStringList;
TempObject : TObject;
TempIncDef : boolean;
begin
TempSL := nil;
try
try
TempObject := CefGetObject(self);
if (schemes <> nil) and (TempObject <> nil) and (TempObject is TCefBrowserProcessHandlerOwn) then
begin
TempIncDef := (include_defaults^ <> 0);
TempSL := TStringList.Create;
TempCefSL := TCefStringListRef.Create(schemes);
TempCefSL.CopyToStrings(TempSL);
TCefBrowserProcessHandlerOwn(TempObject).GetCookieableSchemes(TempSL, TempIncDef);
TempCefSL.Clear;
TempCefSL.AddStrings(TempSL);
include_defaults^ := ord(TempIncDef);
end;
except
on e : exception do
if CustomExceptionHandler('cef_browser_process_handler_get_cookieable_schemes', e) then raise;
end;
finally
if (TempSL <> nil) then FreeAndNil(TempSL);
TempCefSL := nil;
end;
end;
procedure cef_browser_process_handler_on_context_initialized(self: PCefBrowserProcessHandler); stdcall; procedure cef_browser_process_handler_on_context_initialized(self: PCefBrowserProcessHandler); stdcall;
var var
@@ -124,6 +172,7 @@ begin
if (TempObject <> nil) and if (TempObject <> nil) and
(TempObject is TCefBrowserProcessHandlerOwn) then (TempObject is TCefBrowserProcessHandlerOwn) then
try try
TempHandler := nil;
TCefBrowserProcessHandlerOwn(TempObject).GetPrintHandler(TempHandler); TCefBrowserProcessHandlerOwn(TempObject).GetPrintHandler(TempHandler);
if (TempHandler <> nil) then Result := TempHandler.Wrap; if (TempHandler <> nil) then Result := TempHandler.Wrap;
finally finally
@@ -143,16 +192,37 @@ begin
TCefBrowserProcessHandlerOwn(TempObject).OnScheduleMessagePumpWork(delay_ms); TCefBrowserProcessHandlerOwn(TempObject).OnScheduleMessagePumpWork(delay_ms);
end; end;
function cef_browser_process_handler_get_default_client(self: PCefBrowserProcessHandler): PCefClient; stdcall;
var
TempObject : TObject;
TempClient : ICefClient;
begin
Result := nil;
TempObject := CefGetObject(self);
if (TempObject <> nil) and
(TempObject is TCefBrowserProcessHandlerOwn) then
try
TempClient := nil;
TCefBrowserProcessHandlerOwn(TempObject).GetDefaultClient(TempClient);
if (TempClient <> nil) then Result := TempClient.Wrap;
finally
TempClient := nil;
end;
end;
constructor TCefBrowserProcessHandlerOwn.Create; constructor TCefBrowserProcessHandlerOwn.Create;
begin begin
inherited CreateData(SizeOf(TCefBrowserProcessHandler)); inherited CreateData(SizeOf(TCefBrowserProcessHandler));
with PCefBrowserProcessHandler(FData)^ do with PCefBrowserProcessHandler(FData)^ do
begin begin
get_cookieable_schemes := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_get_cookieable_schemes;
on_context_initialized := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_on_context_initialized; on_context_initialized := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_on_context_initialized;
on_before_child_process_launch := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_on_before_child_process_launch; on_before_child_process_launch := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_on_before_child_process_launch;
get_print_handler := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_get_print_handler; get_print_handler := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_get_print_handler;
on_schedule_message_pump_work := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_on_schedule_message_pump_work; on_schedule_message_pump_work := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_on_schedule_message_pump_work;
get_default_client := {$IFDEF FPC}@{$ENDIF}cef_browser_process_handler_get_default_client;
end; end;
end; end;
@@ -161,6 +231,10 @@ begin
aHandler := nil; // only linux aHandler := nil; // only linux
end; end;
procedure TCefBrowserProcessHandlerOwn.GetDefaultClient(var aClient : ICefClient);
begin
aClient := nil;
end;
// TCefCustomBrowserProcessHandler // TCefCustomBrowserProcessHandler
@@ -185,6 +259,17 @@ begin
begin begin
FCefApp := nil; FCefApp := nil;
end; end;
procedure TCefCustomBrowserProcessHandler.GetCookieableSchemes(var schemes : TStringList;
var include_defaults : boolean);
begin
try
if (FCefApp <> nil) then FCefApp.Internal_GetCookieableSchemes(schemes, include_defaults);
except
on e : exception do
if CustomExceptionHandler('TCefCustomBrowserProcessHandler.GetCookieableSchemes', e) then raise;
end;
end;
procedure TCefCustomBrowserProcessHandler.OnContextInitialized; procedure TCefCustomBrowserProcessHandler.OnContextInitialized;
begin begin
@@ -215,4 +300,14 @@ begin
if CustomExceptionHandler('TCefCustomBrowserProcessHandler.OnScheduleMessagePumpWork', e) then raise; if CustomExceptionHandler('TCefCustomBrowserProcessHandler.OnScheduleMessagePumpWork', e) then raise;
end; end;
end; end;
procedure TCefCustomBrowserProcessHandler.GetDefaultClient(var aClient : ICefClient);
begin
try
if (FCefApp <> nil) then FCefApp.Internal_GetDefaultClient(aClient);
except
on e : exception do
if CustomExceptionHandler('TCefCustomBrowserProcessHandler.GetDefaultClient', e) then raise;
end;
end;

View File

@@ -190,6 +190,7 @@ type
FOnConsoleMessage : TOnConsoleMessage; FOnConsoleMessage : TOnConsoleMessage;
FOnAutoResize : TOnAutoResize; FOnAutoResize : TOnAutoResize;
FOnLoadingProgressChange : TOnLoadingProgressChange; FOnLoadingProgressChange : TOnLoadingProgressChange;
FOnCursorChange : TOnCursorChange;
// ICefDownloadHandler // ICefDownloadHandler
FOnBeforeDownload : TOnBeforeDownload; FOnBeforeDownload : TOnBeforeDownload;
@@ -246,7 +247,6 @@ type
FOnPopupSize : TOnPopupSize; FOnPopupSize : TOnPopupSize;
FOnPaint : TOnPaint; FOnPaint : TOnPaint;
FOnAcceleratedPaint : TOnAcceleratedPaint; FOnAcceleratedPaint : TOnAcceleratedPaint;
FOnCursorChange : TOnCursorChange;
FOnStartDragging : TOnStartDragging; FOnStartDragging : TOnStartDragging;
FOnUpdateDragCursor : TOnUpdateDragCursor; FOnUpdateDragCursor : TOnUpdateDragCursor;
FOnScrollOffsetChanged : TOnScrollOffsetChanged; FOnScrollOffsetChanged : TOnScrollOffsetChanged;
@@ -354,7 +354,6 @@ type
function GetBrowserById(aID : integer) : ICefBrowser; function GetBrowserById(aID : integer) : ICefBrowser;
function GetBrowserCount : integer; function GetBrowserCount : integer;
function GetBrowserIdByIndex(aIndex : integer) : integer; function GetBrowserIdByIndex(aIndex : integer) : integer;
function GetMouseCursorChangeDisabled : boolean;
procedure SetDoNotTrack(aValue : boolean); procedure SetDoNotTrack(aValue : boolean);
procedure SetSendReferrer(aValue : boolean); procedure SetSendReferrer(aValue : boolean);
@@ -397,7 +396,6 @@ type
procedure SetQuicAllowed(aValue : boolean); procedure SetQuicAllowed(aValue : boolean);
procedure SetJavascriptEnabled(aValue : boolean); procedure SetJavascriptEnabled(aValue : boolean);
procedure SetLoadImagesAutomatically(aValue : boolean); procedure SetLoadImagesAutomatically(aValue : boolean);
procedure SetMouseCursorChangeDisabled(aValue : boolean);
function CreateBrowserHost(aWindowInfo : PCefWindowInfo; const aURL : ustring; const aSettings : PCefBrowserSettings; const aExtraInfo : ICefDictionaryValue; const aContext : ICefRequestContext): boolean; function CreateBrowserHost(aWindowInfo : PCefWindowInfo; const aURL : ustring; const aSettings : PCefBrowserSettings; const aExtraInfo : ICefDictionaryValue; const aContext : ICefRequestContext): boolean;
function CreateBrowserHostSync(aWindowInfo : PCefWindowInfo; const aURL : ustring; const aSettings : PCefBrowserSettings; const aExtraInfo : ICefDictionaryValue; const aContext : ICefRequestContext): Boolean; function CreateBrowserHostSync(aWindowInfo : PCefWindowInfo; const aURL : ustring; const aSettings : PCefBrowserSettings; const aExtraInfo : ICefDictionaryValue; const aContext : ICefRequestContext): Boolean;
@@ -507,6 +505,7 @@ type
function doOnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const aMessage, source: ustring; line: Integer): Boolean; virtual; function doOnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const aMessage, source: ustring; line: Integer): Boolean; virtual;
function doOnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; virtual; function doOnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; virtual;
procedure doOnLoadingProgressChange(const browser: ICefBrowser; const progress: double); virtual; procedure doOnLoadingProgressChange(const browser: ICefBrowser; const progress: double); virtual;
procedure doOnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean); virtual;
// ICefDownloadHandler // ICefDownloadHandler
procedure doOnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback); virtual; procedure doOnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback); virtual;
@@ -563,7 +562,6 @@ type
procedure doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect); virtual; procedure doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect); virtual;
procedure doOnPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); virtual; procedure doOnPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); virtual;
procedure doOnAcceleratedPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); virtual; procedure doOnAcceleratedPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); virtual;
procedure doOnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo); virtual;
function doOnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; virtual; function doOnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; virtual;
procedure doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); virtual; procedure doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); virtual;
procedure doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); virtual; procedure doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); virtual;
@@ -894,7 +892,6 @@ type
property QuicAllowed : boolean read FQuicAllowed write SetQuicAllowed; property QuicAllowed : boolean read FQuicAllowed write SetQuicAllowed;
property JavascriptEnabled : boolean read FJavascriptEnabled write SetJavascriptEnabled; property JavascriptEnabled : boolean read FJavascriptEnabled write SetJavascriptEnabled;
property LoadImagesAutomatically : boolean read FLoadImagesAutomatically write SetLoadImagesAutomatically; property LoadImagesAutomatically : boolean read FLoadImagesAutomatically write SetLoadImagesAutomatically;
property MouseCursorChangeDisabled : boolean read GetMouseCursorChangeDisabled write SetMouseCursorChangeDisabled;
property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy; property WebRTCIPHandlingPolicy : TCefWebRTCHandlingPolicy read FWebRTCIPHandlingPolicy write SetWebRTCIPHandlingPolicy;
property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes; property WebRTCMultipleRoutes : TCefState read FWebRTCMultipleRoutes write SetWebRTCMultipleRoutes;
@@ -969,6 +966,7 @@ type
property OnConsoleMessage : TOnConsoleMessage read FOnConsoleMessage write FOnConsoleMessage; property OnConsoleMessage : TOnConsoleMessage read FOnConsoleMessage write FOnConsoleMessage;
property OnAutoResize : TOnAutoResize read FOnAutoResize write FOnAutoResize; property OnAutoResize : TOnAutoResize read FOnAutoResize write FOnAutoResize;
property OnLoadingProgressChange : TOnLoadingProgressChange read FOnLoadingProgressChange write FOnLoadingProgressChange; property OnLoadingProgressChange : TOnLoadingProgressChange read FOnLoadingProgressChange write FOnLoadingProgressChange;
property OnCursorChange : TOnCursorChange read FOnCursorChange write FOnCursorChange;
// ICefDownloadHandler // ICefDownloadHandler
property OnBeforeDownload : TOnBeforeDownload read FOnBeforeDownload write FOnBeforeDownload; property OnBeforeDownload : TOnBeforeDownload read FOnBeforeDownload write FOnBeforeDownload;
@@ -1025,7 +1023,6 @@ type
property OnPopupSize : TOnPopupSize read FOnPopupSize write FOnPopupSize; property OnPopupSize : TOnPopupSize read FOnPopupSize write FOnPopupSize;
property OnPaint : TOnPaint read FOnPaint write FOnPaint; property OnPaint : TOnPaint read FOnPaint write FOnPaint;
property OnAcceleratedPaint : TOnAcceleratedPaint read FOnAcceleratedPaint write FOnAcceleratedPaint; property OnAcceleratedPaint : TOnAcceleratedPaint read FOnAcceleratedPaint write FOnAcceleratedPaint;
property OnCursorChange : TOnCursorChange read FOnCursorChange write FOnCursorChange;
property OnStartDragging : TOnStartDragging read FOnStartDragging write FOnStartDragging; property OnStartDragging : TOnStartDragging read FOnStartDragging write FOnStartDragging;
property OnUpdateDragCursor : TOnUpdateDragCursor read FOnUpdateDragCursor write FOnUpdateDragCursor; property OnUpdateDragCursor : TOnUpdateDragCursor read FOnUpdateDragCursor write FOnUpdateDragCursor;
property OnScrollOffsetChanged : TOnScrollOffsetChanged read FOnScrollOffsetChanged write FOnScrollOffsetChanged; property OnScrollOffsetChanged : TOnScrollOffsetChanged read FOnScrollOffsetChanged write FOnScrollOffsetChanged;
@@ -1640,6 +1637,7 @@ begin
FOnConsoleMessage := nil; FOnConsoleMessage := nil;
FOnAutoResize := nil; FOnAutoResize := nil;
FOnLoadingProgressChange := nil; FOnLoadingProgressChange := nil;
FOnCursorChange := nil;
// ICefDownloadHandler // ICefDownloadHandler
FOnBeforeDownload := nil; FOnBeforeDownload := nil;
@@ -1696,7 +1694,6 @@ begin
FOnPopupSize := nil; FOnPopupSize := nil;
FOnPaint := nil; FOnPaint := nil;
FOnAcceleratedPaint := nil; FOnAcceleratedPaint := nil;
FOnCursorChange := nil;
FOnStartDragging := nil; FOnStartDragging := nil;
FOnUpdateDragCursor := nil; FOnUpdateDragCursor := nil;
FOnScrollOffsetChanged := nil; FOnScrollOffsetChanged := nil;
@@ -2682,11 +2679,6 @@ begin
Result := Initialized and Browser.host.RequestContext.IsGlobal; Result := Initialized and Browser.host.RequestContext.IsGlobal;
end; end;
function TChromiumCore.GetMouseCursorChangeDisabled : boolean;
begin
Result := Initialized and Browser.host.IsMouseCursorChangeDisabled;
end;
function TChromiumCore.GetAudioMuted : boolean; function TChromiumCore.GetAudioMuted : boolean;
begin begin
Result := Initialized and Browser.host.IsAudioMuted; Result := Initialized and Browser.host.IsAudioMuted;
@@ -2738,12 +2730,6 @@ begin
end; end;
end; end;
procedure TChromiumCore.SetMouseCursorChangeDisabled(aValue : boolean);
begin
if Initialized then
Browser.Host.SetMouseCursorChangeDisabled(aValue);
end;
procedure TChromiumCore.SetAudioMuted(aValue : boolean); procedure TChromiumCore.SetAudioMuted(aValue : boolean);
begin begin
if Initialized then if Initialized then
@@ -4576,7 +4562,8 @@ begin
assigned(FOnStatusMessage) or assigned(FOnStatusMessage) or
assigned(FOnConsoleMessage) or assigned(FOnConsoleMessage) or
assigned(FOnAutoResize) or assigned(FOnAutoResize) or
assigned(FOnLoadingProgressChange); assigned(FOnLoadingProgressChange) or
assigned(FOnCursorChange);
end; end;
function TChromiumCore.MustCreateDownloadHandler : boolean; function TChromiumCore.MustCreateDownloadHandler : boolean;
@@ -5256,10 +5243,13 @@ end;
procedure TChromiumCore.doOnCursorChange(const browser : ICefBrowser; procedure TChromiumCore.doOnCursorChange(const browser : ICefBrowser;
cursor : TCefCursorHandle; cursor : TCefCursorHandle;
cursorType : TCefCursorType; cursorType : TCefCursorType;
const customCursorInfo : PCefCursorInfo); const customCursorInfo : PCefCursorInfo;
var aResult : boolean);
begin begin
aResult := False;
if assigned(FOnCursorChange) then if assigned(FOnCursorChange) then
FOnCursorChange(self, browser, cursor, cursorType, customCursorInfo); FOnCursorChange(self, browser, cursor, cursorType, customCursorInfo, aResult);
end; end;
procedure TChromiumCore.doOnDialogClosed(const browser: ICefBrowser); procedure TChromiumCore.doOnDialogClosed(const browser: ICefBrowser);

View File

@@ -91,6 +91,7 @@ type
TOnConsoleMessage = procedure(Sender: TObject; const browser: ICefBrowser; level: TCefLogSeverity; const message, source: ustring; line: Integer; out Result: Boolean) of object; TOnConsoleMessage = procedure(Sender: TObject; const browser: ICefBrowser; level: TCefLogSeverity; const message, source: ustring; line: Integer; out Result: Boolean) of object;
TOnAutoResize = procedure(Sender: TObject; const browser: ICefBrowser; const new_size: PCefSize; out Result: Boolean) of object; TOnAutoResize = procedure(Sender: TObject; const browser: ICefBrowser; const new_size: PCefSize; out Result: Boolean) of object;
TOnLoadingProgressChange = procedure(Sender: TObject; const browser: ICefBrowser; const progress: double) of object; TOnLoadingProgressChange = procedure(Sender: TObject; const browser: ICefBrowser; const progress: double) of object;
TOnCursorChange = procedure(Sender: TObject; const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean) of Object;
// ICefDownloadHandler // ICefDownloadHandler
TOnBeforeDownload = procedure(Sender: TObject; const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback) of object; TOnBeforeDownload = procedure(Sender: TObject; const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback) of object;
@@ -147,7 +148,6 @@ type
TOnPopupSize = procedure(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect) of Object; TOnPopupSize = procedure(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect) of Object;
TOnPaint = procedure(Sender: TObject; const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer) of Object; TOnPaint = procedure(Sender: TObject; const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer) of Object;
TOnAcceleratedPaint = procedure(Sender: TObject; const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer) of Object; TOnAcceleratedPaint = procedure(Sender: TObject; const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer) of Object;
TOnCursorChange = procedure(Sender: TObject; const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo) of Object;
TOnStartDragging = procedure(Sender: TObject; const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer; out Result: Boolean) of Object; TOnStartDragging = procedure(Sender: TObject; const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer; out Result: Boolean) of Object;
TOnUpdateDragCursor = procedure(Sender: TObject; const browser: ICefBrowser; operation: TCefDragOperation) of Object; TOnUpdateDragCursor = procedure(Sender: TObject; const browser: ICefBrowser; operation: TCefDragOperation) of Object;
TOnScrollOffsetChanged = procedure(Sender: TObject; const browser: ICefBrowser; x, y: Double) of Object; TOnScrollOffsetChanged = procedure(Sender: TObject; const browser: ICefBrowser; x, y: Double) of Object;

View File

@@ -68,6 +68,7 @@ type
function OnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message_, source: ustring; line: Integer): Boolean; virtual; function OnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message_, source: ustring; line: Integer): Boolean; virtual;
function OnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; virtual; function OnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; virtual;
procedure OnLoadingProgressChange(const browser: ICefBrowser; const progress: double); virtual; procedure OnLoadingProgressChange(const browser: ICefBrowser; const progress: double); virtual;
procedure OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; CursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean); virtual;
procedure RemoveReferences; virtual; procedure RemoveReferences; virtual;
@@ -88,6 +89,7 @@ type
function OnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message_, source: ustring; line: Integer): Boolean; override; function OnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message_, source: ustring; line: Integer): Boolean; override;
function OnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; override; function OnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; override;
procedure OnLoadingProgressChange(const browser: ICefBrowser; const progress: double); override; procedure OnLoadingProgressChange(const browser: ICefBrowser; const progress: double); override;
procedure OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; CursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean); override;
procedure RemoveReferences; override; procedure RemoveReferences; override;
@@ -260,6 +262,28 @@ begin
progress); progress);
end; end;
function cef_display_handler_on_cursor_change( self : PCefDisplayHandler;
browser : PCefBrowser;
cursor : TCefCursorHandle;
type_ : TCefCursorType;
const custom_cursor_info : PCefCursorInfo): Integer; stdcall;
var
TempObject : TObject;
TempResult : boolean;
begin
TempResult := False;
TempObject := CefGetObject(self);
if (TempObject <> nil) and (TempObject is TCefDisplayHandlerOwn) then
TCefDisplayHandlerOwn(TempObject).OnCursorChange(TCefBrowserRef.UnWrap(browser),
cursor,
type_,
custom_cursor_info,
TempResult);
Result := Ord(TempResult);
end;
constructor TCefDisplayHandlerOwn.Create; constructor TCefDisplayHandlerOwn.Create;
begin begin
inherited CreateData(SizeOf(TCefDisplayHandler)); inherited CreateData(SizeOf(TCefDisplayHandler));
@@ -275,6 +299,7 @@ begin
on_console_message := {$IFDEF FPC}@{$ENDIF}cef_display_handler_on_console_message; on_console_message := {$IFDEF FPC}@{$ENDIF}cef_display_handler_on_console_message;
on_auto_resize := {$IFDEF FPC}@{$ENDIF}cef_display_handler_on_auto_resize; on_auto_resize := {$IFDEF FPC}@{$ENDIF}cef_display_handler_on_auto_resize;
on_loading_progress_change := {$IFDEF FPC}@{$ENDIF}cef_display_handler_on_loading_progress_change; on_loading_progress_change := {$IFDEF FPC}@{$ENDIF}cef_display_handler_on_loading_progress_change;
on_cursor_change := {$IFDEF FPC}@{$ENDIF}cef_display_handler_on_cursor_change;
end; end;
end; end;
@@ -298,6 +323,11 @@ begin
// //
end; end;
procedure TCefDisplayHandlerOwn.OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; CursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean);
begin
aResult := False;
end;
procedure TCefDisplayHandlerOwn.OnFaviconUrlChange(const browser: ICefBrowser; const iconUrls: TStrings); procedure TCefDisplayHandlerOwn.OnFaviconUrlChange(const browser: ICefBrowser; const iconUrls: TStrings);
begin begin
// //
@@ -353,7 +383,8 @@ procedure TCustomDisplayHandler.OnAddressChange(const browser : ICefBrowser;
const frame : ICefFrame; const frame : ICefFrame;
const url : ustring); const url : ustring);
begin begin
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnAddressChange(browser, frame, url); if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnAddressChange(browser, frame, url);
end; end;
function TCustomDisplayHandler.OnConsoleMessage(const browser : ICefBrowser; function TCustomDisplayHandler.OnConsoleMessage(const browser : ICefBrowser;
@@ -378,27 +409,42 @@ end;
procedure TCustomDisplayHandler.OnLoadingProgressChange(const browser: ICefBrowser; const progress: double); procedure TCustomDisplayHandler.OnLoadingProgressChange(const browser: ICefBrowser; const progress: double);
begin begin
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnLoadingProgressChange(browser, progress); if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnLoadingProgressChange(browser, progress);
end;
procedure TCustomDisplayHandler.OnCursorChange(const browser : ICefBrowser;
cursor : TCefCursorHandle;
cursorType : TCefCursorType;
const customCursorInfo : PCefCursorInfo;
var aResult : boolean);
begin
if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnCursorChange(browser, cursor, cursorType, customCursorInfo, aResult);
end; end;
procedure TCustomDisplayHandler.OnFaviconUrlChange(const browser: ICefBrowser; const iconUrls: TStrings); procedure TCustomDisplayHandler.OnFaviconUrlChange(const browser: ICefBrowser; const iconUrls: TStrings);
begin begin
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnFaviconUrlChange(browser, iconUrls); if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnFaviconUrlChange(browser, iconUrls);
end; end;
procedure TCustomDisplayHandler.OnFullScreenModeChange(const browser: ICefBrowser; fullscreen: Boolean); procedure TCustomDisplayHandler.OnFullScreenModeChange(const browser: ICefBrowser; fullscreen: Boolean);
begin begin
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnFullScreenModeChange(browser, fullscreen); if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnFullScreenModeChange(browser, fullscreen);
end; end;
procedure TCustomDisplayHandler.OnStatusMessage(const browser: ICefBrowser; const value: ustring); procedure TCustomDisplayHandler.OnStatusMessage(const browser: ICefBrowser; const value: ustring);
begin begin
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnStatusMessage(browser, value); if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnStatusMessage(browser, value);
end; end;
procedure TCustomDisplayHandler.OnTitleChange(const browser: ICefBrowser; const title: ustring); procedure TCustomDisplayHandler.OnTitleChange(const browser: ICefBrowser; const title: ustring);
begin begin
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnTitleChange(browser, title); if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnTitleChange(browser, title);
end; end;
function TCustomDisplayHandler.OnTooltip(const browser: ICefBrowser; var text: ustring): Boolean; function TCustomDisplayHandler.OnTooltip(const browser: ICefBrowser; var text: ustring): Boolean;

View File

@@ -205,10 +205,12 @@ type
TOnUncaughtExceptionEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context; const exception: ICefV8Exception; const stackTrace: ICefV8StackTrace) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF}; TOnUncaughtExceptionEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context; const exception: ICefV8Exception; const stackTrace: ICefV8StackTrace) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF};
TOnFocusedNodeChangedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser: ICefBrowser; const frame: ICefFrame; const node: ICefDomNode) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF}; TOnFocusedNodeChangedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser: ICefBrowser; const frame: ICefFrame; const node: ICefDomNode) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF};
TOnProcessMessageReceivedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser: ICefBrowser; const frame: ICefFrame; sourceProcess: TCefProcessId; const message: ICefProcessMessage; var aHandled : boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF LCL} of object {$ENDIF} {$ENDIF}; TOnProcessMessageReceivedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser: ICefBrowser; const frame: ICefFrame; sourceProcess: TCefProcessId; const message: ICefProcessMessage; var aHandled : boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF LCL} of object {$ENDIF} {$ENDIF};
TOnGetCookieableSchemesEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(var schemes: TStringList; var include_defaults : boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF LCL} of object {$ENDIF} {$ENDIF};
TOnContextInitializedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure() {$IFNDEF DELPHI12_UP}{$IFNDEF FPC} of object{$ENDIF}{$ENDIF}; TOnContextInitializedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure() {$IFNDEF DELPHI12_UP}{$IFNDEF FPC} of object{$ENDIF}{$ENDIF};
TOnBeforeChildProcessLaunchEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const commandLine: ICefCommandLine) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF}; TOnBeforeChildProcessLaunchEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const commandLine: ICefCommandLine) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF};
TOnRenderProcessThreadCreatedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const extraInfo: ICefListValue) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF}; TOnRenderProcessThreadCreatedEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const extraInfo: ICefListValue) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF};
TOnScheduleMessagePumpWorkEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const delayMs: Int64) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC} of object{$ENDIF}{$ENDIF}; TOnScheduleMessagePumpWorkEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const delayMs: Int64) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC} of object{$ENDIF}{$ENDIF};
TOnGetDefaultClientEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(var aClient : ICefClient) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC} of object{$ENDIF}{$ENDIF};
TOnGetDataResourceEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(resourceId: Integer; out data: Pointer; out dataSize: NativeUInt; var aResult : Boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF}; TOnGetDataResourceEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(resourceId: Integer; out data: Pointer; out dataSize: NativeUInt; var aResult : Boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF};
TOnGetLocalizedStringEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(stringId: Integer; out stringVal: ustring; var aResult : Boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF}; TOnGetLocalizedStringEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(stringId: Integer; out stringVal: ustring; var aResult : Boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF};
TOnGetDataResourceForScaleEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(resourceId: Integer; scaleFactor: TCefScaleFactor; out data: Pointer; out dataSize: NativeUInt; var aResult : Boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF}; TOnGetDataResourceForScaleEvent = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(resourceId: Integer; scaleFactor: TCefScaleFactor; out data: Pointer; out dataSize: NativeUInt; var aResult : Boolean) {$IFNDEF DELPHI12_UP}{$IFNDEF FPC}of object{$ENDIF}{$ENDIF};
@@ -343,6 +345,7 @@ type
function doOnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message, source: ustring; line: Integer): Boolean; function doOnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message, source: ustring; line: Integer): Boolean;
function doOnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; function doOnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean;
procedure doOnLoadingProgressChange(const browser: ICefBrowser; const progress: double); procedure doOnLoadingProgressChange(const browser: ICefBrowser; const progress: double);
procedure doOnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean);
// ICefDownloadHandler // ICefDownloadHandler
procedure doOnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback); procedure doOnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback);
@@ -399,7 +402,6 @@ type
procedure doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect); procedure doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect);
procedure doOnPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); procedure doOnPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer);
procedure doOnAcceleratedPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); procedure doOnAcceleratedPaint(const browser: ICefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer);
procedure doOnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo);
function doOnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; function doOnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean;
procedure doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); procedure doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation);
procedure doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); procedure doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double);
@@ -597,8 +599,6 @@ type
function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration; function AddDevToolsMessageObserver(const observer: ICefDevToolsMessageObserver): ICefRegistration;
procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean);
procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean);
procedure SetMouseCursorChangeDisabled(disabled: Boolean);
function IsMouseCursorChangeDisabled: Boolean;
procedure ReplaceMisspelling(const word: ustring); procedure ReplaceMisspelling(const word: ustring);
procedure AddWordToDictionary(const word: ustring); procedure AddWordToDictionary(const word: ustring);
function IsWindowRenderingDisabled: Boolean; function IsWindowRenderingDisabled: Boolean;
@@ -1430,10 +1430,12 @@ type
// /include/capi/cef_browser_process_handler_capi.h (cef_browser_process_handler_t) // /include/capi/cef_browser_process_handler_capi.h (cef_browser_process_handler_t)
ICefBrowserProcessHandler = interface(ICefBaseRefCounted) ICefBrowserProcessHandler = interface(ICefBaseRefCounted)
['{27291B7A-C0AE-4EE0-9115-15C810E22F6C}'] ['{27291B7A-C0AE-4EE0-9115-15C810E22F6C}']
procedure GetCookieableSchemes(var schemes: TStringList; var include_defaults : boolean);
procedure OnContextInitialized; procedure OnContextInitialized;
procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine);
procedure GetPrintHandler(var aHandler : ICefPrintHandler); procedure GetPrintHandler(var aHandler : ICefPrintHandler);
procedure OnScheduleMessagePumpWork(const delayMs: Int64); procedure OnScheduleMessagePumpWork(const delayMs: Int64);
procedure GetDefaultClient(var aClient : ICefClient);
procedure RemoveReferences; // custom procedure to clear all references procedure RemoveReferences; // custom procedure to clear all references
end; end;
@@ -1954,6 +1956,7 @@ type
function OnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message_, source: ustring; line: Integer): Boolean; function OnConsoleMessage(const browser: ICefBrowser; level: TCefLogSeverity; const message_, source: ustring; line: Integer): Boolean;
function OnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean; function OnAutoResize(const browser: ICefBrowser; const new_size: PCefSize): Boolean;
procedure OnLoadingProgressChange(const browser: ICefBrowser; const progress: double); procedure OnLoadingProgressChange(const browser: ICefBrowser; const progress: double);
procedure OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; CursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo; var aResult : boolean);
procedure RemoveReferences; // custom procedure to clear all references procedure RemoveReferences; // custom procedure to clear all references
end; end;
@@ -2054,7 +2057,6 @@ type
procedure OnPopupSize(const browser: ICefBrowser; const rect: PCefRect); procedure OnPopupSize(const browser: ICefBrowser; const rect: PCefRect);
procedure OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); procedure OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer);
procedure OnAcceleratedPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); procedure OnAcceleratedPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer);
procedure OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; CursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo);
function OnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; function OnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean;
procedure OnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); procedure OnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation);
procedure OnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); procedure OnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double);

View File

@@ -70,7 +70,7 @@ type
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;
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;
class function ParseAndReturnError(const jsonString: ustring; options: TCefJsonParserOptions; out errorCodeOut: TCefJsonParserError; out errorMsgOut: ustring): ICefValue; class function ParseAndReturnError(const jsonString: ustring; options: TCefJsonParserOptions; out errorMsgOut: ustring): ICefValue;
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;
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;
class function Write(const node: ICefValue; var aRsltStrings: TStringList): boolean; overload; class function Write(const node: ICefValue; var aRsltStrings: TStringList): boolean; overload;
@@ -226,7 +226,6 @@ end;
class function TCEFJson.ParseAndReturnError(const jsonString : ustring; class function TCEFJson.ParseAndReturnError(const jsonString : ustring;
options : TCefJsonParserOptions; options : TCefJsonParserOptions;
out errorCodeOut : TCefJsonParserError;
out errorMsgOut : ustring): ICefValue; out errorMsgOut : ustring): ICefValue;
var var
TempJSON, TempError : TCefString; TempJSON, TempError : TCefString;
@@ -235,12 +234,11 @@ begin
begin begin
CefStringInitialize(@TempError); CefStringInitialize(@TempError);
TempJSON := CefString(jsonString); TempJSON := CefString(jsonString);
Result := TCefValueRef.UnWrap(cef_parse_jsonand_return_error(@TempJSON, options, @errorCodeOut, @TempError)); Result := TCefValueRef.UnWrap(cef_parse_jsonand_return_error(@TempJSON, options, @TempError));
errorMsgOut := CefStringClearAndGet(@TempError); errorMsgOut := CefStringClearAndGet(@TempError);
end end
else else
begin begin
errorCodeOut := JSON_NO_ERROR;
Result := nil; Result := nil;
errorMsgOut := ''; errorMsgOut := '';
end; end;

View File

@@ -121,7 +121,7 @@ var
cef_uridecode : function(const text: PCefString; convert_to_utf8: Integer; unescape_rule: TCefUriUnescapeRule): PCefStringUserFree; cdecl; cef_uridecode : function(const text: PCefString; convert_to_utf8: Integer; unescape_rule: TCefUriUnescapeRule): PCefStringUserFree; cdecl;
cef_parse_json : function(const json_string: PCefString; options: TCefJsonParserOptions): PCefValue; cdecl; cef_parse_json : function(const json_string: PCefString; options: TCefJsonParserOptions): PCefValue; cdecl;
cef_parse_json_buffer : function(const json: Pointer; json_size: NativeUInt; options: TCefJsonParserOptions): PCefValue; cdecl; cef_parse_json_buffer : function(const json: Pointer; json_size: NativeUInt; options: TCefJsonParserOptions): PCefValue; cdecl;
cef_parse_jsonand_return_error : function(const json_string: PCefString; options: TCefJsonParserOptions; error_code_out: PCefJsonParserError; error_msg_out: PCefString): PCefValue; cdecl; cef_parse_jsonand_return_error : function(const json_string: PCefString; options: TCefJsonParserOptions; error_msg_out: PCefString): PCefValue; cdecl;
cef_write_json : function(node: PCefValue; options: TCefJsonWriterOptions): PCefStringUserFree; cdecl; cef_write_json : function(node: PCefValue; options: TCefJsonWriterOptions): PCefStringUserFree; cdecl;
// /include/capi/cef_path_util_capi.h // /include/capi/cef_path_util_capi.h

View File

@@ -63,7 +63,6 @@ type
procedure OnPopupSize(const browser: ICefBrowser; const rect: PCefRect); virtual; procedure OnPopupSize(const browser: ICefBrowser; const rect: PCefRect); virtual;
procedure OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); virtual; procedure OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); virtual;
procedure OnAcceleratedPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); virtual; procedure OnAcceleratedPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); virtual;
procedure OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; CursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo); virtual;
function OnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; virtual; function OnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; virtual;
procedure OnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); virtual; procedure OnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); virtual;
procedure OnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); virtual; procedure OnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); virtual;
@@ -89,7 +88,6 @@ type
procedure OnPopupSize(const browser: ICefBrowser; const rect: PCefRect); override; procedure OnPopupSize(const browser: ICefBrowser; const rect: PCefRect); override;
procedure OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); override; procedure OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); override;
procedure OnAcceleratedPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); override; procedure OnAcceleratedPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); override;
procedure OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo); override;
function GetScreenInfo(const browser: ICefBrowser; var screenInfo: TCefScreenInfo): Boolean; override; function GetScreenInfo(const browser: ICefBrowser; var screenInfo: TCefScreenInfo): Boolean; override;
function OnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; override; function OnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; override;
procedure OnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); override; procedure OnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); override;
@@ -264,23 +262,6 @@ begin
shared_handle); shared_handle);
end; end;
procedure cef_render_handler_on_cursor_change( self : PCefRenderHandler;
browser : PCefBrowser;
cursor : TCefCursorHandle;
type_ : TCefCursorType;
const custom_cursor_info : PCefCursorInfo); stdcall;
var
TempObject : TObject;
begin
TempObject := CefGetObject(self);
if (TempObject <> nil) and (TempObject is TCefRenderHandlerOwn) then
TCefRenderHandlerOwn(TempObject).OnCursorChange(TCefBrowserRef.UnWrap(browser),
cursor,
type_,
custom_cursor_info);
end;
function cef_render_handler_start_dragging(self : PCefRenderHandler; function cef_render_handler_start_dragging(self : PCefRenderHandler;
browser : PCefBrowser; browser : PCefBrowser;
drag_data : PCefDragData; drag_data : PCefDragData;
@@ -388,7 +369,6 @@ begin
on_popup_size := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_popup_size; on_popup_size := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_popup_size;
on_paint := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_paint; on_paint := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_paint;
on_accelerated_paint := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_accelerated_paint; on_accelerated_paint := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_accelerated_paint;
on_cursor_change := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_cursor_change;
start_dragging := {$IFDEF FPC}@{$ENDIF}cef_render_handler_start_dragging; start_dragging := {$IFDEF FPC}@{$ENDIF}cef_render_handler_start_dragging;
update_drag_cursor := {$IFDEF FPC}@{$ENDIF}cef_render_handler_update_drag_cursor; update_drag_cursor := {$IFDEF FPC}@{$ENDIF}cef_render_handler_update_drag_cursor;
on_scroll_offset_changed := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_scroll_offset_changed; on_scroll_offset_changed := {$IFDEF FPC}@{$ENDIF}cef_render_handler_on_scroll_offset_changed;
@@ -423,11 +403,6 @@ begin
// //
end; end;
procedure TCefRenderHandlerOwn.OnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; CursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo);
begin
//
end;
procedure TCefRenderHandlerOwn.OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); procedure TCefRenderHandlerOwn.OnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer);
begin begin
// //
@@ -547,14 +522,6 @@ begin
inherited GetViewRect(browser, rect); inherited GetViewRect(browser, rect);
end; end;
procedure TCustomRenderHandler.OnCursorChange(const browser : ICefBrowser;
cursor : TCefCursorHandle;
cursorType : TCefCursorType;
const customCursorInfo : PCefCursorInfo);
begin
if (FEvents <> nil) then IChromiumEvents(FEvents).doOnCursorChange(browser, cursor, cursorType, customCursorInfo);
end;
procedure TCustomRenderHandler.OnPaint(const browser : ICefBrowser; procedure TCustomRenderHandler.OnPaint(const browser : ICefBrowser;
kind : TCefPaintElementType; kind : TCefPaintElementType;
dirtyRectsCount : NativeUInt; dirtyRectsCount : NativeUInt;

View File

@@ -192,7 +192,6 @@ type
PCefPrintDialogCallback = ^TCefPrintDialogCallback; PCefPrintDialogCallback = ^TCefPrintDialogCallback;
PCefPrintJobCallback = ^TCefPrintJobCallback; PCefPrintJobCallback = ^TCefPrintJobCallback;
PCefUrlParts = ^TCefUrlParts; PCefUrlParts = ^TCefUrlParts;
PCefJsonParserError = ^TCefJsonParserError;
PCefStreamReader = ^TCefStreamReader; PCefStreamReader = ^TCefStreamReader;
PCefReadHandler = ^TCefReadHandler; PCefReadHandler = ^TCefReadHandler;
PCefWriteHandler = ^TCefWriteHandler; PCefWriteHandler = ^TCefWriteHandler;
@@ -542,20 +541,6 @@ type
right : Integer; right : Integer;
end; end;
// /include/internal/cef_types.h (cef_json_parser_error_t)
TCefJsonParserError = (
JSON_NO_ERROR = 0,
JSON_INVALID_ESCAPE,
JSON_SYNTAX_ERROR,
JSON_UNEXPECTED_TOKEN,
JSON_TRAILING_COMMA,
JSON_TOO_MUCH_NESTING,
JSON_UNEXPECTED_DATA_AFTER_ROOT,
JSON_UNSUPPORTED_ENCODING,
JSON_UNQUOTED_DICTIONARY_KEY,
JSON_PARSE_ERROR_COUNT
);
// /include/internal/cef_types.h (cef_state_t) // /include/internal/cef_types.h (cef_state_t)
TCefState = ( TCefState = (
STATE_DEFAULT = 0, STATE_DEFAULT = 0,
@@ -1550,6 +1535,7 @@ type
on_console_message : function(self: PCefDisplayHandler; browser: PCefBrowser; level: TCefLogSeverity; const message_, source: PCefString; line: Integer): Integer; stdcall; on_console_message : function(self: PCefDisplayHandler; browser: PCefBrowser; level: TCefLogSeverity; const message_, source: PCefString; line: Integer): Integer; stdcall;
on_auto_resize : function(self: PCefDisplayHandler; browser: PCefBrowser; const new_size: PCefSize): Integer; stdcall; on_auto_resize : function(self: PCefDisplayHandler; browser: PCefBrowser; const new_size: PCefSize): Integer; stdcall;
on_loading_progress_change : procedure(self: PCefDisplayHandler; browser: PCefBrowser; progress: double); stdcall; on_loading_progress_change : procedure(self: PCefDisplayHandler; browser: PCefBrowser; progress: double); stdcall;
on_cursor_change : function(self: PCefDisplayHandler; browser: PCefBrowser; cursor: TCefCursorHandle; type_: TCefCursorType; const custom_cursor_info: PCefCursorInfo): Integer; stdcall;
end; end;
// /include/capi/cef_download_handler_capi.h (cef_download_handler_t) // /include/capi/cef_download_handler_capi.h (cef_download_handler_t)
@@ -1752,7 +1738,6 @@ type
on_popup_size : procedure(self: PCefRenderHandler; browser: PCefBrowser; const rect: PCefRect); stdcall; on_popup_size : procedure(self: PCefRenderHandler; browser: PCefBrowser; const rect: PCefRect); stdcall;
on_paint : procedure(self: PCefRenderHandler; browser: PCefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); stdcall; on_paint : procedure(self: PCefRenderHandler; browser: PCefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); stdcall;
on_accelerated_paint : procedure(self: PCefRenderHandler; browser: PCefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); stdcall; on_accelerated_paint : procedure(self: PCefRenderHandler; browser: PCefBrowser; type_: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; shared_handle: Pointer); stdcall;
on_cursor_change : procedure(self: PCefRenderHandler; browser: PCefBrowser; cursor: TCefCursorHandle; type_: TCefCursorType; const custom_cursor_info: PCefCursorInfo); stdcall;
start_dragging : function(self: PCefRenderHandler; browser: PCefBrowser; drag_data: PCefDragData; allowed_ops: TCefDragOperations; x, y: Integer): Integer; stdcall; start_dragging : function(self: PCefRenderHandler; browser: PCefBrowser; drag_data: PCefDragData; allowed_ops: TCefDragOperations; x, y: Integer): Integer; stdcall;
update_drag_cursor : procedure(self: PCefRenderHandler; browser: PCefBrowser; operation: TCefDragOperation); stdcall; update_drag_cursor : procedure(self: PCefRenderHandler; browser: PCefBrowser; operation: TCefDragOperation); stdcall;
on_scroll_offset_changed : procedure(self: PCefRenderHandler; browser: PCefBrowser; x, y: Double); stdcall; on_scroll_offset_changed : procedure(self: PCefRenderHandler; browser: PCefBrowser; x, y: Double); stdcall;
@@ -2907,8 +2892,6 @@ type
execute_dev_tools_method : function(self: PCefBrowserHost; message_id: integer; const method: PCefString; params: PCefDictionaryValue): Integer; stdcall; execute_dev_tools_method : function(self: PCefBrowserHost; message_id: integer; const method: PCefString; params: PCefDictionaryValue): Integer; stdcall;
add_dev_tools_message_observer : function(self: PCefBrowserHost; observer: PCefDevToolsMessageObserver): PCefRegistration; stdcall; add_dev_tools_message_observer : function(self: PCefBrowserHost; observer: PCefDevToolsMessageObserver): PCefRegistration; stdcall;
get_navigation_entries : procedure(self: PCefBrowserHost; visitor: PCefNavigationEntryVisitor; current_only: Integer); stdcall; get_navigation_entries : procedure(self: PCefBrowserHost; visitor: PCefNavigationEntryVisitor; current_only: Integer); stdcall;
set_mouse_cursor_change_disabled : procedure(self: PCefBrowserHost; disabled: Integer); stdcall;
is_mouse_cursor_change_disabled : function(self: PCefBrowserHost): Integer; stdcall;
replace_misspelling : procedure(self: PCefBrowserHost; const word: PCefString); stdcall; replace_misspelling : procedure(self: PCefBrowserHost; const word: PCefString); stdcall;
add_word_to_dictionary : procedure(self: PCefBrowserHost; const word: PCefString); stdcall; add_word_to_dictionary : procedure(self: PCefBrowserHost; const word: PCefString); stdcall;
is_window_rendering_disabled : function(self: PCefBrowserHost): Integer; stdcall; is_window_rendering_disabled : function(self: PCefBrowserHost): Integer; stdcall;
@@ -2982,10 +2965,12 @@ type
// /include/capi/cef_browser_process_handler_capi.h (cef_browser_process_handler_t) // /include/capi/cef_browser_process_handler_capi.h (cef_browser_process_handler_t)
TCefBrowserProcessHandler = record TCefBrowserProcessHandler = record
base : TCefBaseRefCounted; base : TCefBaseRefCounted;
get_cookieable_schemes : procedure(self: PCefBrowserProcessHandler; schemes: TCefStringList; include_defaults: PInteger); stdcall;
on_context_initialized : procedure(self: PCefBrowserProcessHandler); stdcall; on_context_initialized : procedure(self: PCefBrowserProcessHandler); stdcall;
on_before_child_process_launch : procedure(self: PCefBrowserProcessHandler; command_line: PCefCommandLine); stdcall; on_before_child_process_launch : procedure(self: PCefBrowserProcessHandler; command_line: PCefCommandLine); stdcall;
get_print_handler : function(self: PCefBrowserProcessHandler): PCefPrintHandler; stdcall; get_print_handler : function(self: PCefBrowserProcessHandler): PCefPrintHandler; stdcall;
on_schedule_message_pump_work : procedure(self: PCefBrowserProcessHandler; delay_ms: Int64); stdcall; on_schedule_message_pump_work : procedure(self: PCefBrowserProcessHandler; delay_ms: Int64); stdcall;
get_default_client : function(self: PCefBrowserProcessHandler): PCefClient; stdcall;
end; end;
// /include/capi/cef_app_capi.h (cef_app_t) // /include/capi/cef_app_capi.h (cef_app_t)

View File

@@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 201, "InternalVersion" : 202,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "86.0.24.0" "Version" : "87.1.6.0"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {