1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-12 22:07:39 +02:00

Update to CEF 76.1.5

This commit is contained in:
Salvador Díaz Fau
2019-08-01 18:20:42 +02:00
parent bb2adb076f
commit a189468639
123 changed files with 302 additions and 198 deletions

View File

@ -55,8 +55,7 @@ uses
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService';
CreateGlobalCEFApp;
if GlobalCEFApp.StartMainProcess then
begin
@ -68,6 +67,5 @@ begin
Application.Run;
end;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
DestroyGlobalCEFApp;
end.

View File

@ -99,6 +99,8 @@ type
var
JSDialogBrowserFrm: TJSDialogBrowserFrm;
procedure CreateGlobalCEFApp;
implementation
{$R *.dfm}
@ -114,6 +116,14 @@ uses
// 2. The TChromiumWindow.OnClose event calls TChromiumWindow.DestroyChildWindow which triggers the TChromiumWindow.OnBeforeClose event.
// 3. TChromiumWindow.OnBeforeClose sets FCanClose to True and closes the form.
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;
procedure TJSDialogBrowserFrm.FormCreate(Sender: TObject);
begin
FJSDialogInfoCS := TCriticalSection.Create;

View File

@ -524,7 +524,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnProcessMessageReceived := RenderProcessHandler_OnProcessMessageReceivedEvent;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSEvalFrm.Chromium1ProcessMessageReceived( Sender : TObject;

View File

@ -174,7 +174,7 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextCreated := GlobalCEFApp_OnContextCreated;
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_OnProcessMessageReceived;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSExecutingFunctionsFrm.GoBtnClick(Sender: TObject);

View File

@ -216,7 +216,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := GlobalCEFApp_OnWebKitInitialized;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
{$IFDEF INTFLOG}
GlobalCEFApp.LogFile := 'debug.log';

View File

@ -152,7 +152,7 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := {$IFNDEF DELPHI12_UP}TJSSimpleExtensionFrm.{$ENDIF}
GlobalCEFApp_OnWebKitInitializedEvent;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSExtensionWithFunctionFrm.GoBtnClick(Sender: TObject);

View File

@ -155,7 +155,7 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := {$IFNDEF DELPHI12_UP}TJSSimpleExtensionFrm.{$ENDIF}
GlobalCEFApp_OnWebKitInitializedEvent;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSExtensionWithObjectParameterFrm.GoBtnClick(Sender: TObject);

View File

@ -164,7 +164,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := GlobalCEFApp_OnWebKitInitialized;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSRTTIExtensionFrm.GoBtnClick(Sender: TObject);

View File

@ -142,7 +142,7 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := {$IFNDEF DELPHI12_UP}TJSSimpleExtensionFrm.{$ENDIF}
GlobalCEFApp_OnWebKitInitializedEvent;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSSimpleExtensionFrm.GoBtnClick(Sender: TObject);

View File

@ -130,7 +130,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextCreated := GlobalCEFApp_OnContextCreated;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSSimpleWindowBindingFrm.GoBtnClick(Sender: TObject);

View File

@ -56,19 +56,7 @@ uses
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
begin
GlobalCEFApp := TCefApplication.Create;
// This is the same demo than the JSSimpleWindowBinding but using a different executable for the subprocesses.
// Notice that GlobalCEFApp.OnContextCreated is now defined in the SubProcess.
// Follow these steps to test this demo :
// 1. Build the SubProcess project in this directory.
// 2. Copy the CEF binaries to the BIN directory in CEF4Delphi.
// 3. Build this project : JSSimpleWindowBinding
// 4. Run this demo : JSSimpleWindowBinding
GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';
GlobalCEFApp.DisableFeatures := 'NetworkService';
CreateGlobalCEFApp;
if GlobalCEFApp.StartMainProcess then
begin
@ -80,6 +68,5 @@ begin
Application.Run;
end;
GlobalCEFApp.Free;
GlobalCEFApp := nil;
DestroyGlobalCEFApp;
end.

View File

@ -66,9 +66,9 @@ begin
end;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextCreated := GlobalCEFApp_OnContextCreated;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// The main process and the subprocess *MUST* have the same FrameworkDirPath, ResourcesDirPath,
// LocalesDirPath, cache, cookies and UserDataPath paths

View File

@ -97,6 +97,8 @@ type
var
JSSimpleWindowBindingFrm: TJSSimpleWindowBindingFrm;
procedure CreateGlobalCEFApp;
implementation
{$R *.dfm}
@ -113,6 +115,25 @@ implementation
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
// This is the same demo than the JSSimpleWindowBinding but using a different executable for the subprocesses.
// Notice that GlobalCEFApp.OnContextCreated is now defined in the SubProcess.
// Follow these steps to test this demo :
// 1. Build the SubProcess project in this directory.
// 2. Copy the CEF binaries to the BIN directory in CEF4Delphi.
// 3. Build this project : JSSimpleWindowBinding
// 4. Run this demo : JSSimpleWindowBinding
GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;
procedure TJSSimpleWindowBindingFrm.GoBtnClick(Sender: TObject);
begin
Chromium1.LoadURL(Edit1.Text);

View File

@ -135,7 +135,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextCreated := GlobalCEFApp_OnContextCreated;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSWindowBindingWithFunctionFrm.GoBtnClick(Sender: TObject);

View File

@ -136,7 +136,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextCreated := GlobalCEFApp_OnContextCreated;
GlobalCEFApp.DisableFeatures := 'NetworkService';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TJSWindowBindingWithObjectFrm.GoBtnClick(Sender: TObject);