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

@ -22,15 +22,15 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="235"/>
<CursorPos X="51" Y="233"/>
<TopLine Value="253"/>
<CursorPos X="45" Y="271"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
</Units>
<JumpHistory Count="11" HistoryIndex="10">
<JumpHistory Count="13" HistoryIndex="12">
<Position1>
<Filename Value="JSDialogBrowser.lpr"/>
</Position1>
@ -74,6 +74,14 @@
<Filename Value="uJSDialogBrowser.pas"/>
<Caret Line="93" Column="59" TopLine="82"/>
</Position11>
<Position12>
<Filename Value="uJSDialogBrowser.pas"/>
<Caret Line="233" Column="51" TopLine="234"/>
</Position12>
<Position13>
<Filename Value="uJSDialogBrowser.pas"/>
<Caret Line="232" Column="51" TopLine="232"/>
</Position13>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -15,7 +15,7 @@ object JSDialogBrowserFrm: TJSDialogBrowserFrm
OnDestroy = FormDestroy
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object ChromiumWindow1: TChromiumWindow
Left = 0
Height = 603
@ -65,9 +65,4 @@ object JSDialogBrowserFrm: TJSDialogBrowserFrm
left = 56
top = 88
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 128
top = 88
end
end

View File

@ -60,7 +60,6 @@ type
{ TJSDialogBrowserFrm }
TJSDialogBrowserFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
ChromiumWindow1: TChromiumWindow;
AddressPnl: TPanel;
AddressEdt: TEdit;
@ -259,13 +258,18 @@ end;
procedure TJSDialogBrowserFrm.ChromiumWindow1BeforeClose(Sender: TObject);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSDialogBrowserFrm.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 TJSDialogBrowserFrm.Chromium_OnBeforePopup(Sender: TObject;

View File

@ -23,10 +23,10 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<TopLine Value="169"/>
<CursorPos X="82" Y="183"/>
<CursorPos X="31" Y="181"/>
<UsageCount Value="21"/>
<Bookmarks Count="1">
<Item0 X="85" Y="487" ID="1"/>
<Item0 X="85" Y="485" ID="1"/>
</Bookmarks>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -115,127 +115,123 @@
<UsageCount Value="10"/>
</Unit13>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<JumpHistory Count="29" HistoryIndex="28">
<Position1>
<Filename Value="uJSEval.pas"/>
<Caret Line="115" Column="25" TopLine="79"/>
<Caret Line="373" Column="76" TopLine="336"/>
</Position1>
<Position2>
<Filename Value="uJSEval.pas"/>
<Caret Line="15" Column="103"/>
<Caret Line="470" Column="70" TopLine="433"/>
</Position2>
<Position3>
<Filename Value="uJSEval.pas"/>
<Caret Line="64" Column="90" TopLine="26"/>
<Caret Line="524" Column="40" TopLine="487"/>
</Position3>
<Position4>
<Filename Value="uJSEval.pas"/>
<Caret Line="373" Column="76" TopLine="336"/>
<Caret Line="555" Column="39" TopLine="518"/>
</Position4>
<Position5>
<Filename Value="uJSEval.pas"/>
<Caret Line="470" Column="70" TopLine="433"/>
<Caret Line="63" Column="18" TopLine="41"/>
</Position5>
<Position6>
<Filename Value="uJSEval.pas"/>
<Caret Line="524" Column="40" TopLine="487"/>
<Caret Line="373" Column="76" TopLine="336"/>
</Position6>
<Position7>
<Filename Value="uJSEval.pas"/>
<Caret Line="555" Column="39" TopLine="518"/>
<Filename Value="JSEval.lpr"/>
<Caret Line="60" Column="76" TopLine="44"/>
</Position7>
<Position8>
<Filename Value="uJSEval.pas"/>
<Caret Line="63" Column="18" TopLine="41"/>
<Caret Line="125" Column="29" TopLine="114"/>
</Position8>
<Position9>
<Filename Value="uJSEval.pas"/>
<Caret Line="373" Column="76" TopLine="336"/>
<Caret Line="536" Column="38" TopLine="518"/>
</Position9>
<Position10>
<Filename Value="JSEval.lpr"/>
<Caret Line="60" Column="76" TopLine="44"/>
<Filename Value="uJSEval.pas"/>
<Caret Line="511" Column="75" TopLine="499"/>
</Position10>
<Position11>
<Filename Value="uJSEval.pas"/>
<Caret Line="125" Column="29" TopLine="114"/>
<Caret Line="463" Column="50" TopLine="452"/>
</Position11>
<Position12>
<Filename Value="uJSEval.pas"/>
<Caret Line="536" Column="38" TopLine="518"/>
<Caret Line="372" TopLine="360"/>
</Position12>
<Position13>
<Filename Value="uJSEval.pas"/>
<Caret Line="511" Column="75" TopLine="499"/>
<Caret Line="54" Column="73" TopLine="24"/>
</Position13>
<Position14>
<Filename Value="uJSEval.pas"/>
<Caret Line="463" Column="50" TopLine="452"/>
<Caret Line="51" Column="90" TopLine="24"/>
</Position14>
<Position15>
<Filename Value="uJSEval.pas"/>
<Caret Line="372" TopLine="360"/>
<Caret Line="59" Column="37" TopLine="24"/>
</Position15>
<Position16>
<Filename Value="uJSEval.pas"/>
<Caret Line="54" Column="73" TopLine="24"/>
<Caret Line="181" Column="63" TopLine="162"/>
</Position16>
<Position17>
<Filename Value="uJSEval.pas"/>
<Caret Line="51" Column="90" TopLine="24"/>
<Filename Value="JSEval.lpr"/>
<Caret Line="60" Column="76" TopLine="41"/>
</Position17>
<Position18>
<Filename Value="uJSEval.pas"/>
<Caret Line="59" Column="37" TopLine="24"/>
<Caret Line="125" Column="11" TopLine="121"/>
</Position18>
<Position19>
<Filename Value="uJSEval.pas"/>
<Caret Line="181" Column="63" TopLine="162"/>
<Caret Line="542" Column="86" TopLine="533"/>
</Position19>
<Position20>
<Filename Value="JSEval.lpr"/>
<Caret Line="60" Column="76" TopLine="41"/>
<Filename Value="uJSEval.pas"/>
<Caret Line="94" Column="43" TopLine="77"/>
</Position20>
<Position21>
<Filename Value="uJSEval.pas"/>
<Caret Line="125" Column="11" TopLine="121"/>
<Caret Line="210" Column="39" TopLine="203"/>
</Position21>
<Position22>
<Filename Value="uJSEval.pas"/>
<Caret Line="542" Column="86" TopLine="533"/>
<Caret Line="86" Column="71" TopLine="76"/>
</Position22>
<Position23>
<Filename Value="uJSEval.pas"/>
<Caret Line="94" Column="43" TopLine="77"/>
<Caret Line="510" Column="62" TopLine="492"/>
</Position23>
<Position24>
<Filename Value="uJSEval.pas"/>
<Caret Line="210" Column="39" TopLine="203"/>
<Filename Value="JSEval.lpr"/>
<Caret Line="60" Column="76" TopLine="41"/>
</Position24>
<Position25>
<Filename Value="uJSEval.pas"/>
<Caret Line="86" Column="71" TopLine="76"/>
<Caret Line="126" Column="11" TopLine="109"/>
</Position25>
<Position26>
<Filename Value="uJSEval.pas"/>
<Caret Line="510" Column="62" TopLine="492"/>
<Caret Line="542" TopLine="538"/>
</Position26>
<Position27>
<Filename Value="JSEval.lpr"/>
<Caret Line="60" Column="76" TopLine="41"/>
<Filename Value="uJSEval.pas"/>
<Caret Line="552" TopLine="548"/>
</Position27>
<Position28>
<Filename Value="uJSEval.pas"/>
<Caret Line="126" Column="11" TopLine="109"/>
<Caret Line="183" Column="82" TopLine="169"/>
</Position28>
<Position29>
<Filename Value="uJSEval.pas"/>
<Caret Line="542" TopLine="538"/>
<Caret Line="182" Column="82" TopLine="168"/>
</Position29>
<Position30>
<Filename Value="uJSEval.pas"/>
<Caret Line="552" TopLine="548"/>
</Position30>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -13,7 +13,7 @@ object JSEvalFrm: TJSEvalFrm
OnCloseQuery = FormCloseQuery
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object CEFWindowParent1: TCEFWindowParent
Left = 0
Height = 550
@ -73,9 +73,4 @@ object JSEvalFrm: TJSEvalFrm
left = 16
top = 96
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 16
top = 160
end
end

View File

@ -67,7 +67,6 @@ type
{ TJSEvalFrm }
TJSEvalFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
CEFWindowParent1: TCEFWindowParent;
Chromium1: TChromium;
AddressBarPnl: TPanel;
@ -179,8 +178,7 @@ uses
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure TJSEvalFrm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
begin
@ -189,14 +187,14 @@ end;
procedure TJSEvalFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSEvalFrm.Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSEvalFrm.Chromium1BeforeContextMenu(Sender : TObject;

View File

@ -22,8 +22,8 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="194"/>
<CursorPos X="22" Y="200"/>
<TopLine Value="260"/>
<CursorPos Y="283"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -53,7 +53,7 @@
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
</Units>
<JumpHistory Count="11" HistoryIndex="10">
<JumpHistory Count="15" HistoryIndex="14">
<Position1>
<Filename Value="uJSExecutingFunctions.pas"/>
</Position1>
@ -97,6 +97,22 @@
<Filename Value="uJSExecutingFunctions.pas"/>
<Caret Line="145" Column="82" TopLine="143"/>
</Position11>
<Position12>
<Filename Value="uJSExecutingFunctions.pas"/>
<Caret Line="200" Column="22" TopLine="194"/>
</Position12>
<Position13>
<Filename Value="uJSExecutingFunctions.pas"/>
<Caret Line="199" Column="22" TopLine="193"/>
</Position13>
<Position14>
<Filename Value="uJSExecutingFunctions.pas"/>
<Caret Line="187" Column="95" TopLine="181"/>
</Position14>
<Position15>
<Filename Value="uJSExecutingFunctions.pas"/>
<Caret Line="200" Column="31" TopLine="181"/>
</Position15>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -15,7 +15,7 @@ object JSExecutingFunctionsFrm: TJSExecutingFunctionsFrm
OnDestroy = FormDestroy
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -72,9 +72,4 @@ object JSExecutingFunctionsFrm: TJSExecutingFunctionsFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 352
end
end

View File

@ -64,7 +64,6 @@ type
{ TJSExecutingFunctionsFrm }
TJSExecutingFunctionsFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -197,7 +196,8 @@ end;
procedure TJSExecutingFunctionsFrm.Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExecutingFunctionsFrm.Chromium1BeforeContextMenu(
@ -280,8 +280,7 @@ end;
procedure TJSExecutingFunctionsFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExecutingFunctionsFrm.WMMove(var aMessage : TWMMove);

View File

@ -22,8 +22,8 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="274"/>
<CursorPos X="56" Y="286"/>
<TopLine Value="462"/>
<CursorPos Y="485"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -52,124 +52,124 @@
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="uJSExtension.pas"/>
<Caret Line="125" Column="23" TopLine="106"/>
<Filename Value="uTestExtensionHandler.pas"/>
<Caret Line="94" Column="56" TopLine="41"/>
</Position1>
<Position2>
<Filename Value="uJSExtension.pas"/>
<Caret Line="223" Column="56" TopLine="219"/>
<Caret Line="312" Column="54" TopLine="301"/>
</Position2>
<Position3>
<Filename Value="uJSExtension.pas"/>
<Caret Line="98" Column="43" TopLine="94"/>
<Filename Value="JSExtension.lpr"/>
<Caret Line="60" Column="17" TopLine="42"/>
</Position3>
<Position4>
<Filename Value="uJSExtension.pas"/>
<Caret Line="265" Column="39" TopLine="258"/>
<Caret Line="126" TopLine="111"/>
</Position4>
<Position5>
<Filename Value="uTestExtensionHandler.pas"/>
<Caret Line="94" Column="56" TopLine="41"/>
<Filename Value="uJSExtension.pas"/>
<Caret Line="136" Column="39" TopLine="127"/>
</Position5>
<Position6>
<Filename Value="uJSExtension.pas"/>
<Caret Line="312" Column="54" TopLine="301"/>
<Caret Line="144" Column="114" TopLine="127"/>
</Position6>
<Position7>
<Filename Value="JSExtension.lpr"/>
<Caret Line="60" Column="17" TopLine="42"/>
<Filename Value="uJSExtension.pas"/>
<Caret Line="150" Column="74" TopLine="127"/>
</Position7>
<Position8>
<Filename Value="uJSExtension.pas"/>
<Caret Line="126" TopLine="111"/>
<Caret Line="199" Column="41" TopLine="173"/>
</Position8>
<Position9>
<Filename Value="uJSExtension.pas"/>
<Caret Line="136" Column="39" TopLine="127"/>
<Caret Line="201" Column="92" TopLine="173"/>
</Position9>
<Position10>
<Filename Value="uJSExtension.pas"/>
<Caret Line="144" Column="114" TopLine="127"/>
<Caret Line="205" Column="77" TopLine="173"/>
</Position10>
<Position11>
<Filename Value="uJSExtension.pas"/>
<Caret Line="150" Column="74" TopLine="127"/>
<Caret Line="207" Column="18" TopLine="173"/>
</Position11>
<Position12>
<Filename Value="uJSExtension.pas"/>
<Caret Line="199" Column="41" TopLine="173"/>
<Caret Line="31" Column="76"/>
</Position12>
<Position13>
<Filename Value="uJSExtension.pas"/>
<Caret Line="201" Column="92" TopLine="173"/>
<Caret Line="149" Column="96" TopLine="108"/>
</Position13>
<Position14>
<Filename Value="uJSExtension.pas"/>
<Caret Line="205" Column="77" TopLine="173"/>
<Caret Line="150" Column="73" TopLine="127"/>
</Position14>
<Position15>
<Filename Value="uJSExtension.pas"/>
<Caret Line="207" Column="18" TopLine="173"/>
<Caret Line="199" Column="40" TopLine="173"/>
</Position15>
<Position16>
<Filename Value="uJSExtension.pas"/>
<Caret Line="31" Column="76"/>
<Caret Line="201" Column="91" TopLine="173"/>
</Position16>
<Position17>
<Filename Value="uJSExtension.pas"/>
<Caret Line="149" Column="96" TopLine="108"/>
<Caret Line="205" Column="75" TopLine="173"/>
</Position17>
<Position18>
<Filename Value="uJSExtension.pas"/>
<Caret Line="150" Column="73" TopLine="127"/>
<Caret Line="61" Column="30" TopLine="47"/>
</Position18>
<Position19>
<Filename Value="uJSExtension.pas"/>
<Caret Line="199" Column="40" TopLine="173"/>
<Caret Line="322" TopLine="303"/>
</Position19>
<Position20>
<Filename Value="uJSExtension.pas"/>
<Caret Line="201" Column="91" TopLine="173"/>
<Caret Line="324" TopLine="305"/>
</Position20>
<Position21>
<Filename Value="uJSExtension.pas"/>
<Caret Line="205" Column="75" TopLine="173"/>
<Caret Line="486" Column="3" TopLine="483"/>
</Position21>
<Position22>
<Filename Value="uJSExtension.pas"/>
<Caret Line="61" Column="30" TopLine="47"/>
<Caret Line="108" Column="15" TopLine="82"/>
</Position22>
<Position23>
<Filename Value="uJSExtension.pas"/>
<Caret Line="322" TopLine="303"/>
<Caret Line="343" TopLine="339"/>
</Position23>
<Position24>
<Filename Value="uJSExtension.pas"/>
<Caret Line="324" TopLine="305"/>
<Caret Line="486" Column="40" TopLine="483"/>
</Position24>
<Position25>
<Filename Value="uJSExtension.pas"/>
<Caret Line="486" Column="3" TopLine="483"/>
<Caret Line="108" Column="31" TopLine="81"/>
</Position25>
<Position26>
<Filename Value="uJSExtension.pas"/>
<Caret Line="108" Column="15" TopLine="82"/>
<Caret Line="343" Column="22" TopLine="339"/>
</Position26>
<Position27>
<Filename Value="uJSExtension.pas"/>
<Caret Line="343" TopLine="339"/>
<Caret Line="286" Column="56" TopLine="274"/>
</Position27>
<Position28>
<Filename Value="uJSExtension.pas"/>
<Caret Line="486" Column="40" TopLine="483"/>
<Caret Line="285" Column="56" TopLine="273"/>
</Position28>
<Position29>
<Filename Value="uJSExtension.pas"/>
<Caret Line="108" Column="31" TopLine="81"/>
<Caret Line="295" Column="9" TopLine="273"/>
</Position29>
<Position30>
<Filename Value="uJSExtension.pas"/>
<Caret Line="343" Column="22" TopLine="339"/>
<Caret Line="343" Column="41" TopLine="324"/>
</Position30>
</JumpHistory>
<RunParams>

View File

@ -14,7 +14,7 @@ object JSExtensionFrm: TJSExtensionFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -81,9 +81,4 @@ object JSExtensionFrm: TJSExtensionFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 365
end
end

View File

@ -69,7 +69,6 @@ type
{ TJSExtensionFrm }
TJSExtensionFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -340,7 +339,8 @@ end;
procedure TJSExtensionFrm.Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExtensionFrm.Chromium1BeforeContextMenu(Sender: TObject;
@ -482,8 +482,7 @@ end;
procedure TJSExtensionFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExtensionFrm.WMMove(var aMessage : TWMMove);

View File

@ -22,8 +22,8 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="109"/>
<CursorPos X="77" Y="130"/>
<TopLine Value="169"/>
<CursorPos X="42" Y="173"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -56,7 +56,7 @@
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
</Units>
<JumpHistory Count="14" HistoryIndex="13">
<JumpHistory Count="18" HistoryIndex="17">
<Position1>
<Filename Value="uJSExtensionWithFunction.pas"/>
</Position1>
@ -112,6 +112,22 @@
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="173" TopLine="154"/>
</Position14>
<Position15>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="130" Column="77" TopLine="109"/>
</Position15>
<Position16>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="129" Column="77" TopLine="108"/>
</Position16>
<Position17>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="128" Column="72" TopLine="108"/>
</Position17>
<Position18>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="236" TopLine="219"/>
</Position18>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -14,7 +14,7 @@ object JSExtensionWithFunctionFrm: TJSExtensionWithFunctionFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -80,9 +80,4 @@ object JSExtensionWithFunctionFrm: TJSExtensionWithFunctionFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 360
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSExtensionWithFunctionFrm }
TJSExtensionWithFunctionFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -126,8 +125,7 @@ uses
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the
procedure GlobalCEFApp_OnWebKitInitializedEvent;
var
@ -171,7 +169,8 @@ end;
procedure TJSExtensionWithFunctionFrm.Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExtensionWithFunctionFrm.Chromium1BeforePopup(Sender: TObject;
@ -235,8 +234,7 @@ end;
procedure TJSExtensionWithFunctionFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExtensionWithFunctionFrm.WMMove(var aMessage : TWMMove);

View File

@ -22,8 +22,8 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="94"/>
<CursorPos X="37" Y="125"/>
<TopLine Value="116"/>
<CursorPos X="31" Y="127"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -37,7 +37,7 @@
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
</Units>
<JumpHistory Count="6" HistoryIndex="5">
<JumpHistory Count="11" HistoryIndex="10">
<Position1>
<Filename Value="uJSExtensionWithObjectParameter.pas"/>
</Position1>
@ -61,6 +61,26 @@
<Filename Value="uJSExtensionWithObjectParameter.pas"/>
<Caret Line="161" TopLine="138"/>
</Position6>
<Position7>
<Filename Value="uJSExtensionWithObjectParameter.pas"/>
<Caret Line="125" Column="37" TopLine="94"/>
</Position7>
<Position8>
<Filename Value="uJSExtensionWithObjectParameter.pas"/>
<Caret Line="124" Column="37" TopLine="95"/>
</Position8>
<Position9>
<Filename Value="uJSExtensionWithObjectParameter.pas"/>
<Caret Line="111" Column="104" TopLine="95"/>
</Position9>
<Position10>
<Filename Value="uJSExtensionWithObjectParameter.pas"/>
<Caret Line="128" Column="69" TopLine="104"/>
</Position10>
<Position11>
<Filename Value="uJSExtensionWithObjectParameter.pas"/>
<Caret Line="227" TopLine="204"/>
</Position11>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -14,7 +14,7 @@ object JSExtensionWithObjectParameterFrm: TJSExtensionWithObjectParameterFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -69,9 +69,4 @@ object JSExtensionWithObjectParameterFrm: TJSExtensionWithObjectParameterFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 360
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSExtensionWithObjectParameterFrm }
TJSExtensionWithObjectParameterFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -125,8 +124,7 @@ uses
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnWebKitInitializedEvent;
var
@ -174,7 +172,8 @@ end;
procedure TJSExtensionWithObjectParameterFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExtensionWithObjectParameterFrm.Chromium1BeforePopup(
@ -225,8 +224,7 @@ end;
procedure TJSExtensionWithObjectParameterFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSExtensionWithObjectParameterFrm.WMMove(var aMessage : TWMMove);

View File

@ -22,15 +22,15 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="209"/>
<CursorPos X="22" Y="234"/>
<TopLine Value="109"/>
<CursorPos X="31" Y="124"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
</Units>
<JumpHistory Count="7" HistoryIndex="6">
<JumpHistory Count="11" HistoryIndex="10">
<Position1>
<Filename Value="uJSSimpleExtension.pas"/>
</Position1>
@ -58,6 +58,22 @@
<Filename Value="uJSSimpleExtension.pas"/>
<Caret Line="233" TopLine="215"/>
</Position7>
<Position8>
<Filename Value="uJSSimpleExtension.pas"/>
<Caret Line="234" Column="22" TopLine="209"/>
</Position8>
<Position9>
<Filename Value="uJSSimpleExtension.pas"/>
<Caret Line="233" Column="22" TopLine="208"/>
</Position9>
<Position10>
<Filename Value="uJSSimpleExtension.pas"/>
<Caret Line="234" Column="41" TopLine="208"/>
</Position10>
<Position11>
<Filename Value="uJSSimpleExtension.pas"/>
<Caret Line="125" Column="69" TopLine="110"/>
</Position11>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -14,7 +14,7 @@ object JSSimpleExtensionFrm: TJSSimpleExtensionFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -69,9 +69,4 @@ object JSSimpleExtensionFrm: TJSSimpleExtensionFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 352
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSSimpleExtensionFrm }
TJSSimpleExtensionFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -122,8 +121,7 @@ uses
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnWebKitInitializedEvent;
var
@ -181,8 +179,7 @@ end;
procedure TJSSimpleExtensionFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSSimpleExtensionFrm.WMMove(var aMessage : TWMMove);
@ -231,7 +228,8 @@ end;
procedure TJSSimpleExtensionFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSSimpleExtensionFrm.Chromium1Close(

View File

@ -14,7 +14,7 @@ object JSSimpleWindowBindingFrm: TJSSimpleWindowBindingFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -69,9 +69,4 @@ object JSSimpleWindowBindingFrm: TJSSimpleWindowBindingFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 360
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSSimpleWindowBindingFrm }
TJSSimpleWindowBindingFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -119,8 +118,7 @@ implementation
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnContextCreated(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context);
var
@ -173,8 +171,7 @@ end;
procedure TJSSimpleWindowBindingFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSSimpleWindowBindingFrm.WMMove(var aMessage : TWMMove);
@ -223,7 +220,8 @@ end;
procedure TJSSimpleWindowBindingFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSSimpleWindowBindingFrm.Chromium1Close(

View File

@ -22,15 +22,15 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="175"/>
<CursorPos X="22" Y="207"/>
<TopLine Value="132"/>
<CursorPos Y="155"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit1>
</Units>
<JumpHistory Count="4" HistoryIndex="3">
<JumpHistory Count="7" HistoryIndex="6">
<Position1>
<Filename Value="uJSSimpleWindowBinding.pas"/>
</Position1>
@ -46,6 +46,18 @@
<Filename Value="uJSSimpleWindowBinding.pas"/>
<Caret Line="122" Column="82" TopLine="106"/>
</Position4>
<Position5>
<Filename Value="uJSSimpleWindowBinding.pas"/>
<Caret Line="207" Column="22" TopLine="175"/>
</Position5>
<Position6>
<Filename Value="uJSSimpleWindowBinding.pas"/>
<Caret Line="206" Column="22" TopLine="177"/>
</Position6>
<Position7>
<Filename Value="uJSSimpleWindowBinding.pas"/>
<Caret Line="120" Column="72" TopLine="101"/>
</Position7>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -14,7 +14,7 @@ object JSSimpleWindowBindingFrm: TJSSimpleWindowBindingFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -69,9 +69,4 @@ object JSSimpleWindowBindingFrm: TJSSimpleWindowBindingFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 352
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSSimpleWindowBindingFrm }
TJSSimpleWindowBindingFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -118,8 +117,7 @@ implementation
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure TJSSimpleWindowBindingFrm.GoBtnClick(Sender: TObject);
begin
@ -154,8 +152,7 @@ end;
procedure TJSSimpleWindowBindingFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSSimpleWindowBindingFrm.WMMove(var aMessage : TWMMove);
@ -204,7 +201,8 @@ end;
procedure TJSSimpleWindowBindingFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSSimpleWindowBindingFrm.Chromium1Close(

View File

@ -22,8 +22,8 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="96"/>
<CursorPos X="82" Y="126"/>
<TopLine Value="115"/>
<CursorPos X="31" Y="124"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -31,14 +31,13 @@
</Unit1>
<Unit2>
<Filename Value="..\..\..\..\source\uCEFv8ArrayBufferReleaseCallback.pas"/>
<EditorIndex Value="2"/>
<EditorIndex Value="-1"/>
<TopLine Value="55"/>
<CursorPos X="19" Y="70"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit2>
</Units>
<JumpHistory Count="5" HistoryIndex="4">
<JumpHistory Count="9" HistoryIndex="8">
<Position1>
<Filename Value="uJSWindowBindingWithArrayBuffer.pas"/>
<Caret Line="145" Column="60" TopLine="124"/>
@ -59,6 +58,22 @@
<Filename Value="uJSWindowBindingWithArrayBuffer.pas"/>
<Caret Line="165" TopLine="147"/>
</Position5>
<Position6>
<Filename Value="uJSWindowBindingWithArrayBuffer.pas"/>
<Caret Line="126" Column="82" TopLine="111"/>
</Position6>
<Position7>
<Filename Value="uJSWindowBindingWithArrayBuffer.pas"/>
<Caret Line="125" Column="82" TopLine="110"/>
</Position7>
<Position8>
<Filename Value="uJSWindowBindingWithArrayBuffer.pas"/>
<Caret Line="49" Column="76" TopLine="39"/>
</Position8>
<Position9>
<Filename Value="uJSWindowBindingWithArrayBuffer.pas"/>
<Caret Line="125" Column="69" TopLine="101"/>
</Position9>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -14,7 +14,7 @@ object JSWindowBindingWithArrayBufferFrm: TJSWindowBindingWithArrayBufferFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 20
@ -69,9 +69,4 @@ object JSWindowBindingWithArrayBufferFrm: TJSWindowBindingWithArrayBufferFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 363
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSWindowBindingWithArrayBufferFrm }
TJSWindowBindingWithArrayBufferFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -122,8 +121,7 @@ uses
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure FreeCustomArrayBufer(buffer : Pointer);
begin
@ -197,8 +195,7 @@ end;
procedure TJSWindowBindingWithArrayBufferFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSWindowBindingWithArrayBufferFrm.WMMove(var aMessage : TWMMove);
@ -247,7 +244,8 @@ end;
procedure TJSWindowBindingWithArrayBufferFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSWindowBindingWithArrayBufferFrm.Chromium1Close(

View File

@ -22,8 +22,8 @@
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="227"/>
<CursorPos X="21" Y="230"/>
<TopLine Value="155"/>
<CursorPos Y="178"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -37,7 +37,7 @@
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
</Units>
<JumpHistory Count="8" HistoryIndex="7">
<JumpHistory Count="11" HistoryIndex="10">
<Position1>
<Filename Value="uJSWindowBindingWithFunction.pas"/>
</Position1>
@ -69,6 +69,18 @@
<Filename Value="uJSWindowBindingWithFunction.pas"/>
<Caret Line="86" Column="15" TopLine="50"/>
</Position8>
<Position9>
<Filename Value="uJSWindowBindingWithFunction.pas"/>
<Caret Line="230" Column="21" TopLine="227"/>
</Position9>
<Position10>
<Filename Value="uJSWindowBindingWithFunction.pas"/>
<Caret Line="229" Column="21" TopLine="226"/>
</Position10>
<Position11>
<Filename Value="uJSWindowBindingWithFunction.pas"/>
<Caret Line="124" Column="72" TopLine="108"/>
</Position11>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -14,7 +14,7 @@ object JSWindowBindingWithFunctionFrm: TJSWindowBindingWithFunctionFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -69,9 +69,4 @@ object JSWindowBindingWithFunctionFrm: TJSWindowBindingWithFunctionFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 352
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSWindowBindingWithFunctionFrm }
TJSWindowBindingWithFunctionFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -122,8 +121,7 @@ uses
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnContextCreated(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context);
var
@ -177,8 +175,7 @@ end;
procedure TJSWindowBindingWithFunctionFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSWindowBindingWithFunctionFrm.WMMove(var aMessage : TWMMove);
@ -227,7 +224,8 @@ end;
procedure TJSWindowBindingWithFunctionFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSWindowBindingWithFunctionFrm.Chromium1Close(

View File

@ -20,9 +20,10 @@
<ComponentName Value="JSWindowBindingWithObjectFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<TopLine Value="120"/>
<CursorPos X="82" Y="126"/>
<TopLine Value="158"/>
<CursorPos Y="181"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -31,7 +32,6 @@
<Unit2>
<Filename Value="uMyV8Accessor.pas"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/>
<TopLine Value="34"/>
<CursorPos X="5" Y="90"/>
@ -40,7 +40,7 @@
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
</Units>
<JumpHistory Count="7" HistoryIndex="6">
<JumpHistory Count="10" HistoryIndex="9">
<Position1>
<Filename Value="uJSWindowBindingWithObject.pas"/>
</Position1>
@ -68,6 +68,18 @@
<Filename Value="uJSWindowBindingWithObject.pas"/>
<Caret Line="146" TopLine="131"/>
</Position7>
<Position8>
<Filename Value="uJSWindowBindingWithObject.pas"/>
<Caret Line="126" Column="82" TopLine="120"/>
</Position8>
<Position9>
<Filename Value="uJSWindowBindingWithObject.pas"/>
<Caret Line="125" Column="82" TopLine="119"/>
</Position9>
<Position10>
<Filename Value="uJSWindowBindingWithObject.pas"/>
<Caret Line="124" Column="72" TopLine="104"/>
</Position10>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@ -1,7 +1,7 @@
object JSWindowBindingWithObjectFrm: TJSWindowBindingWithObjectFrm
Left = 106
Left = 434
Height = 589
Top = 133
Top = 137
Width = 978
Caption = 'Initializing browser. Please wait...'
ClientHeight = 589
@ -14,7 +14,7 @@ object JSWindowBindingWithObjectFrm: TJSWindowBindingWithObjectFrm
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.0.4.0'
LCLVersion = '2.0.6.0'
object NavControlPnl: TPanel
Left = 0
Height = 21
@ -69,9 +69,4 @@ object JSWindowBindingWithObjectFrm: TJSWindowBindingWithObjectFrm
left = 32
top = 288
end
object CEFSentinel1: TCEFSentinel
OnClose = CEFSentinel1Close
left = 32
top = 360
end
end

View File

@ -59,7 +59,6 @@ type
{ TJSWindowBindingWithObjectFrm }
TJSWindowBindingWithObjectFrm = class(TForm)
CEFSentinel1: TCEFSentinel;
NavControlPnl: TPanel;
Edit1: TEdit;
GoBtn: TButton;
@ -122,8 +121,7 @@ uses
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.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. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnContextCreated(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context);
var
@ -180,8 +178,7 @@ end;
procedure TJSWindowBindingWithObjectFrm.CEFSentinel1Close(Sender: TObject);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSWindowBindingWithObjectFrm.WMMove(var aMessage : TWMMove);
@ -230,7 +227,8 @@ end;
procedure TJSWindowBindingWithObjectFrm.Chromium1BeforeClose(
Sender: TObject; const browser: ICefBrowser);
begin
CEFSentinel1.Start;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TJSWindowBindingWithObjectFrm.Chromium1Close(