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

Update to CEF 80.0.4

- Added GlobalCEFApp.DisableNewBrowserInfoTimeout property
- Removed remaining TCEFSentinel from all the demos.
- Fixed mouse coordinates in FMX demos with OSR browsers before sending a mouse wheel event.
This commit is contained in:
Salvador Díaz Fau
2020-02-26 13:28:29 +01:00
parent a20752eb53
commit feaeb772cb
149 changed files with 7651 additions and 929 deletions

View File

@ -57,7 +57,6 @@ type
{ TForm1 }
TForm1 = class(TForm)
CEFSentinel1: TCEFSentinel;
ChromiumWindow1: TChromiumWindow;
AddressPnl: TPanel;
AddressEdt: TEdit;
@ -115,8 +114,7 @@ uses
// =================
// 1. The FormCloseQuery event sets CanClose to False and calls TChromiumWindow.CloseBrowser, which triggers the TChromiumWindow.OnClose event.
// 2. The TChromiumWindow.OnClose event calls TChromiumWindow.DestroyChildWindow which triggers the TChromiumWindow.OnBeforeClose event.
// 3. TChromiumWindow.OnBeforeClose calls TCEFSentinel.Start, which will trigger TCEFSentinel.OnClose when the renderer processes are closed.
// 4. TCEFSentinel.OnClose sets FCanClose := True and sends WM_CLOSE to the form.
// 3. TChromiumWindow.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
@ -153,12 +151,17 @@ end;
procedure TForm1.ChromiumWindow1Close(Sender: TObject);
begin
// DestroyChildWindow will destroy the child window created by CEF at the top of the Z order.
if not(ChromiumWindow1.DestroyChildWindow) then CEFSentinel1.Start;
if not(ChromiumWindow1.DestroyChildWindow) then
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
end;
procedure TForm1.ChromiumWindow1BeforeClose(Sender: TObject);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TForm1.Chromium_OnBeforePopup(Sender: TObject;
@ -191,8 +194,7 @@ end;
procedure TForm1.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TForm1.Timer1Timer(Sender: TObject);