You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Update to CEF 79.1.35
- Added groups to the demos with a secondary subprocess project - Added some conditional directives for MacOS (MACOS IS NOT SUPPORTED YET!) - Removed some Windows dependencies in the FMXExternalPumpBrowser demo - Added TChromium.ParentFormHandle property
This commit is contained in:
@ -61,12 +61,10 @@ type
|
||||
ButtonPnl: TPanel;
|
||||
Edit1: TEdit;
|
||||
Button1: TButton;
|
||||
CEFSentinel1: TCEFSentinel;
|
||||
Timer1: TTimer;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure CEFSentinel1Close(Sender: TObject);
|
||||
procedure Timer1Timer(Sender: TObject);
|
||||
private
|
||||
// Variables to control when can we destroy the form safely
|
||||
@ -103,8 +101,7 @@ uses
|
||||
// Destruction steps
|
||||
// =================
|
||||
// 1. Destroy all child forms
|
||||
// 2. Wait until all the child forms are closed before calling TCEFSentinel.Start, which will trigger TCEFSentinel.OnClose when all renderer processes are closed
|
||||
// 3. TCEFSentinel.OnClose closes the main form.
|
||||
// 2. Wait until all the child forms are closed before closing the main form.
|
||||
|
||||
procedure TMainForm.CreateToolboxChild(const ChildCaption, URL: string);
|
||||
var
|
||||
@ -217,7 +214,11 @@ end;
|
||||
procedure TMainForm.ChildDestroyedMsg(var aMessage : TMessage);
|
||||
begin
|
||||
// If there are no more child forms we can destroy the main form
|
||||
if FClosing and (ChildFormCount = 0) then CEFSentinel1.Start;
|
||||
if FClosing and (ChildFormCount = 0) then
|
||||
begin
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TMainForm.CloseQuery: Boolean;
|
||||
@ -241,12 +242,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.CEFSentinel1Close(Sender: TObject);
|
||||
begin
|
||||
FCanClose := True;
|
||||
PostMessage(Handle, WM_CLOSE, 0, 0);
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
CheckCEFInitialization;
|
||||
|
Reference in New Issue
Block a user