1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-10-30 23:07:52 +02:00

Update to CEF 77.1.3

This commit is contained in:
Salvador Díaz Fau
2019-10-01 18:47:24 +02:00
parent 437c3bf4c0
commit 9f202b19c0
162 changed files with 252 additions and 504 deletions

View File

@@ -113,7 +113,6 @@ begin
GlobalCEFApp.BrowserSubprocessPath := 'OSRSubProcess.exe';
GlobalCEFApp.ExternalMessagePump := False;
GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// This demo uses a different EXE for the subprocesses.
// With this configuration it's not necessary to have the

View File

@@ -78,7 +78,6 @@ begin
GlobalCEFApp.SetCurrentDir := True;
GlobalCEFApp.ExternalMessagePump := False;
GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp.StartSubProcess;
GlobalCEFApp.Free;

View File

@@ -146,7 +146,6 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;

View File

@@ -12,7 +12,6 @@ object MainForm: TMainForm
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnShow = FormShow

View File

@@ -63,7 +63,6 @@ type
procedure FormCreate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
@@ -113,7 +112,6 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;
@@ -123,11 +121,6 @@ begin
ChromiumWindow1.LoadURL(Edit1.Text);
end;
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
FHandler := nil;
end;
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := FCanClose;
@@ -136,6 +129,7 @@ begin
begin
FClosing := True;
Visible := False;
FHandler := nil;
ChromiumWindow1.CloseBrowser(True);
end;
end;

View File

@@ -100,7 +100,6 @@ begin
GlobalCEFApp.UserDataPath := 'cef\User Data';
}
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp.SetCurrentDir := True;
GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';

View File

@@ -70,7 +70,6 @@ begin
GlobalCEFApp.UserDataPath := 'cef\User Data';
}
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp.SetCurrentDir := True;
GlobalCEFApp.StartSubProcess;

View File

@@ -343,7 +343,6 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.RemoteDebuggingPort := 9000;
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_OnProcessMessageReceived;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// Enabling the debug log file for then DOM visitor demo.
// This adds lots of warnings to the console, specially if you run this inside VirtualBox.

View File

@@ -174,8 +174,9 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp := TCefApplication.Create;
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;
procedure TForm1.FillColorBtnClick(Sender: TObject);

View File

@@ -128,7 +128,6 @@ begin
GlobalCEFApp.ExternalMessagePump := True;
GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TExternalPumpBrowserFrm.FormCreate(Sender: TObject);

View File

@@ -115,7 +115,6 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;

View File

@@ -44,7 +44,7 @@ interface
uses
{$IFDEF DELPHI16_UP}
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.SyncObjs,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.SyncObjs, System.UITypes,
{$ELSE}
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, ExtCtrls, SyncObjs,
@@ -119,7 +119,6 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -129,7 +129,6 @@ begin
// 4. Run this demo : JSSimpleWindowBinding
GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;

View File

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

View File

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

View File

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

View File

@@ -174,7 +174,6 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.EnableHighDPISupport := True;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TForm1.AppEventsMessage(var Msg: tagMSG; var Handled: Boolean);

View File

@@ -116,7 +116,6 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TMainForm.CreateMDIChild(const Name: string);

View File

@@ -129,7 +129,6 @@ begin
GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TMainForm.CreateMDIChild(const Name: string);

View File

@@ -290,11 +290,11 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
GlobalCEFApp.cache := 'cache';
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
GlobalCEFApp.cache := 'cache';
GlobalCEFApp.EnablePrintPreview := True;
//GlobalCEFApp.RemoteDebuggingPort := 19999;
end;

View File

@@ -187,7 +187,6 @@ begin
GlobalCEFApp.EnableHighDPISupport := True;
GlobalCEFApp.ExternalMessagePump := True;
GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
end;

View File

@@ -149,7 +149,6 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.EnableHighDPISupport := True;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
end;

View File

@@ -146,7 +146,6 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.EnableHighDPISupport := True;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;

View File

@@ -146,7 +146,6 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;
@@ -256,6 +255,7 @@ var
i : integer;
begin
TempArray := nil;
try
try
TempPostData := request.PostData;

View File

@@ -192,7 +192,6 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp.LogFile := 'cef.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;

View File

@@ -146,7 +146,6 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnRegCustomSchemes := GlobalCEFApp_OnRegCustomSchemes;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// GlobalCEFApp.LogFile := 'debug.log';
// GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;

View File

@@ -68,9 +68,6 @@ begin
GlobalCEFApp.UserDataPath := 'cef\User Data';
}
// Disabling some features to improve stability
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// You *MUST* call GlobalCEFApp.StartMainProcess in a if..then clause
// with the Application initialization inside the begin..end.
// Read this https://www.briskbard.com/index.php?lang=en&pageid=cef

View File

@@ -70,9 +70,6 @@ begin
GlobalCEFApp.UserDataPath := 'cef\User Data';
}
// Disabling some features to improve stability
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// You *MUST* call GlobalCEFApp.StartMainProcess in a if..then clause
// with the Application initialization inside the begin..end.
// Read this https://www.briskbard.com/index.php?lang=en&pageid=cef

View File

@@ -120,7 +120,6 @@ begin
GlobalCEFApp.ExternalMessagePump := True;
GlobalCEFApp.MultiThreadedMessageLoop := False;
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TSimpleExternalPumpBrowserFrm.FormCreate(Sender: TObject);

View File

@@ -181,7 +181,6 @@ begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.WindowlessRenderingEnabled := True;
GlobalCEFApp.EnableHighDPISupport := True;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// If you need transparency leave the GlobalCEFApp.BackgroundColor property
// with the default value or set the alpha channel to 0

View File

@@ -195,37 +195,55 @@ end;
procedure TSimpleServerFrm.ShowPostDataInfo(const aPostData : ICefPostData);
var
i, j : integer;
i : integer;
TempLen : NativeUInt;
TempList : IInterfaceList;
TempElement : ICefPostDataElement;
TempBytes : TBytes;
TempArray : TCefPostDataElementArray;
begin
if (aPostData = nil) then exit;
TempArray := nil;
i := 0;
j := aPostData.GetCount;
TempList := aPostData.GetElements(j);
while (i < j) do
begin
TempElement := TempList.Items[i] as ICefPostDataElement;
if (TempElement.GetBytesCount > 0) then
try
try
if (aPostData <> nil) and (aPostData.GetElementCount > 0) then
begin
SetLength(TempBytes, TempElement.GetBytesCount);
TempLen := TempElement.GetBytes(TempElement.GetBytesCount, @TempBytes[0]);
aPostData.GetElements(aPostData.GetElementCount, TempArray);
if (TempLen > 0) then
i := 0;
while (i < length(TempArray)) do
begin
ConnectionLogMem.Lines.Add('Post contents length : ' + inttostr(TempLen));
ConnectionLogMem.Lines.Add('Post contents sample : ' + BufferToString(TempBytes));
if (TempArray[i].GetBytesCount > 0) then
begin
SetLength(TempBytes, TempArray[i].GetBytesCount);
TempLen := TempArray[i].GetBytes(TempArray[i].GetBytesCount, @TempBytes[0]);
if (TempLen > 0) then
begin
ConnectionLogMem.Lines.Add('Post contents length : ' + inttostr(TempLen));
ConnectionLogMem.Lines.Add('Post contents sample : ' + BufferToString(TempBytes));
end;
end;
inc(i);
end;
i := 0;
while (i < length(TempArray)) do
begin
TempArray[i] := nil;
inc(i);
end;
end;
inc(i);
except
on e : exception do
if CustomExceptionHandler('TSimpleServerFrm.ShowPostDataInfo', e) then raise;
end;
finally
if (TempArray <> nil) then
begin
Finalize(TempArray);
TempArray := nil;
end;
end;
end;
function TSimpleServerFrm.BufferToString(const aBuffer : TBytes) : string;

View File

@@ -53,7 +53,6 @@ uses
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
// The main process and the subprocess *MUST* have the same GlobalCEFApp
// properties and events, specially FrameworkDirPath, ResourcesDirPath,

View File

@@ -65,7 +65,6 @@ begin
GlobalCEFApp.UserDataPath := 'cef\User Data';
}
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
GlobalCEFApp.BrowserSubprocessPath := 'SubProcess.exe';
// This demo uses a different EXE for the subprocesses.

View File

@@ -156,7 +156,6 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TMainForm.AddTabBtnClick(Sender: TObject);

View File

@@ -112,7 +112,6 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
end;
procedure TMainForm.CreateToolboxChild(const ChildCaption, URL: string);

View File

@@ -143,7 +143,8 @@ uses
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
//GlobalCEFApp.LogFile := 'cef.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_VERBOSE;
end;
procedure TURLRequestFrm.DownloadBtnClick(Sender: TObject);