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

Update to CEF 90.6.2

This commit is contained in:
Salvador Díaz Fau
2021-04-29 17:00:54 +02:00
parent f044e754fa
commit 8188dd2ca0
9 changed files with 55 additions and 64 deletions

View File

@ -50,7 +50,7 @@ uses
Controls, Forms, Dialogs, ComCtrls, StdCtrls,
{$ENDIF}
uCEFInterfaces, uCEFUrlRequestClientComponent, uCEFRequest, uCEFUrlRequest,
uCEFSentinel;
uCEFSentinel, uCEFUrlRequestClientEvents, uCEFTypes;
const
URLREQUEST_SUCCESS = WM_APP + $101;
@ -84,7 +84,6 @@ type
PostParam2NameEdt: TEdit;
PostParam2ValueEdt: TEdit;
procedure CEFSentinel1Close(Sender: TObject);
procedure DownloadBtnClick(Sender: TObject);
procedure SendPostReqBtnClick(Sender: TObject);
@ -144,7 +143,7 @@ implementation
// 3- in the TCEFUrlRequestClientComponent.OnRequestComplete event we set FCanClose to TRUE and send WM_CLOSE to the form.
uses
uCEFApplication, uCEFMiscFunctions, uCEFTypes, uCEFPostData, uCEFPostDataElement, uCEFConstants;
uCEFApplication, uCEFMiscFunctions, uCEFPostData, uCEFPostDataElement, uCEFConstants;
procedure CreateGlobalCEFApp;
begin
@ -202,9 +201,23 @@ begin
end;
end;
procedure TURLRequestFrm.CEFSentinel1Close(Sender: TObject);
procedure TURLRequestFrm.CEFUrlRequestClientComponent1DownloadData(
Sender: TObject; const request: ICefUrlRequest; data: Pointer;
dataLength: NativeUInt);
begin
try
if FClosing then
request.Cancel
else
if FSendingGET then
begin
if (data <> nil) and (dataLength > 0) then
FMemStream.WriteBuffer(data^, dataLength);
end;
except
on e : exception do
if CustomExceptionHandler('TURLRequestFrm.CEFUrlRequestClientComponent1DownloadData', e) then raise;
end;
end;
procedure TURLRequestFrm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@ -318,23 +331,6 @@ begin
end;
end;
procedure TURLRequestFrm.CEFUrlRequestClientComponent1DownloadData(Sender: TObject; const request: ICefUrlRequest; data: Pointer; dataLength: NativeUInt);
begin
try
if FClosing then
request.Cancel
else
if FSendingGET then
begin
if (data <> nil) and (dataLength > 0) then
FMemStream.WriteBuffer(data^, dataLength);
end;
except
on e : exception do
if CustomExceptionHandler('TURLRequestFrm.CEFUrlRequestClientComponent1DownloadData', e) then raise;
end;
end;
procedure TURLRequestFrm.CEFUrlRequestClientComponent1DownloadProgress(Sender: TObject; const request: ICefUrlRequest; current, total: Int64);
begin
if FClosing then