1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-12-03 21:44:45 +02:00
This commit is contained in:
Salvador Díaz Fau
2017-09-08 17:27:05 +02:00
parent f7ca8a7a93
commit 3a83a13639
20 changed files with 211 additions and 401 deletions

View File

@@ -101,7 +101,7 @@ implementation
// Destruction steps
// =================
// 1. FormCloseQuery calls TChromium.CloseBrowser
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 and Chromium1 in the main thread.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread.
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure TChildForm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
@@ -118,6 +118,7 @@ end;
procedure TChildForm.Chromium1Close(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
begin
PostMessage(Handle, CEFBROWSER_DESTROY, 0, 0);
Result := False;
end;
procedure TChildForm.Chromium1KeyEvent(Sender: TObject;
@@ -244,7 +245,6 @@ end;
procedure TChildForm.BrowserDestroyMsg(var aMessage : TMessage);
begin
CEFWindowParent1.Free;
Chromium1.Free;
end;
end.