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

Update to CEF 3.3538.1852.gcb937fc

- Bug fix #139
- Added a LoadHandler in the render process.
- Added TCefApplication.OnLoadingStateChange
- Added TCefApplication.OnLoadStart
- Added TCefApplication.OnLoadEnd
- Added TCefApplication.OnLoadError
- Fixed a Delphi XE2 compilation issue.
This commit is contained in:
Salvador Díaz Fau
2018-11-15 19:08:16 +01:00
parent 428ae519b9
commit 10c9a99805
5 changed files with 189 additions and 11 deletions

View File

@@ -79,12 +79,14 @@ type
TCefCustomRenderProcessHandler = class(TCefRenderProcessHandlerOwn)
protected
FCefApp : TCefApplication;
FCefApp : TCefApplication;
FLoadHandler : ICefLoadHandler;
procedure OnRenderThreadCreated(const extraInfo: ICefListValue); override;
procedure OnWebKitInitialized; override;
procedure OnBrowserCreated(const browser: ICefBrowser); override;
procedure OnBrowserDestroyed(const browser: ICefBrowser); override;
function GetLoadHandler: ICefLoadHandler; override;
procedure OnContextCreated(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context); override;
procedure OnContextReleased(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context); override;
procedure OnUncaughtException(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context; const V8Exception: ICefV8Exception; const stackTrace: ICefV8StackTrace); override;
@@ -104,7 +106,7 @@ uses
{$ELSE}
SysUtils,
{$ENDIF}
uCEFMiscFunctions, uCEFLibFunctions, uCEFConstants;
uCEFMiscFunctions, uCEFLibFunctions, uCEFConstants, uCEFLoadHandler;
procedure cef_render_process_handler_on_render_thread_created(self : PCefRenderProcessHandler;
extra_info : PCefListValue); stdcall;
@@ -284,11 +286,17 @@ begin
inherited Create;
FCefApp := aCefApp;
if (FCefApp <> nil) and FCefApp.MustCreateLoadHandler then
FLoadHandler := TCustomRenderLoadHandler.Create(FCefApp)
else
FLoadHandler := nil;
end;
destructor TCefCustomRenderProcessHandler.Destroy;
begin
FCefApp := nil;
FCefApp := nil;
FLoadHandler := nil;
inherited Destroy;
end;
@@ -333,6 +341,14 @@ begin
end;
end;
function TCefCustomRenderProcessHandler.GetLoadHandler: ICefLoadHandler;
begin
if (FLoadHandler <> nil) then
Result := FLoadHandler
else
Result := inherited GetLoadHandler;
end;
procedure TCefCustomRenderProcessHandler.OnContextCreated(const browser : ICefBrowser;
const frame : ICefFrame;
const context : ICefv8Context);