1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2024-11-24 08:02:15 +02:00

Fixed code comments in FMX demos

This commit is contained in:
Salvador Díaz Fau 2020-02-16 17:29:31 +01:00
parent 2906c02231
commit bb33f5d6f5
3 changed files with 14 additions and 16 deletions

View File

@ -171,11 +171,12 @@ var
// Project -> Options -> Building -> Delphi compiler -> Conditional defines (All configurations)
// This is the destruction sequence in OSR mode :
// 1- FormCloseQuery sets CanClose to the initial FCanClose value (False) and calls chrmosr.CloseBrowser(True).
// 2- chrmosr.CloseBrowser(True) will trigger chrmosr.OnClose and we have to
// set "Result" to false and CEF will destroy the internal browser immediately.
// 3- chrmosr.OnBeforeClose is triggered because the internal browser was destroyed.
// Now we set FCanClose to True and send WM_CLOSE to the form.
// 1- FormCloseQuery sets CanClose to the initial FCanClose value (False) and
// calls chrmosr.CloseBrowser(True).
// 2- chrmosr.CloseBrowser(True) will trigger chrmosr.OnClose and the default
// implementation will destroy the internal browser immediately, which will
// trigger the chrmosr.OnBeforeClose event.
// 3- chrmosr.OnBeforeClose sets FCanClose to True and closes the form.
procedure CreateGlobalCEFApp;

View File

@ -122,7 +122,7 @@ uses
uFMXApplicationService;
// This demo shows how to use a TTabControl with TFrames that include
// CEF4Delphi browsers.
// CEF4Delphi browsers in OSR mode and using a message pump.
// Instead of a regular TTabItem we use a custom TBrowserTab class that
// inherits from TTabItem and instead of a regular TFrame we use a custom
@ -136,16 +136,13 @@ uses
// Then you find the tab with that unique TabID and you free it.
// TBrowserFrame has all the usual code to close CEF4Delphi browsers following
// a similar destruction sequence than the SimpleFMXBrowser demo :
// a similar destruction sequence than the FMXExternalPumpBrowser demo :
//
// 1. TBrowserTab.CloseBrowser calls TChromium.CloseBrowser which triggers the
// TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEF_DESTROYWINPARENT message to destroy
// CEFWindowParent1 in the main thread, which triggers the
// TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose executes the TBrowserFrame.OnBrowserDestroyed
// event which will be used in TBrowserTab to send a CEF_DESTROYTAB message
// to the main form to free the tab.
// 1- TChromium.CloseBrowser(True) will trigger TChromium.OnClose and the default
// implementation will destroy the internal browser immediately, which will
// trigger the TChromium.OnBeforeClose event.
// 2- TChromium.OnBeforeClose sends a CEF_DESTROYTAB message to the main form
// to free the tab.
// To close safely this demo you must close all the browser tabs first following
// this steps :

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 99,
"InternalVersion" : 100,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "79.1.36.0"
}