1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-07-12 22:30:17 +02:00

Faster browser destruction

Faster browser destruction. All timers have been removed from the demos.
Removed unnecessary client handler class in TChromium. Now there's only
an interface.
Fixed an old memory leak in popup windows.
This commit is contained in:
Salvador Diaz Fau
2017-06-11 17:48:20 +02:00
parent d0c7e0926e
commit 830117e0ca
47 changed files with 1118 additions and 864 deletions

View File

@ -56,7 +56,7 @@ uses
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.FlashEnabled := False; // Some websites with heavy Flash usage will need a longer Timer.Interval if you set this to True
GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.FastUnload := True; // Enable the fast unload controller, which speeds up tab/window close by running a tab's onunload js handler independently of the GUI
// In case you want to use custom directories for the CEF3 binaries, cache, cookies and user data.

View File

@ -2,10 +2,10 @@
<BorlandProject>
<Transactions>
<Transaction>2017/05/01 10:03:03.000.353,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\about.pas=</Transaction>
<Transaction>2017/05/01 11:22:18.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIAPP.dproj</Transaction>
<Transaction>2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.pas</Transaction>
<Transaction>2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.dfm</Transaction>
<Transaction>2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.dfm</Transaction>
<Transaction>2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.pas</Transaction>
<Transaction>2017/05/01 11:22:18.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIAPP.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj</Transaction>
<Transaction>2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas</Transaction>
<Transaction>2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.dfm</Transaction>
<Transaction>2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas</Transaction>
<Transaction>2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.dfm</Transaction>
</Transactions>
</BorlandProject>

View File

@ -1,7 +1,7 @@
[Closed Files]
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas',0,1,153,51,189,0,0,,{1
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas',0,1,63,1,106,0,0,,
File_2=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,6288,54,6316,0,0,{{1729,4}
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas',0,1,118,68,76,0,0,,{1,118,49}{2,176,1}
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas',0,1,69,66,118,0,0,,
File_2=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,6306,1,6308,0,0,{{1729,4},{1745,15},{'TScrollWindow'}}{{1832,4},{1932,15},{'TMainMenuBarStyleHook'}},
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,53,20,81,0,0,,
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas',0,1,1,22,38,0,0,,
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,1091,3,1120,0,0,,
@ -11,22 +11,17 @@ File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFClient.pas',0,1,24,90,42,0,0,,{1
[Modules]
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj
Module1=default.htm
Count=2
Module0=default.htm
Count=1
EditWindowCount=1
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj]
ModuleType=TBaseProject
[default.htm]
ModuleType=TURLModule
[EditWindow0]
ViewCount=2
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dpr
ViewCount=1
CurrentView=0
View0=0
View1=1
PercentageSizes=1
Create=1
Visible=1
@ -49,7 +44,7 @@ RightPanelClients=DockSite2
RightPanelData=00000800010100000000AA1900000000000001D0070000000000000100000000A123000009000000446F636B5369746532FFFFFFFF
BottomPanelSize=0
BottomPanelClients=DockSite1,MessageView
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B36000000000000022B05000000000000FFFFFFFF
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B3600000000000002C305000000000000FFFFFFFF
BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
@ -60,17 +55,6 @@ TabDockRightClients=DockSite4=0
CustomEditViewType=TWelcomePageView
WelcomePageURL=bds:/default.htm
[View1]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dpr
CursorX=1
CursorY=64
TopLine=22
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dpr
[Watches]
Count=0
@ -85,11 +69,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=213
LRDockWidth=13602
Dockable=1
@ -152,12 +136,12 @@ State=0
Left=0
Top=23
Width=2773
Height=1110
Height=1267
MaxLeft=-1
MaxTop=-1
ClientWidth=2773
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1267
TBDockHeight=1267
LRDockWidth=2773
Dockable=1
StayOnTop=0
@ -171,11 +155,11 @@ State=0
Left=0
Top=0
Width=1875
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
ClientHeight=6693
TBDockHeight=7152
LRDockWidth=2000
Dockable=1
@ -285,16 +269,16 @@ State=0
Left=78
Top=386
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1898
ClientHeight=7164
TBDockHeight=7164
ClientWidth=1773
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
SplitPos=111
SplitPos=119
[frmDesignPreview]
PercentageSizes=1
@ -365,11 +349,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=415
LRDockWidth=4953
Dockable=1
@ -384,11 +368,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=213
LRDockWidth=7406
Dockable=1
@ -397,6 +381,7 @@ Column0Width=145
Column1Width=100
Column2Width=115
Column3Width=250
Column4Width=250
[LocalVarsWindow]
PercentageSizes=1
@ -407,11 +392,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=1536
LRDockWidth=3484
Dockable=1
@ -426,11 +411,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=2063
LRDockWidth=3484
Dockable=1
@ -548,11 +533,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=1547
LRDockWidth=8742
Dockable=1
@ -574,11 +559,11 @@ State=0
Left=0
Top=0
Width=1773
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
ClientHeight=6693
TBDockHeight=3677
LRDockWidth=1898
Dockable=1
@ -660,12 +645,12 @@ State=0
Left=0
Top=23
Width=3820
Height=1110
Height=1267
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1267
TBDockHeight=1267
LRDockWidth=3820
Dockable=1
StayOnTop=0
@ -689,7 +674,7 @@ MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=9170
TBDockHeight=7164
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0
@ -708,12 +693,12 @@ State=0
Left=0
Top=0
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
@ -732,12 +717,12 @@ State=0
Left=0
Top=0
Width=2000
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0

View File

@ -1,10 +1,10 @@
[Stats]
EditorSecs=3817
DesignerSecs=8
InspectorSecs=1
CompileSecs=95678
OtherSecs=249
EditorSecs=5400
DesignerSecs=21
InspectorSecs=4
CompileSecs=130944
OtherSecs=306
StartTime=01/05/2017 12:55:55
RealKeys=0
EffectiveKeys=0
DebugSecs=398
DebugSecs=491

View File

@ -63,17 +63,10 @@ object ChildForm: TChildForm
TabOrder = 1
end
object Chromium1: TChromium
OnLoadEnd = Chromium1LoadEnd
OnAfterCreated = Chromium1AfterCreated
OnBeforeClose = Chromium1BeforeClose
OnClose = Chromium1Close
Left = 592
Top = 288
end
object Timer1: TTimer
Enabled = False
Interval = 2000
OnTimer = Timer1Timer
Left = 608
Top = 344
end
end

View File

@ -59,27 +59,26 @@ type
Button1: TButton;
Chromium1: TChromium;
CEFWindowParent1: TCEFWindowParent;
Timer1: TTimer;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormCreate(Sender: TObject);
procedure Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser;
const frame: ICefFrame; httpStatusCode: Integer);
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser;
out Result: Boolean);
procedure Timer1Timer(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser);
private
// Variables to control when can we destroy the form safely
FCanClose : boolean; // Set to True when the final timer is triggered
FCanClose : boolean; // Set to True in TChromium.OnBeforeClose
FClosing : boolean; // Set to True in the CloseQuery event.
protected
procedure BrowserCreatedMsg(var aMessage : TMessage); message CEFBROWSER_CREATED;
procedure BrowserDestroyMsg(var aMessage : TMessage); message CEFBROWSER_DESTROY;
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
@ -93,16 +92,10 @@ implementation
// Destruction steps
// =================
// 1. Load about:blank and wait till it's fully loaded
// 2. Call TChromium.CloseBrowser
// 3. Wait for the TChromium.Close
// 4. Enable a Timer and wait for 2 seconds
// 5. Close and destroy the form
//
// Note
// ====
// If you load simple web pages and you want to speed up the destruction,
// try skipping step 1 and reducing the timer's interval.
// 1. FormCloseQuery calls TChromium.CloseBrowser
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 and Chromium1 in the main thread.
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure TChildForm.Button1Click(Sender: TObject);
begin
@ -114,17 +107,15 @@ begin
PostMessage(Handle, CEFBROWSER_CREATED, 0, 0);
end;
procedure TChildForm.Chromium1Close(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
procedure TChildForm.Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
begin
Timer1.Enabled := True;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TChildForm.Chromium1LoadEnd(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
httpStatusCode: Integer);
procedure TChildForm.Chromium1Close(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
begin
if FClosing and (Chromium1.DocumentURL = 'about:blank') then
Chromium1.CloseBrowser(True);
PostMessage(Handle, CEFBROWSER_DESTROY, 0, 0);
end;
procedure TChildForm.FormClose(Sender: TObject; var Action: TCloseAction);
@ -138,8 +129,9 @@ begin
if not(FClosing) and Panel1.Enabled then
begin
FClosing := True;
Chromium1.LoadURL('about:blank');
FClosing := True;
Panel1.Enabled := False;
Chromium1.CloseBrowser(True);
end;
end;
@ -161,17 +153,6 @@ begin
Chromium1.CreateBrowser(CEFWindowParent1, '');
end;
procedure TChildForm.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
if not(FCanClose) then
begin
FCanClose := True;
PostMessage(self.Handle, WM_CLOSE, 0, 0);
end;
end;
procedure TChildForm.WMMove(var aMessage : TWMMove);
begin
inherited;
@ -192,4 +173,10 @@ begin
Button1.Click;
end;
procedure TChildForm.BrowserDestroyMsg(var aMessage : TMessage);
begin
CEFWindowParent1.Free;
Chromium1.Free;
end;
end.

View File

@ -70,10 +70,4 @@ object MainForm: TMainForm
OnClick = ExitBtnClick
end
end
object Timer1: TTimer
Enabled = False
OnTimer = Timer1Timer
Left = 608
Top = 344
end
end

View File

@ -55,20 +55,19 @@ uses
const
CEFBROWSER_CREATED = WM_APP + $100;
CEFBROWSER_CHILDDESTROYED = WM_APP + $101;
CEFBROWSER_DESTROY = WM_APP + $102;
type
TMainForm = class(TForm)
Timer1: TTimer;
ButtonPnl: TPanel;
NewBtn: TSpeedButton;
ExitBtn: TSpeedButton;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure NewBtnClick(Sender: TObject);
procedure ExitBtnClick(Sender: TObject);
private
// Variables to control when can we destroy the form safely
FCanClose : boolean; // Set to True when the final timer is triggered
FCanClose : boolean; // Set to True when all the child forms are closed
FClosing : boolean; // Set to True in the CloseQuery event.
procedure CreateMDIChild(const Name: string);
@ -97,8 +96,7 @@ uses
// Destruction steps
// =================
// 1. Destroy all child forms
// 2. Enable a Timer and wait for 1 second
// 3. Close and destroy the main form
// 2. Wait until all the child forms are closed before closing the main form and terminating the application.
procedure TMainForm.CreateMDIChild(const Name: string);
var
@ -161,24 +159,14 @@ begin
CloseAllChildForms;
end;
procedure TMainForm.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
if not(FCanClose) then
begin
FCanClose := True;
PostMessage(self.Handle, WM_CLOSE, 0, 0);
end;
end;
procedure TMainForm.ChildDestroyedMsg(var aMessage : TMessage);
begin
// If there are no more child forms we can destroy the main form
if (MDIChildCount = 0) then
begin
ButtonPnl.Enabled := False;
Timer1.Enabled := True;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
end;

View File

@ -1,5 +1,5 @@
[Closed Files]
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas',0,1,28,92,53,0,0,,{1,361,40}{2,212,1}{3,185,76}
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\FastMM4\FastMM4.pas',0,1,9585,1,9607,0,0,,
File_1=TSourceModule,'c:\program files\embarcadero\studio\17.0\source\rtl\win\Winapi.Windows.pas',0,1,22517,1,22546,0,0,,
File_2=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,4931,72,4962,0,0,{{1729,4}
File_3=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Controls.pas',0,1,9646,1,9668,0,0,,
@ -11,17 +11,29 @@ File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF
File_9=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\RTL\SYS\System.pas',0,1,29880,1,29902,0,0,,
[Modules]
Module0=default.htm
Count=1
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj
Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
Module2=default.htm
Count=3
EditWindowCount=1
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj]
ModuleType=TBaseProject
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas]
ModuleType=TSourceModule
FormState=1
FormOnTop=0
[default.htm]
ModuleType=TURLModule
[EditWindow0]
ViewCount=1
CurrentView=0
ViewCount=3
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
View0=0
View1=1
View2=2
PercentageSizes=1
Create=1
Visible=1
@ -41,10 +53,10 @@ TopPanelSize=0
LeftPanelSize=0
RightPanelSize=2000
RightPanelClients=DockSite2
RightPanelData=00000800010100000000AA1900000000000001D0070000000000000100000000A123000009000000446F636B5369746532FFFFFFFF
BottomPanelSize=0
RightPanelData=000008000101000000008C1500000000000001D0070000000000000100000000E91D000009000000446F636B5369746532FFFFFFFF
BottomPanelSize=1399
BottomPanelClients=DockSite1,MessageView
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B36000000000000022B05000000000000FFFFFFFF
BottomPanelData=0000080001020100000009000000446F636B53697465313B3600000000000002770500000000000001000000003B3600000F0000004D65737361676556696577466F726DFFFFFFFF
BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
@ -55,6 +67,28 @@ TabDockRightClients=DockSite4=0
CustomEditViewType=TWelcomePageView
WelcomePageURL=bds:/default.htm
[View1]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
CursorX=2
CursorY=132
TopLine=97
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
[View2]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
CursorX=84
CursorY=395
TopLine=388
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
[Watches]
Count=0
@ -69,11 +103,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=213
LRDockWidth=13602
Dockable=1
@ -117,11 +151,11 @@ State=0
Left=0
Top=0
Width=2000
Height=8868
Height=7354
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=8868
ClientHeight=7354
TBDockHeight=5897
LRDockWidth=2352
Dockable=1
@ -130,18 +164,18 @@ StayOnTop=0
[MessageView]
PercentageSizes=1
Create=1
Visible=0
Visible=1
Docked=1
State=0
Left=0
Top=23
Width=2773
Height=1110
Width=10000
Height=1188
MaxLeft=-1
MaxTop=-1
ClientWidth=2773
ClientHeight=1110
TBDockHeight=1110
ClientWidth=10000
ClientHeight=1188
TBDockHeight=1188
LRDockWidth=2773
Dockable=1
StayOnTop=0
@ -155,11 +189,11 @@ State=0
Left=0
Top=0
Width=1875
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
ClientHeight=6693
TBDockHeight=7152
LRDockWidth=2000
Dockable=1
@ -269,16 +303,16 @@ State=0
Left=78
Top=386
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1898
ClientHeight=7164
TBDockHeight=7164
ClientWidth=1773
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
SplitPos=111
SplitPos=127
[frmDesignPreview]
PercentageSizes=1
@ -349,11 +383,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=415
LRDockWidth=4953
Dockable=1
@ -368,11 +402,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=213
LRDockWidth=7406
Dockable=1
@ -381,6 +415,7 @@ Column0Width=145
Column1Width=100
Column2Width=115
Column3Width=250
Column4Width=250
[LocalVarsWindow]
PercentageSizes=1
@ -391,11 +426,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=1536
LRDockWidth=3484
Dockable=1
@ -410,11 +445,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=2063
LRDockWidth=3484
Dockable=1
@ -532,11 +567,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=1547
LRDockWidth=8742
Dockable=1
@ -558,11 +593,11 @@ State=0
Left=0
Top=0
Width=1773
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
ClientHeight=6693
TBDockHeight=3677
LRDockWidth=1898
Dockable=1
@ -644,12 +679,12 @@ State=0
Left=0
Top=23
Width=3820
Height=1110
Height=1188
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1188
TBDockHeight=1188
LRDockWidth=3820
Dockable=1
StayOnTop=0
@ -668,12 +703,12 @@ State=0
Left=0
Top=23
Width=2000
Height=9170
Height=7657
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=9170
TBDockHeight=7164
ClientHeight=7657
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0
@ -692,12 +727,12 @@ State=0
Left=0
Top=0
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
@ -716,12 +751,12 @@ State=0
Left=0
Top=0
Width=2000
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0

View File

@ -1,10 +1,10 @@
[Stats]
EditorSecs=33989
DesignerSecs=2113
EditorSecs=34252
DesignerSecs=2118
InspectorSecs=1461
CompileSecs=1754135
OtherSecs=5520
CompileSecs=1792955
OtherSecs=5624
StartTime=11/02/2017 10:51:15
RealKeys=0
EffectiveKeys=0
DebugSecs=25135
DebugSecs=26138

View File

@ -11,17 +11,22 @@ File_8=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Fo
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFLifeSpanHandler.pas',0,1,99,1,121,0,0,,
[Modules]
Module0=default.htm
Count=1
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleBrowser\SimpleBrowser.dproj
Module1=default.htm
Count=2
EditWindowCount=1
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleBrowser\SimpleBrowser.dproj]
ModuleType=TBaseProject
[default.htm]
ModuleType=TURLModule
[EditWindow0]
ViewCount=1
CurrentView=0
ViewCount=2
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleBrowser\SimpleBrowser.dpr
View0=0
View1=1
PercentageSizes=1
Create=1
Visible=1
@ -40,21 +45,31 @@ BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
TopPanelSize=0
LeftPanelSize=0
RightPanelSize=2000
RightPanelClients=DockSite2
RightPanelData=00000800010100000000AA1900000000000001D0070000000000000100000000A123000009000000446F636B5369746532FFFFFFFF
RightPanelClients=DockSite2,DockSite4
RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF
BottomPanelSize=0
BottomPanelClients=DockSite1,MessageView
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B36000000000000022B05000000000000FFFFFFFF
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF
BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
TabDockLeftClients=PropertyInspector=0,DockSite3=1
TabDockRightClients=DockSite4=0
[View0]
CustomEditViewType=TWelcomePageView
WelcomePageURL=bds:/default.htm
[View1]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleBrowser\SimpleBrowser.dpr
CursorX=2
CursorY=60
TopLine=22
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleBrowser\SimpleBrowser.dpr
[Watches]
Count=0
@ -69,11 +84,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=1121
TBDockHeight=213
LRDockWidth=13602
Dockable=1
@ -117,11 +132,11 @@ State=0
Left=0
Top=0
Width=2000
Height=8868
Height=4226
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=8868
ClientHeight=4226
TBDockHeight=5897
LRDockWidth=2352
Dockable=1
@ -134,14 +149,14 @@ Visible=0
Docked=1
State=0
Left=0
Top=23
Top=0
Width=2773
Height=1110
Height=1424
MaxLeft=-1
MaxTop=-1
ClientWidth=2773
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1424
TBDockHeight=1424
LRDockWidth=2773
Dockable=1
StayOnTop=0
@ -154,12 +169,12 @@ Docked=1
State=0
Left=0
Top=0
Width=1875
Height=6738
Width=2000
Height=4339
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
ClientWidth=2000
ClientHeight=4339
TBDockHeight=7152
LRDockWidth=2000
Dockable=1
@ -269,12 +284,12 @@ State=0
Left=78
Top=386
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1898
ClientHeight=7164
TBDockHeight=7164
ClientHeight=7119
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
@ -324,8 +339,8 @@ Create=1
Visible=0
Docked=1
State=0
Left=-8
Top=287
Left=-1152
Top=243
Width=273
Height=359
MaxLeft=-1
@ -349,11 +364,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=1121
TBDockHeight=415
LRDockWidth=4953
Dockable=1
@ -368,11 +383,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=1121
TBDockHeight=213
LRDockWidth=7406
Dockable=1
@ -381,6 +396,7 @@ Column0Width=145
Column1Width=100
Column2Width=115
Column3Width=250
Column4Width=250
[LocalVarsWindow]
PercentageSizes=1
@ -391,11 +407,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=1121
TBDockHeight=1536
LRDockWidth=3484
Dockable=1
@ -410,11 +426,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=1121
TBDockHeight=2063
LRDockWidth=3484
Dockable=1
@ -532,11 +548,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=1121
TBDockHeight=1547
LRDockWidth=8742
Dockable=1
@ -558,11 +574,11 @@ State=0
Left=0
Top=0
Width=1773
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
ClientHeight=6693
TBDockHeight=3677
LRDockWidth=1898
Dockable=1
@ -644,12 +660,12 @@ State=0
Left=0
Top=23
Width=3820
Height=1110
Height=1424
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1424
TBDockHeight=1424
LRDockWidth=3820
Dockable=1
StayOnTop=0
@ -668,12 +684,12 @@ State=0
Left=0
Top=23
Width=2000
Height=9170
Height=4529
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=9170
TBDockHeight=7164
ClientHeight=4529
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0
@ -692,12 +708,12 @@ State=0
Left=0
Top=0
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
@ -706,22 +722,22 @@ ActiveTabID=StructureView
TabDockClients=StructureView,ClassBrowserTool
[DockSite4]
HostDockSite=RightTabDock
HostDockSite=DockRightPanel
DockSiteType=1
PercentageSizes=1
Create=1
Visible=0
Visible=1
Docked=1
State=0
Left=0
Top=0
Top=454
Width=2000
Height=7164
Height=4339
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
TBDockHeight=7164
ClientWidth=2000
ClientHeight=4339
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0

View File

@ -1,10 +1,10 @@
[Stats]
EditorSecs=4394
EditorSecs=4525
DesignerSecs=301
InspectorSecs=137
CompileSecs=250114
OtherSecs=829
CompileSecs=287743
OtherSecs=932
StartTime=22/01/2017 14:51:01
RealKeys=0
EffectiveKeys=0
DebugSecs=1926
DebugSecs=2069

View File

@ -133,27 +133,12 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource">
@ -507,12 +492,27 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>

View File

@ -2,8 +2,8 @@
<BorlandProject>
<Transactions>
<Transaction>2017/01/22 17:26:58.000.836,=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2017/01/22 17:28:20.000.762,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2017/01/22 17:28:20.000.762,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.dfm</Transaction>
<Transaction>2017/01/22 17:28:25.000.780,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Project1.dproj</Transaction>
<Transaction>2017/01/22 17:28:20.000.762,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas</Transaction>
<Transaction>2017/01/22 17:28:20.000.762,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.dfm</Transaction>
<Transaction>2017/01/22 17:28:25.000.780,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Project1.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dproj</Transaction>
</Transactions>
</BorlandProject>

View File

@ -1,5 +1,5 @@
[Closed Files]
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas',0,1,270,58,305,0,0,,{1
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas',0,1,102,58,305,0,0,,
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,10,21,38,0,0,,
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,34,23,38,0,0,,
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromiumWindow.pas',0,1,35,24,60,0,0,,
@ -11,17 +11,22 @@ File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\BriskBard\uBriskBardMainForm.pas',0,1,50,11,57,0,0,,
[Modules]
Module0=default.htm
Count=1
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleOSRBrowser\SimpleOSRBrowser.dproj
Module1=default.htm
Count=2
EditWindowCount=1
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleOSRBrowser\SimpleOSRBrowser.dproj]
ModuleType=TBaseProject
[default.htm]
ModuleType=TURLModule
[EditWindow0]
ViewCount=1
CurrentView=0
ViewCount=2
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleOSRBrowser\SimpleOSRBrowser.dpr
View0=0
View1=1
PercentageSizes=1
Create=1
Visible=1
@ -41,10 +46,10 @@ TopPanelSize=0
LeftPanelSize=0
RightPanelSize=2000
RightPanelClients=DockSite2
RightPanelData=00000800010100000000AA1900000000000001D0070000000000000100000000A123000009000000446F636B5369746532FFFFFFFF
BottomPanelSize=0
RightPanelData=000008000101000000008C1500000000000001D0070000000000000100000000E91D000009000000446F636B5369746532FFFFFFFF
BottomPanelSize=1399
BottomPanelClients=DockSite1,MessageView
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B36000000000000022B05000000000000FFFFFFFF
BottomPanelData=0000080001020100000009000000446F636B53697465313B3600000000000002770500000000000001000000003B3600000F0000004D65737361676556696577466F726DFFFFFFFF
BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
@ -55,6 +60,17 @@ TabDockRightClients=DockSite4=0
CustomEditViewType=TWelcomePageView
WelcomePageURL=bds:/default.htm
[View1]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleOSRBrowser\SimpleOSRBrowser.dpr
CursorX=2
CursorY=61
TopLine=28
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleOSRBrowser\SimpleOSRBrowser.dpr
[Watches]
Count=0
@ -69,11 +85,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=213
LRDockWidth=13602
Dockable=1
@ -117,11 +133,11 @@ State=0
Left=0
Top=0
Width=2000
Height=8868
Height=7354
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=8868
ClientHeight=7354
TBDockHeight=5897
LRDockWidth=2352
Dockable=1
@ -130,18 +146,18 @@ StayOnTop=0
[MessageView]
PercentageSizes=1
Create=1
Visible=0
Visible=1
Docked=1
State=0
Left=0
Top=23
Width=2773
Height=1110
Width=10000
Height=1188
MaxLeft=-1
MaxTop=-1
ClientWidth=2773
ClientHeight=1110
TBDockHeight=1110
ClientWidth=10000
ClientHeight=1188
TBDockHeight=1188
LRDockWidth=2773
Dockable=1
StayOnTop=0
@ -155,11 +171,11 @@ State=0
Left=0
Top=0
Width=1875
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
ClientHeight=6693
TBDockHeight=7152
LRDockWidth=2000
Dockable=1
@ -269,16 +285,16 @@ State=0
Left=78
Top=386
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1898
ClientHeight=7164
TBDockHeight=7164
ClientWidth=1773
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
SplitPos=111
SplitPos=127
[frmDesignPreview]
PercentageSizes=1
@ -349,11 +365,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=415
LRDockWidth=4953
Dockable=1
@ -368,11 +384,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=213
LRDockWidth=7406
Dockable=1
@ -381,6 +397,7 @@ Column0Width=145
Column1Width=100
Column2Width=115
Column3Width=250
Column4Width=250
[LocalVarsWindow]
PercentageSizes=1
@ -391,11 +408,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=1536
LRDockWidth=3484
Dockable=1
@ -410,11 +427,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=2063
LRDockWidth=3484
Dockable=1
@ -532,11 +549,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=886
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=886
TBDockHeight=1547
LRDockWidth=8742
Dockable=1
@ -558,11 +575,11 @@ State=0
Left=0
Top=0
Width=1773
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
ClientHeight=6693
TBDockHeight=3677
LRDockWidth=1898
Dockable=1
@ -644,12 +661,12 @@ State=0
Left=0
Top=23
Width=3820
Height=1110
Height=1188
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1188
TBDockHeight=1188
LRDockWidth=3820
Dockable=1
StayOnTop=0
@ -668,12 +685,12 @@ State=0
Left=0
Top=23
Width=2000
Height=9170
Height=7657
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=9170
TBDockHeight=7164
ClientHeight=7657
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0
@ -692,12 +709,12 @@ State=0
Left=0
Top=0
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
@ -716,12 +733,12 @@ State=0
Left=0
Top=0
Width=2000
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0

View File

@ -1,10 +1,10 @@
[Stats]
EditorSecs=3724
DesignerSecs=236
EditorSecs=3779
DesignerSecs=238
InspectorSecs=62
CompileSecs=248230
OtherSecs=589
CompileSecs=258272
OtherSecs=604
StartTime=22/01/2017 17:35:20
RealKeys=0
EffectiveKeys=0
DebugSecs=993
DebugSecs=1014

View File

@ -56,18 +56,18 @@ uses
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.FlashEnabled := False; // Some websites with heavy Flash usage will need a longer Timer.Interval if you set this to True
GlobalCEFApp.FlashEnabled := False;
GlobalCEFApp.FastUnload := True; // Enable the fast unload controller, which speeds up tab/window close by running a tab's onunload js handler independently of the GUI
// In case you want to use custom directories for the CEF3 binaries, cache, cookies and user data.
{
{
GlobalCEFApp.FrameworkDirPath := 'cef';
GlobalCEFApp.ResourcesDirPath := 'cef';
GlobalCEFApp.LocalesDirPath := 'cef\locales';
GlobalCEFApp.cache := 'cef\cache';
GlobalCEFApp.cookies := 'cef\cookies';
GlobalCEFApp.UserDataPath := 'cef\User Data';
}
}
if GlobalCEFApp.StartMainProcess then
begin

View File

@ -139,12 +139,27 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource">
@ -498,27 +513,12 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<DeployClass Name="ProjectiOSDeviceResourceRules">
<Platform Name="iOSDevice64">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="OSX32">
<RemoteDir>Contents\MacOS</RemoteDir>
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSDevice32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
<Platform Name="iOSSimulator">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>

View File

@ -2,11 +2,11 @@
<BorlandProject>
<Transactions>
<Transaction>2017/05/21 15:39:53.000.029,=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2017/05/21 15:40:36.000.672,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.pas</Transaction>
<Transaction>2017/05/21 15:40:36.000.672,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.dfm</Transaction>
<Transaction>2017/05/21 15:40:43.000.627,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Project1.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\ToolBoxBrowser.dproj</Transaction>
<Transaction>2017/05/21 15:40:36.000.672,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction>
<Transaction>2017/05/21 15:40:36.000.672,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.dfm</Transaction>
<Transaction>2017/05/21 15:40:43.000.627,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\ToolBoxBrowser.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Project1.dproj</Transaction>
<Transaction>2017/05/21 15:44:20.000.154,=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\Unit2.pas</Transaction>
<Transaction>2017/05/21 15:46:19.000.247,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\Unit2.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.dfm</Transaction>
<Transaction>2017/05/21 15:46:19.000.247,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\Unit2.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.pas</Transaction>
<Transaction>2017/05/21 15:46:19.000.247,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\Unit2.pas</Transaction>
<Transaction>2017/05/21 15:46:19.000.247,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\Unit2.dfm</Transaction>
</Transactions>
</BorlandProject>

View File

@ -1,46 +1,27 @@
[Closed Files]
File_0=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\misc\uConnectFrm.pas',0,1,1,31,16,0,0,,
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas',0,1,154,43,192,0,0,,
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas',0,1,28,14,53,0,0,,
File_3=TSourceModule,'c:\program files\embarcadero\studio\17.0\source\rtl\common\System.Classes.pas',0,1,1970,1,1999,0,0,,
File_4=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,1448,3,1381,0,0,{{1729,4}
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,22,69,65,0,0,,
File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromiumTool.pas',0,1,1,1,1,0,0,,
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFDisplayHandler.pas',0,1,85,35,133,0,0,,
File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFBrowser.pas',0,1,1,1,1,0,0,,
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,860,1,1,0,0,,
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.pas',0,1,152,56,203,0,0,,
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas',0,1,127,19,169,0,0,,
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.pas',0,1,83,1,142,0,0,,
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas',0,1,103,1,112,0,0,,
File_4=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\misc\uConnectFrm.pas',0,1,1,31,16,0,0,,
File_5=TSourceModule,'c:\program files\embarcadero\studio\17.0\source\rtl\common\System.Classes.pas',0,1,1970,1,1999,0,0,,
File_6=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,1448,3,1381,0,0,{{1729,4}
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,22,69,65,0,0,,
File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromiumTool.pas',0,1,1,1,1,0,0,,
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFDisplayHandler.pas',0,1,85,35,133,0,0,,
[Modules]
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\ToolBoxBrowser.dproj
Module1=default.htm
Module2=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.pas
Module3=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.pas
Count=4
Module0=default.htm
Count=1
EditWindowCount=1
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\ToolBoxBrowser.dproj]
ModuleType=TBaseProject
[default.htm]
ModuleType=TURLModule
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.pas]
ModuleType=TSourceModule
FormState=1
FormOnTop=0
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.pas]
ModuleType=TSourceModule
FormState=1
FormOnTop=0
[EditWindow0]
ViewCount=4
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\ToolBoxBrowser.dpr
ViewCount=1
CurrentView=0
View0=0
View1=1
View2=2
View3=3
PercentageSizes=1
Create=1
Visible=1
@ -63,7 +44,7 @@ RightPanelClients=DockSite2
RightPanelData=00000800010100000000AA1900000000000001D0070000000000000100000000A123000009000000446F636B5369746532FFFFFFFF
BottomPanelSize=0
BottomPanelClients=DockSite1,MessageView
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B36000000000000022B05000000000000FFFFFFFF
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B3600000000000002C305000000000000FFFFFFFF
BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
@ -74,39 +55,6 @@ TabDockRightClients=DockSite4=0
CustomEditViewType=TWelcomePageView
WelcomePageURL=bds:/default.htm
[View1]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.pas
CursorX=79
CursorY=145
TopLine=104
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uMainForm.pas
[View2]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.pas
CursorX=78
CursorY=53
TopLine=22
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\uChildForm.pas
[View3]
CustomEditViewType=TEditView
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\ToolBoxBrowser.dpr
CursorX=84
CursorY=39
TopLine=19
LeftCol=1
Elisions=
Bookmarks=
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\ToolBoxBrowser\ToolBoxBrowser.dpr
[Watches]
Count=0
@ -121,11 +69,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=213
LRDockWidth=13602
Dockable=1
@ -188,12 +136,12 @@ State=0
Left=0
Top=23
Width=2773
Height=1110
Height=1267
MaxLeft=-1
MaxTop=-1
ClientWidth=2773
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1267
TBDockHeight=1267
LRDockWidth=2773
Dockable=1
StayOnTop=0
@ -207,11 +155,11 @@ State=0
Left=0
Top=0
Width=1875
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
ClientHeight=6693
TBDockHeight=7152
LRDockWidth=2000
Dockable=1
@ -321,16 +269,16 @@ State=0
Left=78
Top=386
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1898
ClientHeight=7164
TBDockHeight=7164
ClientWidth=1773
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
SplitPos=111
SplitPos=127
[frmDesignPreview]
PercentageSizes=1
@ -401,11 +349,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=415
LRDockWidth=4953
Dockable=1
@ -420,11 +368,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=213
LRDockWidth=7406
Dockable=1
@ -433,6 +381,7 @@ Column0Width=145
Column1Width=100
Column2Width=115
Column3Width=250
Column4Width=250
[LocalVarsWindow]
PercentageSizes=1
@ -443,11 +392,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=1536
LRDockWidth=3484
Dockable=1
@ -462,11 +411,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=2063
LRDockWidth=3484
Dockable=1
@ -584,11 +533,11 @@ State=0
Left=0
Top=0
Width=3820
Height=807
Height=964
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=807
ClientHeight=964
TBDockHeight=1547
LRDockWidth=8742
Dockable=1
@ -610,11 +559,11 @@ State=0
Left=0
Top=0
Width=1773
Height=6738
Height=6693
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
ClientHeight=6693
TBDockHeight=3677
LRDockWidth=1898
Dockable=1
@ -696,12 +645,12 @@ State=0
Left=0
Top=23
Width=3820
Height=1110
Height=1267
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=1110
TBDockHeight=1110
ClientHeight=1267
TBDockHeight=1267
LRDockWidth=3820
Dockable=1
StayOnTop=0
@ -725,7 +674,7 @@ MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=9170
TBDockHeight=7164
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0
@ -744,12 +693,12 @@ State=0
Left=0
Top=0
Width=1898
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=1898
Dockable=1
StayOnTop=0
@ -768,12 +717,12 @@ State=0
Left=0
Top=0
Width=2000
Height=7164
Height=7119
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
TBDockHeight=7164
ClientHeight=6693
TBDockHeight=7119
LRDockWidth=2000
Dockable=1
StayOnTop=0

View File

@ -1,10 +1,10 @@
[Stats]
EditorSecs=35
DesignerSecs=1
EditorSecs=603
DesignerSecs=16
InspectorSecs=1
CompileSecs=1
OtherSecs=10
CompileSecs=8248
OtherSecs=42
StartTime=21/05/2017 17:35:40
RealKeys=0
EffectiveKeys=0
DebugSecs=1
DebugSecs=30

View File

@ -27,25 +27,14 @@ object ChildForm: TChildForm
Height = 300
Align = alClient
TabOrder = 0
ExplicitLeft = 160
ExplicitTop = 88
ExplicitWidth = 100
ExplicitHeight = 41
end
object Chromium1: TChromium
OnLoadEnd = Chromium1LoadEnd
OnPreKeyEvent = Chromium1PreKeyEvent
OnKeyEvent = Chromium1KeyEvent
OnAfterCreated = Chromium1AfterCreated
OnBeforeClose = Chromium1BeforeClose
OnClose = Chromium1Close
Left = 184
Top = 128
end
object Timer1: TTimer
Enabled = False
Interval = 2000
OnTimer = Timer1Timer
Left = 244
Top = 128
end
end

View File

@ -56,15 +56,11 @@ type
TChildForm = class(TForm)
CEFWindowParent1: TCEFWindowParent;
Chromium1: TChromium;
Timer1: TTimer;
procedure FormShow(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormDestroy(Sender: TObject);
procedure Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser;
const frame: ICefFrame; httpStatusCode: Integer);
procedure Chromium1AfterCreated(Sender: TObject;
const browser: ICefBrowser);
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser;
@ -75,15 +71,18 @@ type
procedure Chromium1KeyEvent(Sender: TObject;
const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: PMsg;
out Result: Boolean);
procedure Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser);
private
// Variables to control when can we destroy the form safely
FCanClose : boolean; // Set to True when the final timer is triggered
FCanClose : boolean; // Set to True in TChromium.OnBeforeClose
FClosing : boolean; // Set to True in the CloseQuery event.
FHomepage : string;
protected
procedure BrowserCreatedMsg(var aMessage : TMessage); message CEFBROWSER_CREATED;
procedure BrowserDestroyMsg(var aMessage : TMessage); message CEFBROWSER_DESTROY;
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
@ -101,27 +100,24 @@ implementation
// Destruction steps
// =================
// 1. Load about:blank and wait till it's fully loaded
// 2. Call TChromium.CloseBrowser
// 3. Wait for the TChromium.Close
// 4. Enable a Timer and wait for 2 seconds
// 5. Close and destroy the form
//
// Note
// ====
// If you load simple web pages and you want to speed up the destruction,
// try skipping step 1 and reducing the timer's interval.
// 1. FormCloseQuery calls TChromium.CloseBrowser
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 and Chromium1 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);
procedure TChildForm.Chromium1AfterCreated(Sender: TObject; const browser: ICefBrowser);
begin
PostMessage(Handle, CEFBROWSER_CREATED, 0, 0);
end;
procedure TChildForm.Chromium1Close(Sender: TObject;
const browser: ICefBrowser; out Result: Boolean);
procedure TChildForm.Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
begin
Timer1.Enabled := True;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TChildForm.Chromium1Close(Sender: TObject; const browser: ICefBrowser; out Result: Boolean);
begin
PostMessage(Handle, CEFBROWSER_DESTROY, 0, 0);
end;
procedure TChildForm.Chromium1KeyEvent(Sender: TObject;
@ -137,14 +133,12 @@ begin
WM_KEYUP :
begin
TempMsg := osEvent^;
HandleKeyUp(TempMsg, Result);
end;
WM_KEYDOWN :
begin
TempMsg := osEvent^;
HandleKeyDown(TempMsg, Result);
end;
end;
@ -163,7 +157,6 @@ begin
if (TempKeyMsg.CharCode = VK_ESCAPE) then
begin
aHandled := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
end;
@ -181,14 +174,6 @@ begin
if (TempKeyMsg.CharCode = VK_ESCAPE) then aHandled := True;
end;
procedure TChildForm.Chromium1LoadEnd(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
httpStatusCode: Integer);
begin
if FClosing and (Chromium1.DocumentURL = 'about:blank') then
Chromium1.CloseBrowser(True);
end;
procedure TChildForm.Chromium1PreKeyEvent(Sender: TObject;
const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: PMsg;
out isKeyboardShortcut, Result: Boolean);
@ -214,8 +199,7 @@ begin
if not(FClosing) then
begin
FClosing := True;
Chromium1.LoadURL('about:blank');
ShowWindow(Handle, SW_HIDE);
Chromium1.CloseBrowser(True);
end;
end;
@ -237,17 +221,6 @@ begin
Chromium1.CreateBrowser(CEFWindowParent1, '');
end;
procedure TChildForm.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
if not(FCanClose) then
begin
FCanClose := True;
PostMessage(self.Handle, WM_CLOSE, 0, 0);
end;
end;
procedure TChildForm.WMMove(var aMessage : TWMMove);
begin
inherited;
@ -267,4 +240,10 @@ begin
Chromium1.LoadURL(FHomepage);
end;
procedure TChildForm.BrowserDestroyMsg(var aMessage : TMessage);
begin
CEFWindowParent1.Free;
Chromium1.Free;
end;
end.

View File

@ -34,11 +34,4 @@ object MainForm: TMainForm
TabOrder = 1
Text = 'https://www.google.com'
end
object Timer1: TTimer
Enabled = False
Interval = 2000
OnTimer = Timer1Timer
Left = 225
Top = 1
end
end

View File

@ -53,18 +53,17 @@ uses
const
CEFBROWSER_CREATED = WM_APP + $100;
CEFBROWSER_CHILDDESTROYED = WM_APP + $101;
CEFBROWSER_DESTROY = WM_APP + $102;
type
TMainForm = class(TForm)
Button1: TButton;
Edit1: TEdit;
Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
// Variables to control when can we destroy the form safely
FCanClose : boolean; // Set to True when the final timer is triggered
FCanClose : boolean; // Set to True when all the child forms are closed
FClosing : boolean; // Set to True in the CloseQuery event.
procedure CreateToolboxChild(const ChildCaption, URL: string);
@ -95,8 +94,7 @@ uses
// Destruction steps
// =================
// 1. Destroy all child forms
// 2. Enable a Timer and wait for 1 second
// 3. Close and destroy the main form
// 2. Wait until all the child forms are closed before closing the main form and terminating the application.
procedure TMainForm.CreateToolboxChild(const ChildCaption, URL: string);
var
@ -182,17 +180,6 @@ begin
end;
end;
procedure TMainForm.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
if not(FCanClose) then
begin
FCanClose := True;
PostMessage(self.Handle, WM_CLOSE, 0, 0);
end;
end;
procedure TMainForm.Button1Click(Sender: TObject);
begin
CreateToolboxChild('Browser', Edit1.Text);
@ -203,8 +190,8 @@ begin
// If there are no more child forms we can destroy the main form
if FClosing and (ChildFormCount = 0) then
begin
ShowWindow(Handle, SW_HIDE);
Timer1.Enabled := True;
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
end;

View File

@ -257,16 +257,7 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir>
@ -580,7 +571,16 @@
<Operation>1</Operation>
</Platform>
</DeployClass>
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
<DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>

View File

@ -1,14 +1,14 @@
[Closed Files]
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas',0,1,2152,106,2175,0,0,,
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRenderHandler.pas',0,1,90,95,113,0,0,,
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFLibFunctions.pas',0,1,232,1,1,0,0,,
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFBrowser.pas',0,1,300,78,327,0,0,,
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,150,58,178,0,0,,
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas',0,1,1254,3,1283,0,0,,
File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFAccessibilityHandler.pas',0,1,70,47,85,0,0,,
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromiumEvents.pas',0,1,82,3,111,0,0,,
File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFValue.pas',0,1,179,3,208,0,0,,
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFDragData.pas',0,1,42,79,118,0,0,,
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFLifeSpanHandler.pas',0,1,44,70,150,0,0,,{1,123,1}
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFClient.pas',0,1,38,91,64,0,0,,
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRequestContextHandler.pas',0,1,85,13,112,0,0,,
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas',0,1,50,13,78,0,0,,
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFContextMenuHandler.pas',0,1,22,1,38,0,0,,
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFBaseRefCounted.pas',0,1,128,82,164,0,0,,
File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,222,20,252,0,0,,
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas',0,1,89,14,118,0,0,,
File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,2081,64,2116,0,0,,
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFBrowser.pas',0,1,1,3,280,0,0,,
[Modules]
Module0=default.htm
@ -40,16 +40,15 @@ BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
TopPanelSize=0
LeftPanelSize=0
RightPanelSize=2000
RightPanelClients=DockSite2
RightPanelData=00000800010100000000AA1900000000000001D0070000000000000100000000A123000009000000446F636B5369746532FFFFFFFF
RightPanelClients=DockSite2,DockSite4
RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF
BottomPanelSize=0
BottomPanelClients=DockSite1,MessageView
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D3B3600000000000002770500000000000001000000003B3600000F0000004D65737361676556696577466F726DFFFFFFFF
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF
BottomMiddlePanelSize=0
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
TabDockLeftClients=PropertyInspector=0,DockSite3=1
TabDockRightClients=DockSite4=0
[View0]
CustomEditViewType=TWelcomePageView
@ -69,11 +68,11 @@ State=0
Left=0
Top=0
Width=3820
Height=964
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=964
ClientHeight=1121
TBDockHeight=213
LRDockWidth=13602
Dockable=1
@ -117,11 +116,11 @@ State=0
Left=0
Top=0
Width=2000
Height=8868
Height=4226
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=8868
ClientHeight=4226
TBDockHeight=5897
LRDockWidth=2352
Dockable=1
@ -134,14 +133,14 @@ Visible=0
Docked=1
State=0
Left=0
Top=23
Width=10000
Height=1188
Top=0
Width=2773
Height=1424
MaxLeft=-1
MaxTop=-1
ClientWidth=10000
ClientHeight=1188
TBDockHeight=1188
ClientWidth=2773
ClientHeight=1424
TBDockHeight=1424
LRDockWidth=2773
Dockable=1
StayOnTop=0
@ -154,12 +153,12 @@ Docked=1
State=0
Left=0
Top=0
Width=1875
Height=6738
Width=2000
Height=4339
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
ClientWidth=2000
ClientHeight=4339
TBDockHeight=7152
LRDockWidth=2000
Dockable=1
@ -209,8 +208,8 @@ Create=1
Visible=0
Docked=1
State=0
Left=-8
Top=-30
Left=-148
Top=-137
Width=1844
Height=3139
MaxLeft=-1
@ -266,14 +265,14 @@ Create=1
Visible=0
Docked=1
State=0
Left=78
Top=386
Left=0
Top=362
Width=1898
Height=7164
Height=5370
MaxLeft=-1
MaxTop=-1
ClientWidth=1898
ClientHeight=7164
ClientHeight=5370
TBDockHeight=7164
LRDockWidth=1898
Dockable=1
@ -289,11 +288,11 @@ State=0
Left=0
Top=0
Width=2000
Height=6816
Height=6861
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=6816
ClientHeight=6861
TBDockHeight=5964
LRDockWidth=2508
Dockable=1
@ -305,8 +304,8 @@ Create=1
Visible=0
Docked=1
State=0
Left=-946
Top=1
Left=-898
Top=-137
Width=2844
Height=6200
MaxLeft=-1
@ -324,8 +323,8 @@ Create=1
Visible=0
Docked=1
State=0
Left=-8
Top=287
Left=-1026
Top=-137
Width=273
Height=359
MaxLeft=-1
@ -349,11 +348,11 @@ State=0
Left=0
Top=0
Width=3820
Height=964
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=964
ClientHeight=1121
TBDockHeight=415
LRDockWidth=4953
Dockable=1
@ -368,11 +367,11 @@ State=0
Left=0
Top=0
Width=3820
Height=964
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=964
ClientHeight=1121
TBDockHeight=213
LRDockWidth=7406
Dockable=1
@ -391,11 +390,11 @@ State=0
Left=0
Top=0
Width=3820
Height=964
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=964
ClientHeight=1121
TBDockHeight=1536
LRDockWidth=3484
Dockable=1
@ -410,11 +409,11 @@ State=0
Left=0
Top=0
Width=3820
Height=964
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=964
ClientHeight=1121
TBDockHeight=2063
LRDockWidth=3484
Dockable=1
@ -429,11 +428,11 @@ State=0
Left=0
Top=0
Width=2336
Height=942
Height=1177
MaxLeft=-1
MaxTop=-1
ClientWidth=2336
ClientHeight=942
ClientHeight=1177
TBDockHeight=2321
LRDockWidth=2820
Dockable=1
@ -494,11 +493,11 @@ State=0
Left=0
Top=0
Width=2000
Height=6816
Height=6861
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=6816
ClientHeight=6861
TBDockHeight=4888
LRDockWidth=7148
Dockable=1
@ -510,8 +509,8 @@ Create=1
Visible=0
Docked=1
State=0
Left=249
Top=709
Left=0
Top=0
Width=2859
Height=3206
MaxLeft=-1
@ -532,11 +531,11 @@ State=0
Left=0
Top=0
Width=3820
Height=964
Height=1121
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=964
ClientHeight=1121
TBDockHeight=1547
LRDockWidth=8742
Dockable=1
@ -557,12 +556,12 @@ Docked=1
State=0
Left=0
Top=0
Width=1773
Height=6738
Width=1898
Height=9170
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
ClientWidth=1898
ClientHeight=9170
TBDockHeight=3677
LRDockWidth=1898
Dockable=1
@ -577,11 +576,11 @@ State=0
Left=0
Top=0
Width=2000
Height=6816
Height=6861
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=6816
ClientHeight=6861
TBDockHeight=4888
LRDockWidth=5305
Dockable=1
@ -642,14 +641,14 @@ Visible=0
Docked=1
State=0
Left=0
Top=23
Top=0
Width=3820
Height=1267
Height=1424
MaxLeft=-1
MaxTop=-1
ClientWidth=3820
ClientHeight=1267
TBDockHeight=1267
ClientHeight=1424
TBDockHeight=1424
LRDockWidth=3820
Dockable=1
StayOnTop=0
@ -668,11 +667,11 @@ State=0
Left=0
Top=23
Width=2000
Height=9170
Height=4529
MaxLeft=-1
MaxTop=-1
ClientWidth=2000
ClientHeight=9170
ClientHeight=4529
TBDockHeight=7164
LRDockWidth=2000
Dockable=1
@ -690,13 +689,13 @@ Visible=0
Docked=1
State=0
Left=0
Top=0
Top=23
Width=1898
Height=7164
Height=9170
MaxLeft=-1
MaxTop=-1
ClientWidth=1773
ClientHeight=6738
ClientWidth=1898
ClientHeight=9170
TBDockHeight=7164
LRDockWidth=1898
Dockable=1
@ -706,21 +705,21 @@ ActiveTabID=StructureView
TabDockClients=StructureView,ClassBrowserTool
[DockSite4]
HostDockSite=RightTabDock
HostDockSite=DockRightPanel
DockSiteType=1
PercentageSizes=1
Create=1
Visible=0
Visible=1
Docked=1
State=0
Left=0
Top=0
Top=454
Width=2000
Height=7164
Height=4339
MaxLeft=-1
MaxTop=-1
ClientWidth=1875
ClientHeight=6738
ClientWidth=2000
ClientHeight=4339
TBDockHeight=7164
LRDockWidth=2000
Dockable=1

Binary file not shown.

View File

@ -1,9 +1,9 @@
[Stats]
EditorSecs=89623
EditorSecs=106281
DesignerSecs=97
InspectorSecs=323
CompileSecs=2335332
OtherSecs=9189
CompileSecs=2797099
OtherSecs=10855
StartTime=22/01/2017 10:49:52
RealKeys=0
EffectiveKeys=0

View File

@ -64,7 +64,6 @@ type
FVisitor : ICefStringVisitor;
FPDFPrintcb : ICefPdfPrintCallback;
FCookiDeletercb : ICefDeleteCookiesCallback;
FClientHandler : TVCLClientHandler;
FHandler : ICefClient;
FBrowser : ICefBrowser;
FBrowserId : Integer;
@ -207,6 +206,8 @@ type
function GetHasDocument : boolean;
function GetHasView : boolean;
function GetHasDevTools : boolean;
function GetHasClientHandler : boolean;
function GetHasBrowser : boolean;
function GetCanGoBack : boolean;
function GetCanGoForward : boolean;
function GetDocumentURL : string;
@ -372,7 +373,8 @@ type
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure AfterConstruction; override;
function CreateClientHandler(aIsOSR : boolean) : boolean;
function CreateClientHandler(aIsOSR : boolean) : boolean; overload;
function CreateClientHandler(var aClient : ICefClient) : boolean; overload;
procedure CloseBrowser(aForceClose : boolean);
function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : string = '') : boolean; overload;
function CreateBrowser(aParentHandle : HWND; aParentRect : TRect; const aWindowName : string = '') : boolean; overload;
@ -403,6 +405,7 @@ type
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; aStartLine : integer = 0);
procedure UpdatePreferences;
procedure SavePreferences(const aFileName : string);
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
procedure ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl);
procedure CloseDevTools(const aDevTools : TWinControl = nil);
@ -462,6 +465,8 @@ type
property HasDocument : boolean read GetHasDocument;
property HasView : boolean read GetHasView;
property HasDevTools : boolean read GetHasDevTools;
property HasClientHandler : boolean read GetHasClientHandler;
property HasBrowser : boolean read GetHasBrowser;
property CanGoBack : boolean read GetCanGoBack;
property CanGoForward : boolean read GetCanGoForward;
property IsPopUp : boolean read GetIsPopUp;
@ -615,7 +620,6 @@ begin
FInitialized := False;
FIsOSR := False;
FDefaultUrl := 'about:blank';
FClientHandler := nil;
FHandler := nil;
FOptions := nil;
FFontOptions := nil;
@ -660,28 +664,15 @@ destructor TChromium.Destroy;
begin
try
try
FBrowser := nil;
FBrowserId := 0;
if (FCompHandle <> 0) then
begin
DeallocateHWnd(FCompHandle);
FCompHandle := 0;
end;
if (FHandler <> nil) then
begin
(FHandler as ICefClientHandler).Disconnect;
FHandler := nil;
end;
if (FClientHandler <> nil) then
begin
FClientHandler.Disconnect;
FClientHandler.ReleaseOtherInstances;
FClientHandler := nil;
end;
FBrowser := nil;
FBrowserId := 0;
FHandler := nil;
FVisitor := nil;
FPDFPrintcb := nil;
FCookiDeletercb := nil;
@ -721,12 +712,11 @@ begin
Result := False;
try
if (FClientHandler = nil) then
if (FHandler = nil) then
begin
FIsOSR := aIsOsr;
FClientHandler := TVCLClientHandler.Create(Self, FIsOSR);
FHandler := FClientHandler as ICefClient;
Result := (FHandler <> nil);
FIsOSR := aIsOsr;
FHandler := TVCLClientHandler.Create(Self, FIsOSR);
Result := True;
end;
except
on e : exception do
@ -734,6 +724,17 @@ begin
end;
end;
function TChromium.CreateClientHandler(var aClient : ICefClient) : boolean;
begin
if CreateClientHandler(True) then
begin
aClient := FHandler;
Result := True;
end
else
Result := False;
end;
procedure TChromium.InitializeEvents;
begin
// ICefClient
@ -863,6 +864,7 @@ begin
try
if not(csDesigning in ComponentState) and
not(FClosing) and
(FBrowser = nil) and
(FBrowserId = 0) and
(GlobalCEFApp <> nil) and
@ -909,7 +911,7 @@ var
TempURL : TCefString;
begin
TempURL := CefString(aURL);
Result := cef_browser_host_create_browser(aWindowInfo, FClientHandler.Wrap, @TempURL, aSettings, CefGetData(aContext)) <> 0;
Result := cef_browser_host_create_browser(aWindowInfo, FHandler.Wrap, @TempURL, aSettings, CefGetData(aContext)) <> 0;
end;
function TChromium.CreateBrowserHostSync(aWindowInfo : PCefWindowInfo;
@ -921,7 +923,7 @@ var
TempBrowser : PCefBrowser;
begin
TempURL := CefString(aURL);
TempBrowser := cef_browser_host_create_browser_sync(aWindowInfo, FClientHandler.Wrap, @TempURL, aSettings, CefGetData(aContext));
TempBrowser := cef_browser_host_create_browser_sync(aWindowInfo, FHandler.Wrap, @TempURL, aSettings, CefGetData(aContext));
Result := TCefBrowserRef.UnWrap(TempBrowser);
end;
@ -1236,6 +1238,16 @@ begin
Result := Initialized and FBrowser.Host.HasDevTools;
end;
function TChromium.GetHasClientHandler : boolean;
begin
Result := (FHandler <> nil);
end;
function TChromium.GetHasBrowser : boolean;
begin
Result := (FBrowser <> nil);
end;
function TChromium.GetWindowHandle : THandle;
begin
if Initialized then
@ -1582,6 +1594,19 @@ begin
end;
end;
function TChromium.SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
var
TempHandle : HWND;
begin
Result := False;
if Initialized then
begin
TempHandle := FBrowser.Host.WindowHandle;
Result := (TempHandle <> 0) and (SetParent(TempHandle, aNewParentHwnd) <> 0);
end;
end;
procedure TChromium.SimulateMouseWheel(aDeltaX, aDeltaY : integer);
var
TempEvent : TCefMouseEvent;
@ -1642,7 +1667,6 @@ begin
if (length(FProxyByPassList) > 0) then TempDict.SetString('bypass_list', FProxyByPassList);
end;
CEF_PROXYTYPE_PAC_SCRIPT :
begin
TempValue.SetString('pac_script');
@ -2118,9 +2142,22 @@ function TChromium.doOnClose(const browser: ICefBrowser): Boolean;
begin
Result := False;
if Assigned(FOnClose) then FOnClose(Self, browser, Result);
if (browser <> nil) and (FBrowserId = browser.Identifier) then FClosing := True;
if Assigned(FOnClose) then FOnClose(Self, browser, Result);
end;
procedure TChromium.doOnBeforeClose(const browser: ICefBrowser);
begin
if (browser <> nil) and (FBrowserId = browser.Identifier) then
begin
FInitialized := False;
FBrowser := nil;
FBrowserId := 0;
FHandler := nil;
end;
if Assigned(FOnBeforeClose) then FOnBeforeClose(Self, browser);
end;
procedure TChromium.doOnAddressChange(const browser: ICefBrowser; const frame: ICefFrame; const url: ustring);
@ -2155,18 +2192,6 @@ begin
if Assigned(FOnBeforeBrowse) then FOnBeforeBrowse(Self, browser, frame, request, isRedirect, Result);
end;
procedure TChromium.doOnBeforeClose(const browser: ICefBrowser);
begin
if (browser <> nil) and (FBrowserId = browser.Identifier) then
begin
FInitialized := False;
FBrowser := nil;
FBrowserId := 0;
end;
if Assigned(FOnBeforeClose) then FOnBeforeClose(Self, browser);
end;
procedure TChromium.doOnBeforeContextMenu(const browser : ICefBrowser;
const frame : ICefFrame;
const params : ICefContextMenuParams;

View File

@ -55,6 +55,28 @@ uses
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes;
type
TCefClientRef = class(TCefBaseRefCountedRef, ICefClient)
protected
function GetContextMenuHandler: ICefContextMenuHandler; virtual;
function GetDialogHandler: ICefDialogHandler; virtual;
function GetDisplayHandler: ICefDisplayHandler; virtual;
function GetDownloadHandler: ICefDownloadHandler; virtual;
function GetDragHandler: ICefDragHandler; virtual;
function GetFindHandler: ICefFindHandler; virtual;
function GetFocusHandler: ICefFocusHandler; virtual;
function GetGeolocationHandler: ICefGeolocationHandler; virtual;
function GetJsdialogHandler: ICefJsdialogHandler; virtual;
function GetKeyboardHandler: ICefKeyboardHandler; virtual;
function GetLifeSpanHandler: ICefLifeSpanHandler; virtual;
function GetRenderHandler: ICefRenderHandler; virtual;
function GetLoadHandler: ICefLoadHandler; virtual;
function GetRequestHandler: ICefRequestHandler; virtual;
function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; virtual;
public
class function UnWrap(data: Pointer): ICefClient;
end;
TCefClientOwn = class(TCefBaseRefCountedOwn, ICefClient)
protected
function GetContextMenuHandler: ICefContextMenuHandler; virtual;
@ -77,7 +99,7 @@ type
constructor Create; virtual;
end;
TCustomClientHandler = class(TCefClientOwn, ICefClientHandler)
TCustomClientHandler = class(TCefClientOwn)
protected
FEvents : IChromiumEvents;
FLoadHandler : ICefLoadHandler;
@ -112,7 +134,7 @@ type
function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; override;
public
constructor Create(const events: IChromiumEvents; renderer: Boolean); reintroduce; virtual;
procedure Disconnect;
destructor Destroy; override;
end;
TVCLClientHandler = class(TCustomClientHandler)
@ -123,7 +145,6 @@ type
public
constructor Create(const crm: IChromiumEvents; renderer: Boolean); reintroduce;
destructor Destroy; override;
procedure ReleaseOtherInstances;
property MultithreadApp : boolean read GetMultithreadApp;
property ExternalMessagePump : boolean read GetExternalMessagePump;
@ -152,91 +173,204 @@ var
looping : Boolean = False;
CefTimer : UINT = 0;
function cef_client_get_context_menu_handler(self: PCefClient): PCefContextMenuHandler; stdcall;
// ******************************************************
// ****************** TCefClientRef *********************
// ******************************************************
class function TCefClientRef.UnWrap(data: Pointer): ICefClient;
begin
if (data <> nil) then
Result := Create(data) as ICefClient
else
Result := nil;
end;
function TCefClientRef.GetContextMenuHandler: ICefContextMenuHandler;
begin
Result := nil;
end;
function TCefClientRef.GetDialogHandler: ICefDialogHandler;
begin
Result := nil;
end;
function TCefClientRef.GetDisplayHandler: ICefDisplayHandler;
begin
Result := nil;
end;
function TCefClientRef.GetDownloadHandler: ICefDownloadHandler;
begin
Result := nil;
end;
function TCefClientRef.GetDragHandler: ICefDragHandler;
begin
Result := nil;
end;
function TCefClientRef.GetFindHandler: ICefFindHandler;
begin
Result := nil;
end;
function TCefClientRef.GetFocusHandler: ICefFocusHandler;
begin
Result := nil;
end;
function TCefClientRef.GetGeolocationHandler: ICefGeolocationHandler;
begin
Result := nil;
end;
function TCefClientRef.GetJsdialogHandler: ICefJsDialogHandler;
begin
Result := nil;
end;
function TCefClientRef.GetKeyboardHandler: ICefKeyboardHandler;
begin
Result := nil;
end;
function TCefClientRef.GetLifeSpanHandler: ICefLifeSpanHandler;
begin
Result := nil;
end;
function TCefClientRef.GetLoadHandler: ICefLoadHandler;
begin
Result := nil;
end;
function TCefClientRef.GetRenderHandler: ICefRenderHandler;
begin
Result := nil;
end;
function TCefClientRef.GetRequestHandler: ICefRequestHandler;
begin
Result := nil;
end;
function TCefClientRef.OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean;
begin
Result := False;
end;
// ******************************************************
// ****************** TCefClientOwn *********************
// ******************************************************
procedure CefDoMessageLoopWork;
begin
if looping then Exit;
if (CefInstances > 0) then
begin
looping := True;
try
cef_do_message_loop_work;
finally
looping := False;
end;
end;
end;
procedure TimerProc(hwnd: HWND; uMsg: UINT; idEvent: Pointer; dwTime: DWORD); stdcall;
begin
CefDoMessageLoopWork;
end;
function cef_client_own_get_context_menu_handler(self: PCefClient): PCefContextMenuHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetContextMenuHandler);
end;
function cef_client_get_dialog_handler(self: PCefClient): PCefDialogHandler; stdcall;
function cef_client_own_get_dialog_handler(self: PCefClient): PCefDialogHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetDialogHandler);
end;
function cef_client_get_display_handler(self: PCefClient): PCefDisplayHandler; stdcall;
function cef_client_own_get_display_handler(self: PCefClient): PCefDisplayHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetDisplayHandler);
end;
function cef_client_get_download_handler(self: PCefClient): PCefDownloadHandler; stdcall;
function cef_client_own_get_download_handler(self: PCefClient): PCefDownloadHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetDownloadHandler);
end;
function cef_client_get_drag_handler(self: PCefClient): PCefDragHandler; stdcall;
function cef_client_own_get_drag_handler(self: PCefClient): PCefDragHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetDragHandler);
end;
function cef_client_get_find_handler(self: PCefClient): PCefFindHandler; stdcall;
function cef_client_own_get_find_handler(self: PCefClient): PCefFindHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetFindHandler);
end;
function cef_client_get_focus_handler(self: PCefClient): PCefFocusHandler; stdcall;
function cef_client_own_get_focus_handler(self: PCefClient): PCefFocusHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetFocusHandler);
end;
function cef_client_get_geolocation_handler(self: PCefClient): PCefGeolocationHandler; stdcall;
function cef_client_own_get_geolocation_handler(self: PCefClient): PCefGeolocationHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetGeolocationHandler);
end;
function cef_client_get_jsdialog_handler(self: PCefClient): PCefJsDialogHandler; stdcall;
function cef_client_own_get_jsdialog_handler(self: PCefClient): PCefJsDialogHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetJsdialogHandler);
end;
function cef_client_get_keyboard_handler(self: PCefClient): PCefKeyboardHandler; stdcall;
function cef_client_own_get_keyboard_handler(self: PCefClient): PCefKeyboardHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetKeyboardHandler);
end;
function cef_client_get_life_span_handler(self: PCefClient): PCefLifeSpanHandler; stdcall;
function cef_client_own_get_life_span_handler(self: PCefClient): PCefLifeSpanHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetLifeSpanHandler);
end;
function cef_client_get_load_handler(self: PCefClient): PCefLoadHandler; stdcall;
function cef_client_own_get_load_handler(self: PCefClient): PCefLoadHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetLoadHandler);
end;
function cef_client_get_get_render_handler(self: PCefClient): PCefRenderHandler; stdcall;
function cef_client_own_get_get_render_handler(self: PCefClient): PCefRenderHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetRenderHandler);
end;
function cef_client_get_request_handler(self: PCefClient): PCefRequestHandler; stdcall;
function cef_client_own_get_request_handler(self: PCefClient): PCefRequestHandler; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
Result := CefGetData(GetRequestHandler);
end;
function cef_client_on_process_message_received(self: PCefClient; browser: PCefBrowser;
function cef_client_own_on_process_message_received(self: PCefClient; browser: PCefBrowser;
source_process: TCefProcessId; message: PCefProcessMessage): Integer; stdcall;
begin
with TCefClientOwn(CefGetObject(self)) do
@ -249,21 +383,21 @@ begin
with PCefClient(FData)^ do
begin
get_context_menu_handler := cef_client_get_context_menu_handler;
get_dialog_handler := cef_client_get_dialog_handler;
get_display_handler := cef_client_get_display_handler;
get_download_handler := cef_client_get_download_handler;
get_drag_handler := cef_client_get_drag_handler;
get_find_handler := cef_client_get_find_handler;
get_focus_handler := cef_client_get_focus_handler;
get_geolocation_handler := cef_client_get_geolocation_handler;
get_jsdialog_handler := cef_client_get_jsdialog_handler;
get_keyboard_handler := cef_client_get_keyboard_handler;
get_life_span_handler := cef_client_get_life_span_handler;
get_load_handler := cef_client_get_load_handler;
get_render_handler := cef_client_get_get_render_handler;
get_request_handler := cef_client_get_request_handler;
on_process_message_received := cef_client_on_process_message_received;
get_context_menu_handler := cef_client_own_get_context_menu_handler;
get_dialog_handler := cef_client_own_get_dialog_handler;
get_display_handler := cef_client_own_get_display_handler;
get_download_handler := cef_client_own_get_download_handler;
get_drag_handler := cef_client_own_get_drag_handler;
get_find_handler := cef_client_own_get_find_handler;
get_focus_handler := cef_client_own_get_focus_handler;
get_geolocation_handler := cef_client_own_get_geolocation_handler;
get_jsdialog_handler := cef_client_own_get_jsdialog_handler;
get_keyboard_handler := cef_client_own_get_keyboard_handler;
get_life_span_handler := cef_client_own_get_life_span_handler;
get_load_handler := cef_client_own_get_load_handler;
get_render_handler := cef_client_own_get_get_render_handler;
get_request_handler := cef_client_own_get_request_handler;
on_process_message_received := cef_client_own_on_process_message_received;
end;
end;
@ -342,7 +476,11 @@ begin
Result := False;
end;
// TCustomClientHandler
// ******************************************************
// *************** TCustomClientHandler *****************
// ******************************************************
constructor TCustomClientHandler.Create(const events: IChromiumEvents; renderer: Boolean);
begin
@ -361,17 +499,16 @@ begin
FJsDialogHandler := TCustomJsDialogHandler.Create(events);
FLifeSpanHandler := TCustomLifeSpanHandler.Create(events);
FRequestHandler := TCustomRequestHandler.Create(events);
FDragHandler := TCustomDragHandler.Create(events);
FFindHandler := TCustomFindHandler.Create(events);
if renderer then
FRenderHandler := TCustomRenderHandler.Create(events)
else
FRenderHandler := nil;
FDragHandler := TCustomDragHandler.Create(events);
FFindHandler := TCustomFindHandler.Create(events);
end;
procedure TCustomClientHandler.Disconnect;
destructor TCustomClientHandler.Destroy;
begin
FEvents := nil;
FLoadHandler := nil;
@ -388,6 +525,8 @@ begin
FRenderHandler := nil;
FDragHandler := nil;
FFindHandler := nil;
inherited Destroy;
end;
function TCustomClientHandler.GetContextMenuHandler: ICefContextMenuHandler;
@ -468,28 +607,11 @@ begin
Result := False;
end;
// TVCLClientHandler
procedure CefDoMessageLoopWork;
begin
if looping then Exit;
// ******************************************************
// **************** TVCLClientHandler *******************
// ******************************************************
if (CefInstances > 0) then
begin
looping := True;
try
cef_do_message_loop_work;
finally
looping := False;
end;
end;
end;
procedure TimerProc(hwnd: HWND; uMsg: UINT; idEvent: Pointer; dwTime: DWORD); stdcall;
begin
CefDoMessageLoopWork;
end;
constructor TVCLClientHandler.Create(const crm: IChromiumEvents; renderer : Boolean);
begin
@ -525,19 +647,6 @@ begin
end;
end;
procedure TVCLClientHandler.ReleaseOtherInstances;
var
i : integer;
begin
i := pred(self.FRefCount);
while (i >= 1) do
begin
self._Release;
dec(i);
end;
end;
function TVCLClientHandler.GetMultithreadApp : boolean;
begin
Result := True;

View File

@ -71,6 +71,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -160,14 +161,22 @@ end;
constructor TCustomContextMenuHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomContextMenuHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomContextMenuHandler.OnBeforeContextMenu(
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; const model: ICefMenuModel);
begin
FEvent.doOnBeforeContextMenu(browser, frame, params, model);
if (FEvent <> nil) then FEvent.doOnBeforeContextMenu(browser, frame, params, model);
end;
function TCustomContextMenuHandler.OnContextMenuCommand(
@ -175,14 +184,15 @@ function TCustomContextMenuHandler.OnContextMenuCommand(
const params: ICefContextMenuParams; commandId: Integer;
eventFlags: TCefEventFlags): Boolean;
begin
Result := FEvent.doOnContextMenuCommand(browser, frame, params, commandId,
eventFlags);
if (FEvent <> nil) then
Result := FEvent.doOnContextMenuCommand(browser, frame, params, commandId, eventFlags)
else
Result := inherited;
end;
procedure TCustomContextMenuHandler.OnContextMenuDismissed(
const browser: ICefBrowser; const frame: ICefFrame);
procedure TCustomContextMenuHandler.OnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame);
begin
FEvent.doOnContextMenuDismissed(browser, frame);
if (FEvent <> nil) then FEvent.doOnContextMenuDismissed(browser, frame);
end;
end.

View File

@ -71,6 +71,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -127,9 +128,19 @@ begin
FEvent := events;
end;
destructor TCustomDialogHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
function TCustomDialogHandler.OnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean;
begin
Result := FEvent.doOnFileDialog(browser, mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);
if (FEvent <> nil) then
Result := FEvent.doOnFileDialog(browser, mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback)
else
Result := inherited;
end;
end.

View File

@ -82,6 +82,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -227,49 +228,58 @@ end;
constructor TCustomDisplayHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomDisplayHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomDisplayHandler.OnAddressChange(const browser: ICefBrowser;
const frame: ICefFrame; const url: ustring);
begin
FEvent.doOnAddressChange(browser, frame, url);
if (FEvent <> nil) then FEvent.doOnAddressChange(browser, frame, url);
end;
function TCustomDisplayHandler.OnConsoleMessage(const browser: ICefBrowser;
const message, source: ustring; line: Integer): Boolean;
begin
Result := FEvent.doOnConsoleMessage(browser, message, source, line);
if (FEvent <> nil) then
Result := FEvent.doOnConsoleMessage(browser, message, source, line)
else
Result := inherited;
end;
procedure TCustomDisplayHandler.OnFaviconUrlChange(const browser: ICefBrowser;
iconUrls: TStrings);
procedure TCustomDisplayHandler.OnFaviconUrlChange(const browser: ICefBrowser; iconUrls: TStrings);
begin
FEvent.doOnFaviconUrlChange(browser, iconUrls);
if (FEvent <> nil) then FEvent.doOnFaviconUrlChange(browser, iconUrls);
end;
procedure TCustomDisplayHandler.OnFullScreenModeChange(
const browser: ICefBrowser; fullscreen: Boolean);
procedure TCustomDisplayHandler.OnFullScreenModeChange(const browser: ICefBrowser; fullscreen: Boolean);
begin
FEvent.doOnFullScreenModeChange(browser, fullscreen);
if (FEvent <> nil) then FEvent.doOnFullScreenModeChange(browser, fullscreen);
end;
procedure TCustomDisplayHandler.OnStatusMessage(const browser: ICefBrowser;
const value: ustring);
procedure TCustomDisplayHandler.OnStatusMessage(const browser: ICefBrowser; const value: ustring);
begin
FEvent.doOnStatusMessage(browser, value);
if (FEvent <> nil) then FEvent.doOnStatusMessage(browser, value);
end;
procedure TCustomDisplayHandler.OnTitleChange(const browser: ICefBrowser;
const title: ustring);
procedure TCustomDisplayHandler.OnTitleChange(const browser: ICefBrowser; const title: ustring);
begin
FEvent.doOnTitleChange(browser, title);
if (FEvent <> nil) then FEvent.doOnTitleChange(browser, title);
end;
function TCustomDisplayHandler.OnTooltip(const browser: ICefBrowser;
var text: ustring): Boolean;
function TCustomDisplayHandler.OnTooltip(const browser: ICefBrowser; var text: ustring): Boolean;
begin
Result := FEvent.doOnTooltip(browser, text);
if (FEvent <> nil) then
Result := FEvent.doOnTooltip(browser, text)
else
Result := inherited;
end;
end.

View File

@ -68,6 +68,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -124,21 +125,31 @@ end;
constructor TCustomDownloadHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomDownloadHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomDownloadHandler.OnBeforeDownload(const browser: ICefBrowser;
const downloadItem: ICefDownloadItem; const suggestedName: ustring;
const callback: ICefBeforeDownloadCallback);
begin
FEvent.doOnBeforeDownload(browser, downloadItem, suggestedName, callback);
if (FEvent <> nil) then
FEvent.doOnBeforeDownload(browser, downloadItem, suggestedName, callback);
end;
procedure TCustomDownloadHandler.OnDownloadUpdated(const browser: ICefBrowser;
const downloadItem: ICefDownloadItem;
const callback: ICefDownloadItemCallback);
begin
FEvent.doOnDownloadUpdated(browser, downloadItem, callback);
if (FEvent <> nil) then
FEvent.doOnDownloadUpdated(browser, downloadItem, callback);
end;
end.

View File

@ -68,6 +68,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -121,14 +122,25 @@ begin
FEvent := events;
end;
destructor TCustomDragHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
function TCustomDragHandler.OnDragEnter(const browser: ICefBrowser; const dragData: ICefDragData; mask: TCefDragOperations): Boolean;
begin
Result := FEvent.doOnDragEnter(browser, dragData, mask);
if (FEvent <> nil) then
Result := FEvent.doOnDragEnter(browser, dragData, mask)
else
Result := inherited;
end;
procedure TCustomDragHandler.OnDraggableRegionsChanged(const browser: ICefBrowser; regionsCount: NativeUInt; regions: PCefDraggableRegionArray);
begin
FEvent.doOnDraggableRegionsChanged(browser, regionsCount, regions);
if (FEvent <> nil) then
FEvent.doOnDraggableRegionsChanged(browser, regionsCount, regions);
end;
end.

View File

@ -66,6 +66,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -95,9 +96,17 @@ begin
FEvent := events;
end;
destructor TCustomFindHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomFindHandler.OnFindResult(const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean);
begin
FEvent.doOnFindResult(browser, identifier, count, selectionRect, activeMatchOrdinal, finalUpdate);
if (FEvent <> nil) then
FEvent.doOnFindResult(browser, identifier, count, selectionRect, activeMatchOrdinal, finalUpdate);
end;
end.

View File

@ -70,6 +70,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -126,22 +127,33 @@ end;
constructor TCustomFocusHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomFocusHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomFocusHandler.OnGotFocus(const browser: ICefBrowser);
begin
FEvent.doOnGotFocus(browser);
if (FEvent <> nil) then FEvent.doOnGotFocus(browser);
end;
function TCustomFocusHandler.OnSetFocus(const browser: ICefBrowser; source: TCefFocusSource): Boolean;
begin
Result := FEvent.doOnSetFocus(browser, source);
if (FEvent <> nil) then
Result := FEvent.doOnSetFocus(browser, source)
else
Result := inherited;
end;
procedure TCustomFocusHandler.OnTakeFocus(const browser: ICefBrowser; next: Boolean);
begin
FEvent.doOnTakeFocus(browser, next);
if (FEvent <> nil) then FEvent.doOnTakeFocus(browser, next);
end;

View File

@ -68,6 +68,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -122,19 +123,31 @@ end;
constructor TCustomGeolocationHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomGeolocationHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomGeolocationHandler.OnCancelGeolocationPermission(const browser: ICefBrowser; requestId: Integer);
begin
FEvent.doOnCancelGeolocationPermission(browser, requestId);
if (FEvent <> nil) then
FEvent.doOnCancelGeolocationPermission(browser, requestId);
end;
function TCustomGeolocationHandler.OnRequestGeolocationPermission(
const browser: ICefBrowser; const requestingUrl: ustring; requestId: Integer;
const callback: ICefGeolocationCallback): Boolean;
begin
Result := FEvent.doOnRequestGeolocationPermission(browser, requestingUrl, requestId, callback);
if (FEvent <> nil) then
Result := FEvent.doOnRequestGeolocationPermission(browser, requestingUrl, requestId, callback)
else
Result := inherited;
end;
end.

View File

@ -79,7 +79,6 @@ type
ICefSslInfo = interface;
ICefSSLStatus = interface;
ICefImage = interface;
ICefClientHandler = interface;
IChromiumEvents = interface;
ICefThread = interface;
ICefWaitableEvent = interface;
@ -1753,11 +1752,6 @@ type
const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean);
end;
ICefClientHandler = interface
['{E76F6888-D9C3-4FCE-9C23-E89659820A36}']
procedure Disconnect;
end;
implementation
end.

View File

@ -72,6 +72,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -161,19 +162,30 @@ end;
constructor TCustomJsDialogHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomJsDialogHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
function TCustomJsDialogHandler.OnBeforeUnloadDialog(const browser: ICefBrowser;
const messageText: ustring; isReload: Boolean;
const callback: ICefJsDialogCallback): Boolean;
begin
Result := FEvent.doOnBeforeUnloadDialog(browser, messageText, isReload, callback);
if (FEvent <> nil) then
Result := FEvent.doOnBeforeUnloadDialog(browser, messageText, isReload, callback)
else
Result := inherited;
end;
procedure TCustomJsDialogHandler.OnDialogClosed(const browser: ICefBrowser);
begin
FEvent.doOnDialogClosed(browser);
if (FEvent <> nil) then FEvent.doOnDialogClosed(browser);
end;
function TCustomJsDialogHandler.OnJsdialog(const browser: ICefBrowser;
@ -182,13 +194,15 @@ function TCustomJsDialogHandler.OnJsdialog(const browser: ICefBrowser;
const callback: ICefJsDialogCallback;
out suppressMessage: Boolean): Boolean;
begin
Result := FEvent.doOnJsdialog(browser, originUrl, dialogType,
messageText, defaultPromptText, callback, suppressMessage);
if (FEvent <> nil) then
Result := FEvent.doOnJsdialog(browser, originUrl, dialogType, messageText, defaultPromptText, callback, suppressMessage)
else
Result := inherited;
end;
procedure TCustomJsDialogHandler.OnResetDialogState(const browser: ICefBrowser);
begin
FEvent.doOnResetDialogState(browser);
if (FEvent <> nil) then FEvent.doOnResetDialogState(browser);
end;
end.

View File

@ -68,6 +68,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -120,20 +121,34 @@ end;
constructor TCustomKeyboardHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomKeyboardHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
function TCustomKeyboardHandler.OnKeyEvent(const browser: ICefBrowser;
const event: PCefKeyEvent; osEvent: TCefEventHandle): Boolean;
begin
Result := FEvent.doOnKeyEvent(browser, event, osEvent);
if (FEvent <> nil) then
Result := FEvent.doOnKeyEvent(browser, event, osEvent)
else
Result := inherited;
end;
function TCustomKeyboardHandler.OnPreKeyEvent(const browser: ICefBrowser;
const event: PCefKeyEvent; osEvent: TCefEventHandle;
out isKeyboardShortcut: Boolean): Boolean;
begin
Result := FEvent.doOnPreKeyEvent(browser, event, osEvent, isKeyboardShortcut);
if (FEvent <> nil) then
Result := FEvent.doOnPreKeyEvent(browser, event, osEvent, isKeyboardShortcut)
else
Result := inherited;
end;
end.

View File

@ -72,6 +72,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -79,39 +80,54 @@ implementation
uses
uCEFMiscFunctions, uCEFLibFunctions, uCEFClient, uCEFBrowser, uCEFFrame;
function cef_life_span_handler_on_before_popup(self: PCefLifeSpanHandler;
browser: PCefBrowser; frame: PCefFrame; const target_url, target_frame_name: PCefString;
target_disposition: TCefWindowOpenDisposition; user_gesture: Integer;
const popupFeatures: PCefPopupFeatures; windowInfo: PCefWindowInfo; var client: PCefClient;
settings: PCefBrowserSettings; no_javascript_access: PInteger): Integer; stdcall;
function cef_life_span_handler_on_before_popup( self : PCefLifeSpanHandler;
browser : PCefBrowser;
frame : PCefFrame;
const target_url : PCefString;
const target_frame_name : PCefString;
target_disposition : TCefWindowOpenDisposition;
user_gesture : Integer;
const popupFeatures : PCefPopupFeatures;
windowInfo : PCefWindowInfo;
var client : PCefClient;
settings : PCefBrowserSettings;
no_javascript_access : PInteger): Integer; stdcall;
var
_url, _frame: ustring;
_client: ICefClient;
_nojs: Boolean;
TempURL : ustring;
TempFrame : ustring;
TempClient : ICefClient;
TempOldCli : pointer;
TempNoJS : Boolean;
begin
_url := CefString(target_url);
_frame := CefString(target_frame_name);
_client := TCefClientOwn(CefGetObject(client)) as ICefClient;
_nojs := no_javascript_access^ <> 0;
TempURL := CefString(target_url);
TempFrame := CefString(target_frame_name);
TempNoJS := (no_javascript_access^ <> 0);
TempClient := TCefClientRef.UnWrap(client);
TempOldCli := pointer(TempClient);
with TCefLifeSpanHandlerOwn(CefGetObject(self)) do
Result := Ord(OnBeforePopup(
TCefBrowserRef.UnWrap(browser),
TCefFrameRef.UnWrap(frame),
_url,
_frame,
target_disposition,
user_gesture <> 0,
popupFeatures^,
windowInfo^,
_client,
settings^,
_nojs
));
CefStringSet(target_url, _url);
CefStringSet(target_frame_name, _frame);
client := CefGetData(_client);
no_javascript_access^ := Ord(_nojs);
_client := nil;
Result := Ord(OnBeforePopup(TCefBrowserRef.UnWrap(browser),
TCefFrameRef.UnWrap(frame),
TempURL,
TempFrame,
target_disposition,
user_gesture <> 0,
popupFeatures^,
windowInfo^,
TempClient,
settings^,
TempNoJS));
CefStringSet(target_url, TempURL);
CefStringSet(target_frame_name, TempFrame);
no_javascript_access^ := Ord(TempNoJS);
if (TempClient = nil) then
client := nil
else
if (TempOldCli <> pointer(TempClient)) then
client := CefGetData(TempClient);
end;
procedure cef_life_span_handler_on_after_created(self: PCefLifeSpanHandler; browser: PCefBrowser); stdcall;
@ -135,13 +151,14 @@ end;
constructor TCefLifeSpanHandlerOwn.Create;
begin
inherited CreateData(SizeOf(TCefLifeSpanHandler));
with PCefLifeSpanHandler(FData)^ do
begin
on_before_popup := cef_life_span_handler_on_before_popup;
on_after_created := cef_life_span_handler_on_after_created;
on_before_close := cef_life_span_handler_on_before_close;
do_close := cef_life_span_handler_do_close;
end;
begin
on_before_popup := cef_life_span_handler_on_before_popup;
on_after_created := cef_life_span_handler_on_after_created;
on_before_close := cef_life_span_handler_on_before_close;
do_close := cef_life_span_handler_do_close;
end;
end;
procedure TCefLifeSpanHandlerOwn.OnAfterCreated(const browser: ICefBrowser);
@ -174,25 +191,35 @@ end;
constructor TCustomLifeSpanHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomLifeSpanHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
function TCustomLifeSpanHandler.DoClose(const browser: ICefBrowser): Boolean;
begin
Result := FEvent.doOnClose(browser);
if (FEvent <> nil) then
Result := FEvent.doOnClose(browser)
else
Result := inherited;
end;
procedure TCustomLifeSpanHandler.OnAfterCreated(const browser: ICefBrowser);
begin
FEvent.doOnAfterCreated(browser);
if (FEvent <> nil) then FEvent.doOnAfterCreated(browser);
end;
procedure TCustomLifeSpanHandler.OnBeforeClose(const browser: ICefBrowser);
begin
FEvent.doOnBeforeClose(browser);
if (FEvent <> nil) then FEvent.doOnBeforeClose(browser);
end;
function TCustomLifeSpanHandler.OnBeforePopup(const browser: ICefBrowser;
const frame: ICefFrame; const targetUrl, targetFrameName: ustring;
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean;
@ -200,9 +227,12 @@ function TCustomLifeSpanHandler.OnBeforePopup(const browser: ICefBrowser;
var client: ICefClient; var settings: TCefBrowserSettings;
var noJavascriptAccess: Boolean): Boolean;
begin
Result := FEvent.doOnBeforePopup(browser, frame, targetUrl, targetFrameName,
targetDisposition, userGesture, popupFeatures, windowInfo, client, settings,
noJavascriptAccess);
if (FEvent <> nil) then
Result := FEvent.doOnBeforePopup(browser, frame, targetUrl, targetFrameName,
targetDisposition, userGesture, popupFeatures, windowInfo, client, settings,
noJavascriptAccess)
else
Result := inherited;
end;
end.

View File

@ -72,6 +72,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -145,24 +146,31 @@ begin
FEvent := events;
end;
destructor TCustomLoadHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomLoadHandler.OnLoadEnd(const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer);
begin
FEvent.doOnLoadEnd(browser, frame, httpStatusCode);
if (FEvent <> nil) then FEvent.doOnLoadEnd(browser, frame, httpStatusCode);
end;
procedure TCustomLoadHandler.OnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring);
begin
FEvent.doOnLoadError(browser, frame, errorCode, errorText, failedUrl);
if (FEvent <> nil) then FEvent.doOnLoadError(browser, frame, errorCode, errorText, failedUrl);
end;
procedure TCustomLoadHandler.OnLoadingStateChange(const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean);
begin
FEvent.doOnLoadingStateChange(browser, isLoading, canGoBack, canGoForward);
if (FEvent <> nil) then FEvent.doOnLoadingStateChange(browser, isLoading, canGoBack, canGoForward);
end;
procedure TCustomLoadHandler.OnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType);
begin
FEvent.doOnLoadStart(browser, frame, transitionType);
if (FEvent <> nil) then FEvent.doOnLoadStart(browser, frame, transitionType);
end;
end.

View File

@ -90,6 +90,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -318,65 +319,86 @@ begin
FEvent := events;
end;
destructor TCustomRenderHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
procedure TCustomRenderHandler.GetAccessibilityHandler(var aAccessibilityHandler : ICefAccessibilityHandler);
begin
FEvent.doOnGetAccessibilityHandler(aAccessibilityHandler);
if (FEvent <> nil) then FEvent.doOnGetAccessibilityHandler(aAccessibilityHandler);
end;
function TCustomRenderHandler.GetRootScreenRect(const browser: ICefBrowser;
rect: PCefRect): Boolean;
begin
Result := FEvent.doOnGetRootScreenRect(browser, rect);
if (FEvent <> nil) then
Result := FEvent.doOnGetRootScreenRect(browser, rect)
else
Result := inherited;
end;
function TCustomRenderHandler.GetScreenInfo(const browser: ICefBrowser;
screenInfo: PCefScreenInfo): Boolean;
begin
Result := FEvent.doOnGetScreenInfo(browser, screenInfo);
if (FEvent <> nil) then
Result := FEvent.doOnGetScreenInfo(browser, screenInfo)
else
Result := inherited;
end;
function TCustomRenderHandler.GetScreenPoint(const browser: ICefBrowser; viewX,
viewY: Integer; screenX, screenY: PInteger): Boolean;
begin
Result := FEvent.doOnGetScreenPoint(browser, viewX, viewY, screenX, screenY);
if (FEvent <> nil) then
Result := FEvent.doOnGetScreenPoint(browser, viewX, viewY, screenX, screenY)
else
Result := inherited;
end;
function TCustomRenderHandler.GetViewRect(const browser: ICefBrowser;
rect: PCefRect): Boolean;
begin
Result := FEvent.doOnGetViewRect(browser, rect);
if (FEvent <> nil) then
Result := FEvent.doOnGetViewRect(browser, rect)
else
Result := inherited;
end;
procedure TCustomRenderHandler.OnCursorChange(const browser: ICefBrowser;
cursor: TCefCursorHandle; cursorType: TCefCursorType;
const customCursorInfo: PCefCursorInfo);
begin
FEvent.doOnCursorChange(browser, cursor, cursorType, customCursorInfo);
if (FEvent <> nil) then
FEvent.doOnCursorChange(browser, cursor, cursorType, customCursorInfo);
end;
procedure TCustomRenderHandler.OnPaint(const browser: ICefBrowser;
kind: TCefPaintElementType; dirtyRectsCount: NativeUInt;
const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer);
begin
FEvent.doOnPaint(browser, kind, dirtyRectsCount, dirtyRects, buffer, width, height);
if (FEvent <> nil) then
FEvent.doOnPaint(browser, kind, dirtyRectsCount, dirtyRects, buffer, width, height);
end;
procedure TCustomRenderHandler.OnPopupShow(const browser: ICefBrowser;
show: Boolean);
begin
FEvent.doOnPopupShow(browser, show);
if (FEvent <> nil) then FEvent.doOnPopupShow(browser, show);
end;
procedure TCustomRenderHandler.OnPopupSize(const browser: ICefBrowser;
const rect: PCefRect);
begin
FEvent.doOnPopupSize(browser, rect);
if (FEvent <> nil) then FEvent.doOnPopupSize(browser, rect);
end;
procedure TCustomRenderHandler.OnScrollOffsetChanged(
const browser: ICefBrowser; x, y: Double);
begin
FEvent.doOnScrollOffsetChanged(browser, x, y);
if (FEvent <> nil) then FEvent.doOnScrollOffsetChanged(browser, x, y);
end;
procedure TCustomRenderHandler.OnIMECompositionRangeChanged(const browser: ICefBrowser;
@ -384,20 +406,23 @@ procedure TCustomRenderHandler.OnIMECompositionRangeChanged(const browser: ICefB
character_boundsCount: NativeUInt;
const character_bounds: PCefRect);
begin
FEvent.doOnIMECompositionRangeChanged(browser, selected_range, character_boundsCount, character_bounds);
if (FEvent <> nil) then
FEvent.doOnIMECompositionRangeChanged(browser, selected_range, character_boundsCount, character_bounds);
end;
function TCustomRenderHandler.OnStartDragging(const browser: ICefBrowser;
const dragData: ICefDragData; allowedOps: TCefDragOperations; x,
y: Integer): Boolean;
const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean;
begin
Result := FEvent.doOnStartDragging(browser, dragData, allowedOps, x, y);
if (FEvent <> nil) then
Result := FEvent.doOnStartDragging(browser, dragData, allowedOps, x, y)
else
Result := inherited;
end;
procedure TCustomRenderHandler.OnUpdateDragCursor(const browser: ICefBrowser;
operation: TCefDragOperation);
begin
FEvent.doOnUpdateDragCursor(browser, operation);
if (FEvent <> nil) then FEvent.doOnUpdateDragCursor(browser, operation);
end;
end.

View File

@ -97,6 +97,7 @@ type
public
constructor Create(const events: IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
@ -453,21 +454,34 @@ end;
constructor TCustomRequestHandler.Create(const events: IChromiumEvents);
begin
inherited Create;
FEvent := events;
end;
destructor TCustomRequestHandler.Destroy;
begin
FEvent := nil;
inherited Destroy;
end;
function TCustomRequestHandler.GetAuthCredentials(const browser: ICefBrowser;
const frame: ICefFrame; isProxy: Boolean; const host: ustring; port: Integer;
const realm, scheme: ustring; const callback: ICefAuthCallback): Boolean;
begin
Result := FEvent.doOnGetAuthCredentials(browser, frame, isProxy, host, port,
realm, scheme, callback);
if (FEvent <> nil) then
Result := FEvent.doOnGetAuthCredentials(browser, frame, isProxy, host, port, realm, scheme, callback)
else
Result := inherited;
end;
function TCustomRequestHandler.GetResourceHandler(const browser: ICefBrowser;
const frame: ICefFrame; const request: ICefRequest): ICefResourceHandler;
begin
Result := FEvent.doOnGetResourceHandler(browser, frame, request);
if (FEvent <> nil) then
Result := FEvent.doOnGetResourceHandler(browser, frame, request)
else
Result := inherited;
end;
function TCustomRequestHandler.OnBeforeBrowse(const browser: ICefBrowser;
@ -481,21 +495,30 @@ function TCustomRequestHandler.OnBeforeResourceLoad(const browser: ICefBrowser;
const frame: ICefFrame; const request: ICefRequest;
const callback: ICefRequestCallback): TCefReturnValue;
begin
Result := FEvent.doOnBeforeResourceLoad(browser, frame, request, callback);
if (FEvent <> nil) then
Result := FEvent.doOnBeforeResourceLoad(browser, frame, request, callback)
else
Result := inherited;
end;
function TCustomRequestHandler.OnCertificateError(const browser: ICefBrowser;
certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo;
const callback: ICefRequestCallback): Boolean;
begin
Result := FEvent.doOnCertificateError(browser, certError, requestUrl, sslInfo, callback);
if (FEvent <> nil) then
Result := FEvent.doOnCertificateError(browser, certError, requestUrl, sslInfo, callback)
else
Result := inherited;
end;
function TCustomRequestHandler.OnOpenUrlFromTab(const browser: ICefBrowser;
const frame: ICefFrame; const targetUrl: ustring;
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean): Boolean;
begin
Result := FEvent.doOnOpenUrlFromTab(browser, frame, targetUrl, targetDisposition, userGesture);
if (FEvent <> nil) then
Result := FEvent.doOnOpenUrlFromTab(browser, frame, targetUrl, targetDisposition, userGesture)
else
Result := inherited;
end;
function TCustomRequestHandler.OnSelectClientCertificate(const browser : ICefBrowser;
@ -506,50 +529,58 @@ function TCustomRequestHandler.OnSelectClientCertificate(const browser
const certificates : TCefX509CertificateArray;
const callback : ICefSelectClientCertificateCallback): boolean;
begin
Result := FEvent.doOnSelectClientCertificate(browser, isProxy, host, port, certificatesCount, certificates, callback);
if (FEvent <> nil) then
Result := FEvent.doOnSelectClientCertificate(browser, isProxy, host, port, certificatesCount, certificates, callback)
else
Result := inherited;
end;
procedure TCustomRequestHandler.OnPluginCrashed(const browser: ICefBrowser;
const pluginPath: ustring);
procedure TCustomRequestHandler.OnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring);
begin
FEvent.doOnPluginCrashed(browser, pluginPath);
if (FEvent <> nil) then FEvent.doOnPluginCrashed(browser, pluginPath);
end;
procedure TCustomRequestHandler.OnProtocolExecution(const browser: ICefBrowser;
const url: ustring; out allowOsExecution: Boolean);
begin
FEvent.doOnProtocolExecution(browser, url, allowOsExecution);
if (FEvent <> nil) then FEvent.doOnProtocolExecution(browser, url, allowOsExecution);
end;
function TCustomRequestHandler.OnQuotaRequest(const browser: ICefBrowser;
const originUrl: ustring; newSize: Int64;
const callback: ICefRequestCallback): Boolean;
begin
Result := FEvent.doOnQuotaRequest(browser, originUrl, newSize, callback);
if (FEvent <> nil) then
Result := FEvent.doOnQuotaRequest(browser, originUrl, newSize, callback)
else
Result := inherited;
end;
procedure TCustomRequestHandler.OnRenderProcessTerminated(
const browser: ICefBrowser; status: TCefTerminationStatus);
begin
FEvent.doOnRenderProcessTerminated(browser, status);
if (FEvent <> nil) then FEvent.doOnRenderProcessTerminated(browser, status);
end;
procedure TCustomRequestHandler.OnRenderViewReady(const browser: ICefBrowser);
begin
FEvent.doOnRenderViewReady(browser);
if (FEvent <> nil) then FEvent.doOnRenderViewReady(browser);
end;
procedure TCustomRequestHandler.OnResourceRedirect(const browser: ICefBrowser;
const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var newUrl: ustring);
begin
FEvent.doOnResourceRedirect(browser, frame, request, response, newUrl);
if (FEvent <> nil) then FEvent.doOnResourceRedirect(browser, frame, request, response, newUrl);
end;
function TCustomRequestHandler.OnResourceResponse(const browser: ICefBrowser;
const frame: ICefFrame; const request: ICefRequest;
const response: ICefResponse): Boolean;
begin
Result := FEvent.doOnResourceResponse(browser, frame, request, response);
if (FEvent <> nil) then
Result := FEvent.doOnResourceResponse(browser, frame, request, response)
else
Result := inherited;
end;
function TCustomRequestHandler.GetResourceResponseFilter(const browser: ICefBrowser;
@ -557,7 +588,10 @@ function TCustomRequestHandler.GetResourceResponseFilter(const browser: ICefBrow
const request: ICefRequest;
const response: ICefResponse): ICefResponseFilter;
begin
Result := FEvent.doOnGetResourceResponseFilter(browser, frame, request, response);
if (FEvent <> nil) then
Result := FEvent.doOnGetResourceResponseFilter(browser, frame, request, response)
else
Result := inherited;
end;
procedure TCustomRequestHandler.OnResourceLoadComplete(const browser: ICefBrowser;
@ -567,7 +601,8 @@ procedure TCustomRequestHandler.OnResourceLoadComplete(const browser: ICefBrowse
status: TCefUrlRequestStatus;
receivedContentLength: Int64);
begin
FEvent.doOnResourceLoadComplete(browser, frame, request, response, status, receivedContentLength);
if (FEvent <> nil) then
FEvent.doOnResourceLoadComplete(browser, frame, request, response, status, receivedContentLength);
end;
end.