You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Update to CEF 90.6.2
This commit is contained in:
@@ -16,7 +16,7 @@ object URLRequestFrm: TURLRequestFrm
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.0.6.0'
|
||||
LCLVersion = '2.0.12.0'
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Height = 23
|
||||
@@ -192,15 +192,15 @@ object URLRequestFrm: TURLRequestFrm
|
||||
end
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
left = 448
|
||||
top = 104
|
||||
Left = 448
|
||||
Top = 104
|
||||
end
|
||||
object CEFUrlRequestClientComponent1: TCEFUrlRequestClientComponent
|
||||
OnRequestComplete = CEFUrlRequestClientComponent1RequestComplete
|
||||
OnDownloadProgress = CEFUrlRequestClientComponent1DownloadProgress
|
||||
OnDownloadData = CEFUrlRequestClientComponent1DownloadData
|
||||
OnCreateURLRequest = CEFUrlRequestClientComponent1CreateURLRequest
|
||||
left = 304
|
||||
top = 104
|
||||
Left = 304
|
||||
Top = 104
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user