1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-01-03 10:15:38 +02:00

clearer comments, fixed uses clause and minor change in Chromium_OnAddressChange

This commit is contained in:
Salvador Díaz Fau 2017-09-23 12:35:36 +02:00
parent cc7de98947
commit 9656a1323f

View File

@ -44,13 +44,12 @@ interface
uses
{$IFDEF DELPHI16_UP}
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.Buttons, Vcl.ExtCtrls,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.Buttons, Vcl.ExtCtrls, Vcl.StdCtrls,
{$ELSE}
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms, Dialogs, ComCtrls, Buttons, ExtCtrls,
Controls, Forms, Dialogs, ComCtrls, Buttons, ExtCtrls, StdCtrls,
{$ENDIF}
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants,
Vcl.StdCtrls;
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes, uCEFConstants;
const
CEFBROWSER_DESTROYWNDPARENT = WM_APP + $100;
@ -121,9 +120,9 @@ implementation
// PageIndex of the Tab where they are included in the Message.lParam parameter if necessary.
// For simplicity the Button panel and the PageControl are disabled while adding or removing tab sheets.
// The Form can't be closed if it's desrtoying a tab.
// The Form can't be closed if it's destroying a tab.
// In case of closing a tab sheet, the destruction sequence is this :
// This is the destruction sequence when you remove a tab sheet:
// 1. RemoveTabBtnClick calls TChromium.CloseBrowser of the selected tab which triggers a TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROYWNDPARENT message to destroy TCEFWindowParent in the main thread which triggers a TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose sends a CEFBROWSER_DESTROYTAB message to destroy the tab in the main thread.
@ -261,7 +260,7 @@ var
begin
if (PageControl1.TabIndex >= 0) and
GetPageIndex(Sender, TempPageIndex) and
(PageControl1.Pages[PageControl1.TabIndex].PageIndex = TempPageIndex) then
(PageControl1.TabIndex = TempPageIndex) then
URLCbx.Text := url;
end;