mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-05-13 21:46:53 +02:00
Update to CEF 3.2987.1596.gc2b4638
* New properties in TCEFApplication : SmoothScrolling, FastUnload, DisableSafeBrowsing. * Bug fix in CefResponseFilter. Thanks to Zdravko Gabrovski! * MiniBrowser now has a context menu option to visit the DOM.
This commit is contained in:
parent
68769fdda2
commit
b5b9547d28
@ -49,6 +49,13 @@ uses
|
|||||||
uCEFApplication,
|
uCEFApplication,
|
||||||
uCEFMiscFunctions,
|
uCEFMiscFunctions,
|
||||||
uCEFSchemeRegistrar,
|
uCEFSchemeRegistrar,
|
||||||
|
uCEFRenderProcessHandler,
|
||||||
|
uCEFv8Handler,
|
||||||
|
uCEFInterfaces,
|
||||||
|
uCEFDomVisitor,
|
||||||
|
uCEFConstants,
|
||||||
|
uCEFTypes,
|
||||||
|
uCEFTask,
|
||||||
uMiniBrowser in 'uMiniBrowser.pas' {MiniBrowserFrm},
|
uMiniBrowser in 'uMiniBrowser.pas' {MiniBrowserFrm},
|
||||||
uTestExtension in 'uTestExtension.pas',
|
uTestExtension in 'uTestExtension.pas',
|
||||||
uHelloScheme in 'uHelloScheme.pas',
|
uHelloScheme in 'uHelloScheme.pas',
|
||||||
@ -56,16 +63,58 @@ uses
|
|||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
var
|
||||||
|
TempProcessHandler : TCefCustomRenderProcessHandler;
|
||||||
|
|
||||||
|
procedure DOMVisitor_OnDocAvailable(const document: ICefDomDocument);
|
||||||
|
begin
|
||||||
|
// This function is called from a different process.
|
||||||
|
// document is only valid inside this function.
|
||||||
|
// As an example, this function only writes the document title to the 'debug.log' file.
|
||||||
|
CefLog('CEF4Delphi', 1, CEF_LOG_SEVERITY_ERROR, 'document.Title : ' + document.Title);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ProcessHandler_OnCustomMessage(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage);
|
||||||
|
var
|
||||||
|
TempFrame : ICefFrame;
|
||||||
|
TempVisitor : TCefFastDomVisitor;
|
||||||
|
begin
|
||||||
|
if (browser <> nil) then
|
||||||
|
begin
|
||||||
|
TempFrame := browser.MainFrame;
|
||||||
|
|
||||||
|
if (TempFrame <> nil) then
|
||||||
|
begin
|
||||||
|
TempVisitor := TCefFastDomVisitor.Create(DOMVisitor_OnDocAvailable);
|
||||||
|
TempFrame.VisitDom(TempVisitor);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ProcessHandler_OnWebKitReady;
|
||||||
|
begin
|
||||||
|
{$IFDEF DELPHI14_UP}
|
||||||
|
TCefRTTIExtension.Register('app', TTestExtension);
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
procedure GlobalCEFApp_OnRegCustomSchemes(const registrar: TCefSchemeRegistrarRef);
|
procedure GlobalCEFApp_OnRegCustomSchemes(const registrar: TCefSchemeRegistrarRef);
|
||||||
begin
|
begin
|
||||||
registrar.AddCustomScheme('hello', True, True, False, False, False);
|
registrar.AddCustomScheme('hello', True, True, False, False, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
TempProcessHandler := TCefCustomRenderProcessHandler.Create;
|
||||||
|
TempProcessHandler.MessageName := 'retrievedom'; // same message name than TMiniBrowserFrm.VisitDOMMsg
|
||||||
|
TempProcessHandler.OnCustomMessage := ProcessHandler_OnCustomMessage;
|
||||||
|
TempProcessHandler.OnWebKitReady := ProcessHandler_OnWebKitReady;
|
||||||
|
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
GlobalCEFApp.RemoteDebuggingPort := 9000;
|
GlobalCEFApp.RemoteDebuggingPort := 9000;
|
||||||
GlobalCEFApp.RenderProcessHandler := TCustomRenderProcessHandler.Create;
|
GlobalCEFApp.RenderProcessHandler := TempProcessHandler as ICefRenderProcessHandler;
|
||||||
GlobalCEFApp.OnRegCustomSchemes := GlobalCEFApp_OnRegCustomSchemes;
|
GlobalCEFApp.OnRegCustomSchemes := GlobalCEFApp_OnRegCustomSchemes;
|
||||||
|
GlobalCEFApp.LogFile := 'debug.log';
|
||||||
|
GlobalCEFApp.LogSeverity := LOGSEVERITY_ERROR;
|
||||||
|
|
||||||
// Examples of command line switches.
|
// Examples of command line switches.
|
||||||
// **********************************
|
// **********************************
|
||||||
|
@ -105,7 +105,6 @@
|
|||||||
<DCCReference Include="uHelloScheme.pas"/>
|
<DCCReference Include="uHelloScheme.pas"/>
|
||||||
<DCCReference Include="uPreferences.pas">
|
<DCCReference Include="uPreferences.pas">
|
||||||
<Form>PreferencesFrm</Form>
|
<Form>PreferencesFrm</Form>
|
||||||
<FormType>dfm</FormType>
|
|
||||||
</DCCReference>
|
</DCCReference>
|
||||||
<BuildConfiguration Include="Release">
|
<BuildConfiguration Include="Release">
|
||||||
<Key>Cfg_2</Key>
|
<Key>Cfg_2</Key>
|
||||||
|
@ -1,39 +1,46 @@
|
|||||||
[Closed Files]
|
[Closed Files]
|
||||||
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uTestExtension.pas',0,1,1,1,40,0,0,,
|
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,558,38,599,0,0,,
|
||||||
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uHelloScheme.pas',0,1,1,1,40,0,0,,
|
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRenderProcessHandler.pas',0,1,62,19,86,0,0,,
|
||||||
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,1,25,38,0,0,,
|
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas',0,1,735,3,764,0,0,,
|
||||||
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uPreferences.pas',0,1,10,51,49,0,0,,
|
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas',0,1,588,5,617,0,0,,
|
||||||
File_4=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\source\vcl\Vcl.Dialogs.pas',0,1,6752,22,6771,0,0,,
|
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromiumEvents.pas',0,1,35,96,52,0,0,,
|
||||||
File_5=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\source\Property Editors\FmxAnimationEditors.pas',0,1,1882,37,1904,0,0,,
|
File_5=TSourceModule,'c:\program files\embarcadero\studio\17.0\source\rtl\common\System.Classes.pas',0,1,132,44,155,0,0,,
|
||||||
File_6=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\source\Property Editors\Indy10\IdDsnPropEdBindingVCL.pas',0,1,789,25,811,0,0,,
|
File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,222,65,245,0,0,,
|
||||||
File_7=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\source\Experts\ExpertsUIWizard.pas',0,1,540,33,562,0,0,,
|
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,265,1,288,0,0,,
|
||||||
File_8=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\source\DUnit\Contrib\DUnitWizard\Source\DelphiExperts\DUnitProject\XPDUnitTestModule.pas',0,1,135,32,157,0,0,,
|
File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFBaseRefCounted.pas',0,1,121,1,146,0,0,,
|
||||||
File_9=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\source\data\ems\desktopconsole\EMSManagementConsole.FrameAdd.pas',0,1,478,32,500,0,0,,
|
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uHelloScheme.pas',0,1,1,1,40,0,0,,
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj
|
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
|
||||||
Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
|
Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj
|
||||||
Module2=default.htm
|
Module2=default.htm
|
||||||
Count=3
|
Module3=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uTestExtension.pas
|
||||||
|
Count=4
|
||||||
EditWindowCount=1
|
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]
|
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas]
|
||||||
ModuleType=TSourceModule
|
ModuleType=TSourceModule
|
||||||
FormState=1
|
FormState=1
|
||||||
FormOnTop=0
|
FormOnTop=0
|
||||||
|
|
||||||
|
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dproj]
|
||||||
|
ModuleType=TBaseProject
|
||||||
|
|
||||||
[default.htm]
|
[default.htm]
|
||||||
ModuleType=TURLModule
|
ModuleType=TURLModule
|
||||||
|
|
||||||
|
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uTestExtension.pas]
|
||||||
|
ModuleType=TSourceModule
|
||||||
|
FormState=0
|
||||||
|
FormOnTop=0
|
||||||
|
|
||||||
[EditWindow0]
|
[EditWindow0]
|
||||||
ViewCount=3
|
ViewCount=4
|
||||||
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
|
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
|
||||||
View0=0
|
View0=0
|
||||||
View1=1
|
View1=1
|
||||||
View2=2
|
View2=2
|
||||||
|
View3=3
|
||||||
PercentageSizes=1
|
PercentageSizes=1
|
||||||
Create=1
|
Create=1
|
||||||
Visible=1
|
Visible=1
|
||||||
@ -50,18 +57,17 @@ ClientHeight=9428
|
|||||||
DockedToMainForm=1
|
DockedToMainForm=1
|
||||||
BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
|
BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
|
||||||
TopPanelSize=0
|
TopPanelSize=0
|
||||||
LeftPanelSize=1898
|
LeftPanelSize=0
|
||||||
LeftPanelClients=PropertyInspector,DockSite3
|
|
||||||
LeftPanelData=00000800010100000000AA19000000000000016A0700000000000001000000005D0E000009000000446F636B53697465330100000000A12300001100000050726F7065727479496E73706563746F72FFFFFFFF
|
|
||||||
RightPanelSize=2000
|
RightPanelSize=2000
|
||||||
RightPanelClients=DockSite2,DockSite4
|
RightPanelClients=DockSite2,DockSite4
|
||||||
RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF
|
RightPanelData=000008000101000000001E1500000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000511D000009000000446F636B5369746534FFFFFFFF
|
||||||
BottomPanelSize=0
|
BottomPanelSize=1551
|
||||||
BottomPanelClients=DockSite1,MessageView
|
BottomPanelClients=DockSite1,MessageView
|
||||||
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF
|
BottomPanelData=0000080001020100000009000000446F636B53697465313B36000000000000020F0600000000000001000000003B3600000F0000004D65737361676556696577466F726DFFFFFFFF
|
||||||
BottomMiddlePanelSize=0
|
BottomMiddlePanelSize=0
|
||||||
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
|
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
|
||||||
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
|
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
|
||||||
|
TabDockLeftClients=PropertyInspector=0,DockSite3=1
|
||||||
|
|
||||||
[View0]
|
[View0]
|
||||||
CustomEditViewType=TWelcomePageView
|
CustomEditViewType=TWelcomePageView
|
||||||
@ -69,25 +75,36 @@ WelcomePageURL=bds:/default.htm
|
|||||||
|
|
||||||
[View1]
|
[View1]
|
||||||
CustomEditViewType=TEditView
|
CustomEditViewType=TEditView
|
||||||
|
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
|
||||||
|
CursorX=70
|
||||||
|
CursorY=95
|
||||||
|
TopLine=74
|
||||||
|
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
|
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
|
||||||
CursorX=76
|
CursorX=87
|
||||||
CursorY=82
|
CursorY=411
|
||||||
TopLine=1
|
TopLine=387
|
||||||
LeftCol=1
|
LeftCol=1
|
||||||
Elisions=
|
Elisions=
|
||||||
Bookmarks=
|
Bookmarks=
|
||||||
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
|
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas
|
||||||
|
|
||||||
[View2]
|
[View3]
|
||||||
CustomEditViewType=TEditView
|
CustomEditViewType=TEditView
|
||||||
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
|
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uTestExtension.pas
|
||||||
CursorX=1
|
CursorX=1
|
||||||
CursorY=41
|
CursorY=68
|
||||||
TopLine=22
|
TopLine=38
|
||||||
LeftCol=1
|
LeftCol=1
|
||||||
Elisions=
|
Elisions=
|
||||||
Bookmarks=
|
Bookmarks=
|
||||||
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\MiniBrowser.dpr
|
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uTestExtension.pas
|
||||||
|
|
||||||
[Watches]
|
[Watches]
|
||||||
Count=0
|
Count=0
|
||||||
@ -103,18 +120,19 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=3820
|
Width=3820
|
||||||
Height=1121
|
Height=1043
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=3820
|
ClientWidth=3820
|
||||||
ClientHeight=1121
|
ClientHeight=1043
|
||||||
TBDockHeight=213
|
TBDockHeight=213
|
||||||
LRDockWidth=13602
|
LRDockWidth=13602
|
||||||
Dockable=1
|
Dockable=1
|
||||||
StayOnTop=0
|
StayOnTop=0
|
||||||
|
|
||||||
[Breakpoints]
|
[Breakpoints]
|
||||||
Count=0
|
Count=1
|
||||||
|
Breakpoint0='C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',2552,'',0,1,'',0,0,0,'doOnProcessMessageReceived',1,'','','',0,''
|
||||||
|
|
||||||
[EmbarcaderoWin32Debugger_AddressBreakpoints]
|
[EmbarcaderoWin32Debugger_AddressBreakpoints]
|
||||||
Count=0
|
Count=0
|
||||||
@ -164,18 +182,18 @@ StayOnTop=0
|
|||||||
[MessageView]
|
[MessageView]
|
||||||
PercentageSizes=1
|
PercentageSizes=1
|
||||||
Create=1
|
Create=1
|
||||||
Visible=0
|
Visible=1
|
||||||
Docked=1
|
Docked=1
|
||||||
State=0
|
State=0
|
||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=23
|
||||||
Width=2773
|
Width=10000
|
||||||
Height=1424
|
Height=1345
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=2773
|
ClientWidth=10000
|
||||||
ClientHeight=1424
|
ClientHeight=1345
|
||||||
TBDockHeight=1424
|
TBDockHeight=1345
|
||||||
LRDockWidth=2773
|
LRDockWidth=2773
|
||||||
Dockable=1
|
Dockable=1
|
||||||
StayOnTop=0
|
StayOnTop=0
|
||||||
@ -189,11 +207,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=2000
|
Width=2000
|
||||||
Height=4339
|
Height=2668
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=2000
|
ClientWidth=2000
|
||||||
ClientHeight=4339
|
ClientHeight=2668
|
||||||
TBDockHeight=7152
|
TBDockHeight=7152
|
||||||
LRDockWidth=2000
|
LRDockWidth=2000
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -243,8 +261,8 @@ Create=1
|
|||||||
Visible=0
|
Visible=0
|
||||||
Docked=1
|
Docked=1
|
||||||
State=0
|
State=0
|
||||||
Left=-121
|
Left=-8
|
||||||
Top=-74
|
Top=-30
|
||||||
Width=1844
|
Width=1844
|
||||||
Height=3139
|
Height=3139
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
@ -297,18 +315,18 @@ StayOnTop=0
|
|||||||
[PropertyInspector]
|
[PropertyInspector]
|
||||||
PercentageSizes=1
|
PercentageSizes=1
|
||||||
Create=1
|
Create=1
|
||||||
Visible=1
|
Visible=0
|
||||||
Docked=1
|
Docked=1
|
||||||
State=0
|
State=0
|
||||||
Left=0
|
Left=78
|
||||||
Top=362
|
Top=386
|
||||||
Width=1898
|
Width=1898
|
||||||
Height=5370
|
Height=7164
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=1898
|
ClientWidth=1898
|
||||||
ClientHeight=5370
|
ClientHeight=7164
|
||||||
TBDockHeight=7119
|
TBDockHeight=7164
|
||||||
LRDockWidth=1898
|
LRDockWidth=1898
|
||||||
Dockable=1
|
Dockable=1
|
||||||
StayOnTop=0
|
StayOnTop=0
|
||||||
@ -383,11 +401,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=3820
|
Width=3820
|
||||||
Height=1121
|
Height=1043
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=3820
|
ClientWidth=3820
|
||||||
ClientHeight=1121
|
ClientHeight=1043
|
||||||
TBDockHeight=415
|
TBDockHeight=415
|
||||||
LRDockWidth=4953
|
LRDockWidth=4953
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -402,11 +420,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=3820
|
Width=3820
|
||||||
Height=1121
|
Height=1043
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=3820
|
ClientWidth=3820
|
||||||
ClientHeight=1121
|
ClientHeight=1043
|
||||||
TBDockHeight=213
|
TBDockHeight=213
|
||||||
LRDockWidth=7406
|
LRDockWidth=7406
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -425,11 +443,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=3820
|
Width=3820
|
||||||
Height=1121
|
Height=1043
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=3820
|
ClientWidth=3820
|
||||||
ClientHeight=1121
|
ClientHeight=1043
|
||||||
TBDockHeight=1536
|
TBDockHeight=1536
|
||||||
LRDockWidth=3484
|
LRDockWidth=3484
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -444,11 +462,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=3820
|
Width=3820
|
||||||
Height=1121
|
Height=1043
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=3820
|
ClientWidth=3820
|
||||||
ClientHeight=1121
|
ClientHeight=1043
|
||||||
TBDockHeight=2063
|
TBDockHeight=2063
|
||||||
LRDockWidth=3484
|
LRDockWidth=3484
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -566,11 +584,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=3820
|
Width=3820
|
||||||
Height=1121
|
Height=1043
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=3820
|
ClientWidth=3820
|
||||||
ClientHeight=1121
|
ClientHeight=1043
|
||||||
TBDockHeight=1547
|
TBDockHeight=1547
|
||||||
LRDockWidth=8742
|
LRDockWidth=8742
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -591,12 +609,12 @@ Docked=1
|
|||||||
State=0
|
State=0
|
||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=1898
|
Width=1773
|
||||||
Height=3498
|
Height=6738
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=1898
|
ClientWidth=1773
|
||||||
ClientHeight=3498
|
ClientHeight=6738
|
||||||
TBDockHeight=3677
|
TBDockHeight=3677
|
||||||
LRDockWidth=1898
|
LRDockWidth=1898
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -678,12 +696,12 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=23
|
Top=23
|
||||||
Width=3820
|
Width=3820
|
||||||
Height=1424
|
Height=1345
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=3820
|
ClientWidth=3820
|
||||||
ClientHeight=1424
|
ClientHeight=1345
|
||||||
TBDockHeight=1424
|
TBDockHeight=1345
|
||||||
LRDockWidth=3820
|
LRDockWidth=3820
|
||||||
Dockable=1
|
Dockable=1
|
||||||
StayOnTop=0
|
StayOnTop=0
|
||||||
@ -716,22 +734,22 @@ ActiveTabID=ProjectManager
|
|||||||
TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm
|
TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm
|
||||||
|
|
||||||
[DockSite3]
|
[DockSite3]
|
||||||
HostDockSite=DockLeftPanel
|
HostDockSite=LeftDockTabSet
|
||||||
DockSiteType=1
|
DockSiteType=1
|
||||||
PercentageSizes=1
|
PercentageSizes=1
|
||||||
Create=1
|
Create=1
|
||||||
Visible=1
|
Visible=0
|
||||||
Docked=1
|
Docked=1
|
||||||
State=0
|
State=0
|
||||||
Left=0
|
Left=0
|
||||||
Top=23
|
Top=0
|
||||||
Width=1898
|
Width=1898
|
||||||
Height=3498
|
Height=7164
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=1898
|
ClientWidth=1773
|
||||||
ClientHeight=3498
|
ClientHeight=6738
|
||||||
TBDockHeight=7119
|
TBDockHeight=7164
|
||||||
LRDockWidth=1898
|
LRDockWidth=1898
|
||||||
Dockable=1
|
Dockable=1
|
||||||
StayOnTop=0
|
StayOnTop=0
|
||||||
@ -750,11 +768,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=454
|
Top=454
|
||||||
Width=2000
|
Width=2000
|
||||||
Height=4339
|
Height=2668
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=2000
|
ClientWidth=2000
|
||||||
ClientHeight=4339
|
ClientHeight=2668
|
||||||
TBDockHeight=7119
|
TBDockHeight=7119
|
||||||
LRDockWidth=2000
|
LRDockWidth=2000
|
||||||
Dockable=1
|
Dockable=1
|
||||||
|
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
[Stats]
|
[Stats]
|
||||||
EditorSecs=16035
|
EditorSecs=20406
|
||||||
DesignerSecs=1777
|
DesignerSecs=1796
|
||||||
InspectorSecs=1204
|
InspectorSecs=1288
|
||||||
CompileSecs=764079
|
CompileSecs=899865
|
||||||
OtherSecs=2346
|
OtherSecs=2832
|
||||||
StartTime=11/02/2017 10:51:15
|
StartTime=11/02/2017 10:51:15
|
||||||
RealKeys=0
|
RealKeys=0
|
||||||
EffectiveKeys=0
|
EffectiveKeys=0
|
||||||
DebugSecs=8921
|
DebugSecs=10091
|
||||||
|
@ -117,7 +117,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Padding.Bottom = 8
|
Padding.Bottom = 8
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitWidth = 915
|
|
||||||
object URLCbx: TComboBox
|
object URLCbx: TComboBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 9
|
Top = 9
|
||||||
@ -133,7 +132,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
'https://www.whatismybrowser.com/detect/what-http-headers-is-my-b' +
|
'https://www.whatismybrowser.com/detect/what-http-headers-is-my-b' +
|
||||||
'rowser-sending'
|
'rowser-sending'
|
||||||
'https://www.w3schools.com/js/tryit.asp?filename=tryjs_win_close')
|
'https://www.w3schools.com/js/tryit.asp?filename=tryjs_win_close')
|
||||||
ExplicitWidth = 915
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ConfigPnl: TPanel
|
object ConfigPnl: TPanel
|
||||||
@ -144,7 +142,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Align = alRight
|
Align = alRight
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitLeft = 1015
|
|
||||||
object ConfigBtn: TButton
|
object ConfigBtn: TButton
|
||||||
Left = 40
|
Left = 40
|
||||||
Top = 8
|
Top = 8
|
||||||
@ -184,7 +181,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Height = 656
|
Height = 656
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitHeight = 621
|
|
||||||
end
|
end
|
||||||
object DevTools: TCEFWindowParent
|
object DevTools: TCEFWindowParent
|
||||||
Left = 1089
|
Left = 1089
|
||||||
@ -194,7 +190,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Align = alRight
|
Align = alRight
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Visible = False
|
Visible = False
|
||||||
ExplicitHeight = 621
|
|
||||||
end
|
end
|
||||||
object StatusBar1: TStatusBar
|
object StatusBar1: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -205,7 +200,6 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
item
|
item
|
||||||
Width = 50
|
Width = 50
|
||||||
end>
|
end>
|
||||||
ExplicitTop = 662
|
|
||||||
end
|
end
|
||||||
object Chromium1: TChromium
|
object Chromium1: TChromium
|
||||||
OnTextResultAvailable = Chromium1TextResultAvailable
|
OnTextResultAvailable = Chromium1TextResultAvailable
|
||||||
@ -228,6 +222,35 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Caption = 'DevTools'
|
Caption = 'DevTools'
|
||||||
OnClick = DevTools1Click
|
OnClick = DevTools1Click
|
||||||
end
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Print1: TMenuItem
|
||||||
|
Caption = 'Print'
|
||||||
|
OnClick = Print1Click
|
||||||
|
end
|
||||||
|
object PrintinPDF1: TMenuItem
|
||||||
|
Caption = 'Print to PDF'
|
||||||
|
OnClick = PrintinPDF1Click
|
||||||
|
end
|
||||||
|
object N3: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Zoom1: TMenuItem
|
||||||
|
Caption = 'Zoom'
|
||||||
|
object Inczoom1: TMenuItem
|
||||||
|
Caption = 'Inc zoom'
|
||||||
|
OnClick = Inczoom1Click
|
||||||
|
end
|
||||||
|
object Deczoom1: TMenuItem
|
||||||
|
Caption = 'Dec zoom'
|
||||||
|
OnClick = Deczoom1Click
|
||||||
|
end
|
||||||
|
object Resetzoom1: TMenuItem
|
||||||
|
Caption = 'Reset zoom'
|
||||||
|
OnClick = Resetzoom1Click
|
||||||
|
end
|
||||||
|
end
|
||||||
object N1: TMenuItem
|
object N1: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
@ -236,4 +259,8 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
OnClick = Preferences1Click
|
OnClick = Preferences1Click
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object SaveDialog1: TSaveDialog
|
||||||
|
Left = 488
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -56,6 +56,7 @@ const
|
|||||||
MINIBROWSER_SHOWDEVTOOLS = WM_APP + $101;
|
MINIBROWSER_SHOWDEVTOOLS = WM_APP + $101;
|
||||||
MINIBROWSER_HIDEDEVTOOLS = WM_APP + $102;
|
MINIBROWSER_HIDEDEVTOOLS = WM_APP + $102;
|
||||||
MINIBROWSER_COPYHTML = WM_APP + $103;
|
MINIBROWSER_COPYHTML = WM_APP + $103;
|
||||||
|
MINIBROWSER_VISITDOM = WM_APP + $104;
|
||||||
|
|
||||||
MINIBROWSER_HOMEPAGE = 'https://www.google.com';
|
MINIBROWSER_HOMEPAGE = 'https://www.google.com';
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ const
|
|||||||
MINIBROWSER_CONTEXTMENU_SHOWJSALERT = MENU_ID_USER_FIRST + 3;
|
MINIBROWSER_CONTEXTMENU_SHOWJSALERT = MENU_ID_USER_FIRST + 3;
|
||||||
MINIBROWSER_CONTEXTMENU_SETJSEVENT = MENU_ID_USER_FIRST + 4;
|
MINIBROWSER_CONTEXTMENU_SETJSEVENT = MENU_ID_USER_FIRST + 4;
|
||||||
MINIBROWSER_CONTEXTMENU_COPYHTML = MENU_ID_USER_FIRST + 5;
|
MINIBROWSER_CONTEXTMENU_COPYHTML = MENU_ID_USER_FIRST + 5;
|
||||||
|
MINIBROWSER_CONTEXTMENU_VISITDOM = MENU_ID_USER_FIRST + 6;
|
||||||
|
|
||||||
type
|
type
|
||||||
TMiniBrowserFrm = class(TForm)
|
TMiniBrowserFrm = class(TForm)
|
||||||
@ -87,6 +89,15 @@ type
|
|||||||
N1: TMenuItem;
|
N1: TMenuItem;
|
||||||
Preferences1: TMenuItem;
|
Preferences1: TMenuItem;
|
||||||
GoBtn: TButton;
|
GoBtn: TButton;
|
||||||
|
N2: TMenuItem;
|
||||||
|
PrintinPDF1: TMenuItem;
|
||||||
|
Print1: TMenuItem;
|
||||||
|
N3: TMenuItem;
|
||||||
|
Zoom1: TMenuItem;
|
||||||
|
Inczoom1: TMenuItem;
|
||||||
|
Deczoom1: TMenuItem;
|
||||||
|
Resetzoom1: TMenuItem;
|
||||||
|
SaveDialog1: TSaveDialog;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure BackBtnClick(Sender: TObject);
|
procedure BackBtnClick(Sender: TObject);
|
||||||
procedure ForwardBtnClick(Sender: TObject);
|
procedure ForwardBtnClick(Sender: TObject);
|
||||||
@ -120,6 +131,11 @@ type
|
|||||||
procedure Preferences1Click(Sender: TObject);
|
procedure Preferences1Click(Sender: TObject);
|
||||||
procedure ConfigBtnClick(Sender: TObject);
|
procedure ConfigBtnClick(Sender: TObject);
|
||||||
procedure GoBtnClick(Sender: TObject);
|
procedure GoBtnClick(Sender: TObject);
|
||||||
|
procedure PrintinPDF1Click(Sender: TObject);
|
||||||
|
procedure Print1Click(Sender: TObject);
|
||||||
|
procedure Inczoom1Click(Sender: TObject);
|
||||||
|
procedure Deczoom1Click(Sender: TObject);
|
||||||
|
procedure Resetzoom1Click(Sender: TObject);
|
||||||
|
|
||||||
protected
|
protected
|
||||||
procedure AddURL(const aURL : string);
|
procedure AddURL(const aURL : string);
|
||||||
@ -132,6 +148,7 @@ type
|
|||||||
procedure ShowDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_SHOWDEVTOOLS;
|
procedure ShowDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_SHOWDEVTOOLS;
|
||||||
procedure HideDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_HIDEDEVTOOLS;
|
procedure HideDevToolsMsg(var aMessage : TMessage); message MINIBROWSER_HIDEDEVTOOLS;
|
||||||
procedure CopyHTMLMsg(var aMessage : TMessage); message MINIBROWSER_COPYHTML;
|
procedure CopyHTMLMsg(var aMessage : TMessage); message MINIBROWSER_COPYHTML;
|
||||||
|
procedure VisitDOMMsg(var aMessage : TMessage); message MINIBROWSER_VISITDOM;
|
||||||
public
|
public
|
||||||
|
|
||||||
end;
|
end;
|
||||||
@ -144,7 +161,7 @@ implementation
|
|||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uPreferences;
|
uPreferences, uCEFProcessMessage;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@ -166,6 +183,11 @@ begin
|
|||||||
Chromium1.Reload;
|
Chromium1.Reload;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMiniBrowserFrm.Resetzoom1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Chromium1.ResetZoomStep;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.Chromium1AddressChange(Sender: TObject;
|
procedure TMiniBrowserFrm.Chromium1AddressChange(Sender: TObject;
|
||||||
const browser: ICefBrowser; const frame: ICefFrame; const url: ustring);
|
const browser: ICefBrowser; const frame: ICefFrame; const url: ustring);
|
||||||
begin
|
begin
|
||||||
@ -186,6 +208,7 @@ begin
|
|||||||
model.AddItem(MINIBROWSER_CONTEXTMENU_SHOWJSALERT, 'Show JS Alert');
|
model.AddItem(MINIBROWSER_CONTEXTMENU_SHOWJSALERT, 'Show JS Alert');
|
||||||
model.AddItem(MINIBROWSER_CONTEXTMENU_SETJSEVENT, 'Set mouseover event');
|
model.AddItem(MINIBROWSER_CONTEXTMENU_SETJSEVENT, 'Set mouseover event');
|
||||||
model.AddItem(MINIBROWSER_CONTEXTMENU_COPYHTML, 'Copy HTML to clipboard');
|
model.AddItem(MINIBROWSER_CONTEXTMENU_COPYHTML, 'Copy HTML to clipboard');
|
||||||
|
model.AddItem(MINIBROWSER_CONTEXTMENU_VISITDOM, 'Visit DOM');
|
||||||
|
|
||||||
if DevTools.Visible then
|
if DevTools.Visible then
|
||||||
model.AddItem(MINIBROWSER_CONTEXTMENU_HIDEDEVTOOLS, 'Hide DevTools')
|
model.AddItem(MINIBROWSER_CONTEXTMENU_HIDEDEVTOOLS, 'Hide DevTools')
|
||||||
@ -230,6 +253,9 @@ begin
|
|||||||
|
|
||||||
MINIBROWSER_CONTEXTMENU_COPYHTML :
|
MINIBROWSER_CONTEXTMENU_COPYHTML :
|
||||||
PostMessage(Handle, MINIBROWSER_COPYHTML, 0, 0);
|
PostMessage(Handle, MINIBROWSER_COPYHTML, 0, 0);
|
||||||
|
|
||||||
|
MINIBROWSER_CONTEXTMENU_VISITDOM :
|
||||||
|
PostMessage(Handle, MINIBROWSER_VISITDOM, 0, 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -308,6 +334,11 @@ begin
|
|||||||
HideDevTools;
|
HideDevTools;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMiniBrowserFrm.Inczoom1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Chromium1.IncZoomStep;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.PopupMenu1Popup(Sender: TObject);
|
procedure TMiniBrowserFrm.PopupMenu1Popup(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if DevTools.Visible then
|
if DevTools.Visible then
|
||||||
@ -344,6 +375,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMiniBrowserFrm.Print1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Chromium1.Print;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMiniBrowserFrm.PrintinPDF1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SaveDialog1.DefaultExt := 'pdf';
|
||||||
|
SaveDialog1.Filter := 'PDF files (*.pdf)|*.PDF';
|
||||||
|
|
||||||
|
if SaveDialog1.Execute and (length(SaveDialog1.FileName) > 0) then
|
||||||
|
Chromium1.PrintToPDF(SaveDialog1.FileName, Chromium1.DocumentURL, Chromium1.DocumentURL);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.ConfigBtnClick(Sender: TObject);
|
procedure TMiniBrowserFrm.ConfigBtnClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
TempPoint : TPoint;
|
TempPoint : TPoint;
|
||||||
@ -360,6 +405,24 @@ begin
|
|||||||
Chromium1.RetrieveHTML;
|
Chromium1.RetrieveHTML;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMiniBrowserFrm.VisitDOMMsg(var aMessage : TMessage);
|
||||||
|
var
|
||||||
|
TempMsg : ICefProcessMessage;
|
||||||
|
begin
|
||||||
|
// Only works using a TCefCustomRenderProcessHandler. See MiniBrowser demo.
|
||||||
|
if Chromium1.Initialized then
|
||||||
|
begin
|
||||||
|
// Use the ArgumentList property if you need to pass some parameters.
|
||||||
|
TempMsg := TCefProcessMessageRef.New('retrievedom'); // Same name than TCefCustomRenderProcessHandler.MessageName
|
||||||
|
Chromium1.Browser.SendProcessMessage(PID_RENDERER, TempMsg);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMiniBrowserFrm.Deczoom1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Chromium1.DecZoomStep;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.DevTools1Click(Sender: TObject);
|
procedure TMiniBrowserFrm.DevTools1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if DevTools.Visible then
|
if DevTools.Visible then
|
||||||
|
@ -51,11 +51,6 @@ uses
|
|||||||
uCEFv8Context, uCEFTypes, uCEFv8Handler;
|
uCEFv8Context, uCEFTypes, uCEFv8Handler;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCustomRenderProcessHandler = class(TCefRenderProcessHandlerOwn)
|
|
||||||
protected
|
|
||||||
procedure OnWebKitInitialized; override;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TCustomBrowserProcessHandler = class(TCefBrowserProcessHandlerOwn)
|
TCustomBrowserProcessHandler = class(TCefBrowserProcessHandlerOwn)
|
||||||
protected
|
protected
|
||||||
procedure OnScheduleMessagePumpWork(delayMs: Int64); override;
|
procedure OnScheduleMessagePumpWork(delayMs: Int64); override;
|
||||||
@ -71,22 +66,6 @@ implementation
|
|||||||
var
|
var
|
||||||
pumpMessages: Integer = 0;
|
pumpMessages: Integer = 0;
|
||||||
|
|
||||||
{ TCustomRenderProcessHandler }
|
|
||||||
|
|
||||||
function getpath(const n: ICefDomNode): string;
|
|
||||||
begin
|
|
||||||
Result := '<' + n.Name + '>';
|
|
||||||
if (n.Parent <> nil) then
|
|
||||||
Result := getpath(n.Parent) + Result;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomRenderProcessHandler.OnWebKitInitialized;
|
|
||||||
begin
|
|
||||||
{$IFDEF DELPHI14_UP}
|
|
||||||
TCefRTTIExtension.Register('app', TTestExtension);
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TTestExtension }
|
{ TTestExtension }
|
||||||
|
|
||||||
class procedure TTestExtension.mouseover(const data: string);
|
class procedure TTestExtension.mouseover(const data: string);
|
||||||
|
@ -256,7 +256,16 @@
|
|||||||
<Overwrite>true</Overwrite>
|
<Overwrite>true</Overwrite>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployFile>
|
</DeployFile>
|
||||||
<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>
|
||||||
<DeployClass Name="ProjectOSXResource">
|
<DeployClass Name="ProjectOSXResource">
|
||||||
<Platform Name="OSX32">
|
<Platform Name="OSX32">
|
||||||
<RemoteDir>Contents\Resources</RemoteDir>
|
<RemoteDir>Contents\Resources</RemoteDir>
|
||||||
@ -570,16 +579,7 @@
|
|||||||
<Operation>1</Operation>
|
<Operation>1</Operation>
|
||||||
</Platform>
|
</Platform>
|
||||||
</DeployClass>
|
</DeployClass>
|
||||||
<DeployClass Name="DependencyModule">
|
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
|
||||||
<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="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||||
|
@ -1,27 +1,34 @@
|
|||||||
[Closed Files]
|
[Closed Files]
|
||||||
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,31,80,57,0,0,,
|
File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFResponseFilter.pas',0,1,33,1,56,0,0,,
|
||||||
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,1995,70,2009,0,0,,
|
File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas',0,1,1170,1,1202,0,0,,
|
||||||
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,53,30,76,0,0,,
|
File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas',0,1,1615,96,1640,0,0,,
|
||||||
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi_new\source\uCEFMiscFunctions.pas',0,1,1,1,1,0,0,,
|
File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRenderProcessHandler.pas',0,1,262,52,291,0,0,,
|
||||||
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFLibFunctions.pas',0,1,1,1,1,0,0,,
|
File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFDomVisitor.pas',0,1,37,1,108,0,0,,
|
||||||
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFResourceHandler.pas',0,1,1,1,1,0,0,,
|
File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,1,1,71,0,0,,
|
||||||
File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFSchemeRegistrar.pas',0,1,1,1,1,0,0,,
|
File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFProcessMessage.pas',0,1,22,66,53,0,0,,
|
||||||
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi_new\source\uCEFLibFunctions.pas',0,1,1,1,1,0,0,,
|
File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTask.pas',0,1,44,1,145,0,0,,
|
||||||
File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi_new\source\uCEFResourceHandler.pas',0,1,1,1,1,0,0,,
|
File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromiumEvents.pas',0,1,32,1,61,0,0,,
|
||||||
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi_new\source\uCEFSchemeRegistrar.pas',0,1,1,1,1,0,0,,
|
File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFPDFPrintOptions.pas',0,3,65,25,93,0,0,,
|
||||||
|
|
||||||
[Modules]
|
[Modules]
|
||||||
Module0=default.htm
|
Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas
|
||||||
Count=1
|
Module1=default.htm
|
||||||
|
Count=2
|
||||||
EditWindowCount=1
|
EditWindowCount=1
|
||||||
|
|
||||||
|
[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas]
|
||||||
|
ModuleType=TSourceModule
|
||||||
|
FormState=0
|
||||||
|
FormOnTop=0
|
||||||
|
|
||||||
[default.htm]
|
[default.htm]
|
||||||
ModuleType=TURLModule
|
ModuleType=TURLModule
|
||||||
|
|
||||||
[EditWindow0]
|
[EditWindow0]
|
||||||
ViewCount=1
|
ViewCount=2
|
||||||
CurrentView=0
|
CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas
|
||||||
View0=0
|
View0=0
|
||||||
|
View1=1
|
||||||
PercentageSizes=1
|
PercentageSizes=1
|
||||||
Create=1
|
Create=1
|
||||||
Visible=1
|
Visible=1
|
||||||
@ -41,10 +48,10 @@ TopPanelSize=0
|
|||||||
LeftPanelSize=0
|
LeftPanelSize=0
|
||||||
RightPanelSize=2000
|
RightPanelSize=2000
|
||||||
RightPanelClients=DockSite2,DockSite4
|
RightPanelClients=DockSite2,DockSite4
|
||||||
RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF
|
RightPanelData=000008000101000000001E1500000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000511D000009000000446F636B5369746534FFFFFFFF
|
||||||
BottomPanelSize=0
|
BottomPanelSize=1551
|
||||||
BottomPanelClients=DockSite1,MessageView
|
BottomPanelClients=DockSite1,MessageView
|
||||||
BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF
|
BottomPanelData=0000080001020100000009000000446F636B53697465313B36000000000000020F0600000000000001000000003B3600000F0000004D65737361676556696577466F726DFFFFFFFF
|
||||||
BottomMiddlePanelSize=0
|
BottomMiddlePanelSize=0
|
||||||
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
|
BottomMiddlePanelClients=DockSite0,GraphDrawingModel
|
||||||
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
|
BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF
|
||||||
@ -54,6 +61,17 @@ TabDockLeftClients=PropertyInspector=0,DockSite3=1
|
|||||||
CustomEditViewType=TWelcomePageView
|
CustomEditViewType=TWelcomePageView
|
||||||
WelcomePageURL=bds:/default.htm
|
WelcomePageURL=bds:/default.htm
|
||||||
|
|
||||||
|
[View1]
|
||||||
|
CustomEditViewType=TEditView
|
||||||
|
Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas
|
||||||
|
CursorX=19
|
||||||
|
CursorY=397
|
||||||
|
TopLine=385
|
||||||
|
LeftCol=1
|
||||||
|
Elisions=
|
||||||
|
Bookmarks=
|
||||||
|
EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas
|
||||||
|
|
||||||
[Watches]
|
[Watches]
|
||||||
Count=0
|
Count=0
|
||||||
|
|
||||||
@ -129,18 +147,18 @@ StayOnTop=0
|
|||||||
[MessageView]
|
[MessageView]
|
||||||
PercentageSizes=1
|
PercentageSizes=1
|
||||||
Create=1
|
Create=1
|
||||||
Visible=0
|
Visible=1
|
||||||
Docked=1
|
Docked=1
|
||||||
State=0
|
State=0
|
||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=23
|
||||||
Width=2773
|
Width=10000
|
||||||
Height=1424
|
Height=1345
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=2773
|
ClientWidth=10000
|
||||||
ClientHeight=1424
|
ClientHeight=1345
|
||||||
TBDockHeight=1424
|
TBDockHeight=1345
|
||||||
LRDockWidth=2773
|
LRDockWidth=2773
|
||||||
Dockable=1
|
Dockable=1
|
||||||
StayOnTop=0
|
StayOnTop=0
|
||||||
@ -154,11 +172,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=0
|
Top=0
|
||||||
Width=2000
|
Width=2000
|
||||||
Height=4339
|
Height=2668
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=2000
|
ClientWidth=2000
|
||||||
ClientHeight=4339
|
ClientHeight=2668
|
||||||
TBDockHeight=7152
|
TBDockHeight=7152
|
||||||
LRDockWidth=2000
|
LRDockWidth=2000
|
||||||
Dockable=1
|
Dockable=1
|
||||||
@ -715,11 +733,11 @@ State=0
|
|||||||
Left=0
|
Left=0
|
||||||
Top=454
|
Top=454
|
||||||
Width=2000
|
Width=2000
|
||||||
Height=4339
|
Height=2668
|
||||||
MaxLeft=-1
|
MaxLeft=-1
|
||||||
MaxTop=-1
|
MaxTop=-1
|
||||||
ClientWidth=2000
|
ClientWidth=2000
|
||||||
ClientHeight=4339
|
ClientHeight=2668
|
||||||
TBDockHeight=7164
|
TBDockHeight=7164
|
||||||
LRDockWidth=2000
|
LRDockWidth=2000
|
||||||
Dockable=1
|
Dockable=1
|
||||||
|
Binary file not shown.
@ -1,9 +1,9 @@
|
|||||||
[Stats]
|
[Stats]
|
||||||
EditorSecs=59984
|
EditorSecs=63819
|
||||||
DesignerSecs=14
|
DesignerSecs=14
|
||||||
InspectorSecs=11
|
InspectorSecs=11
|
||||||
CompileSecs=1099139
|
CompileSecs=1290419
|
||||||
OtherSecs=5315
|
OtherSecs=5794
|
||||||
StartTime=22/01/2017 10:49:52
|
StartTime=22/01/2017 10:49:52
|
||||||
RealKeys=0
|
RealKeys=0
|
||||||
EffectiveKeys=0
|
EffectiveKeys=0
|
||||||
|
@ -57,7 +57,7 @@ uses
|
|||||||
const
|
const
|
||||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||||
CEF_SUPPORTED_VERSION_MINOR = 2987;
|
CEF_SUPPORTED_VERSION_MINOR = 2987;
|
||||||
CEF_SUPPORTED_VERSION_RELEASE = 1594;
|
CEF_SUPPORTED_VERSION_RELEASE = 1596;
|
||||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||||
|
|
||||||
CEF_CHROMEELF_VERSION_MAJOR = 57;
|
CEF_CHROMEELF_VERSION_MAJOR = 57;
|
||||||
@ -68,13 +68,6 @@ const
|
|||||||
type
|
type
|
||||||
TInternalApp = class;
|
TInternalApp = class;
|
||||||
|
|
||||||
TFileVersionInfo = record
|
|
||||||
MajorVer : uint16;
|
|
||||||
MinorVer : uint16;
|
|
||||||
Release : uint16;
|
|
||||||
Build : uint16;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TCefApplication = class
|
TCefApplication = class
|
||||||
protected
|
protected
|
||||||
FMustShutDown : boolean;
|
FMustShutDown : boolean;
|
||||||
@ -120,6 +113,9 @@ type
|
|||||||
FEnableSpeechInput : boolean;
|
FEnableSpeechInput : boolean;
|
||||||
FCheckCEFFiles : boolean;
|
FCheckCEFFiles : boolean;
|
||||||
FLibLoaded : boolean;
|
FLibLoaded : boolean;
|
||||||
|
FSmoothScrolling : boolean;
|
||||||
|
FFastUnload : boolean;
|
||||||
|
FDisableSafeBrowsing : boolean;
|
||||||
FChromeVersionInfo : TFileVersionInfo;
|
FChromeVersionInfo : TFileVersionInfo;
|
||||||
FLibHandle : THandle;
|
FLibHandle : THandle;
|
||||||
FOnRegisterCustomSchemes : TOnRegisterCustomSchemes;
|
FOnRegisterCustomSchemes : TOnRegisterCustomSchemes;
|
||||||
@ -250,6 +246,9 @@ type
|
|||||||
property ResourceBundleHandler : ICefResourceBundleHandler read FResourceBundleHandler write FResourceBundleHandler;
|
property ResourceBundleHandler : ICefResourceBundleHandler read FResourceBundleHandler write FResourceBundleHandler;
|
||||||
property BrowserProcessHandler : ICefBrowserProcessHandler read FBrowserProcessHandler write FBrowserProcessHandler;
|
property BrowserProcessHandler : ICefBrowserProcessHandler read FBrowserProcessHandler write FBrowserProcessHandler;
|
||||||
property RenderProcessHandler : ICefRenderProcessHandler read FRenderProcessHandler write FRenderProcessHandler;
|
property RenderProcessHandler : ICefRenderProcessHandler read FRenderProcessHandler write FRenderProcessHandler;
|
||||||
|
property SmoothScrolling : boolean read FSmoothScrolling write FSmoothScrolling;
|
||||||
|
property FastUnload : boolean read FFastUnload write FFastUnload;
|
||||||
|
property DisableSafeBrowsing : boolean read FDisableSafeBrowsing write FDisableSafeBrowsing;
|
||||||
property LibLoaded : boolean read FLibLoaded;
|
property LibLoaded : boolean read FLibLoaded;
|
||||||
property LibCef : string read FLibCef write FLibCef;
|
property LibCef : string read FLibCef write FLibCef;
|
||||||
end;
|
end;
|
||||||
@ -350,6 +349,9 @@ begin
|
|||||||
FCustomCommandLines := nil;
|
FCustomCommandLines := nil;
|
||||||
FCustomCommandLineValues := nil;
|
FCustomCommandLineValues := nil;
|
||||||
FCheckCEFFiles := True;
|
FCheckCEFFiles := True;
|
||||||
|
FSmoothScrolling := False;
|
||||||
|
FFastUnload := False;
|
||||||
|
FDisableSafeBrowsing := False;
|
||||||
FOnRegisterCustomSchemes := nil;
|
FOnRegisterCustomSchemes := nil;
|
||||||
FResourceBundleHandler := nil;
|
FResourceBundleHandler := nil;
|
||||||
FBrowserProcessHandler := nil;
|
FBrowserProcessHandler := nil;
|
||||||
@ -854,6 +856,19 @@ begin
|
|||||||
commandLine.AppendSwitchWithValue('--enable-media-stream', IntToStr(Ord(FEnableMediaStream)));
|
commandLine.AppendSwitchWithValue('--enable-media-stream', IntToStr(Ord(FEnableMediaStream)));
|
||||||
commandLine.AppendSwitchWithValue('--enable-speech-input', IntToStr(Ord(FEnableSpeechInput)));
|
commandLine.AppendSwitchWithValue('--enable-speech-input', IntToStr(Ord(FEnableSpeechInput)));
|
||||||
|
|
||||||
|
if FSmoothScrolling then
|
||||||
|
commandLine.AppendSwitch('--enable-smooth-scrolling');
|
||||||
|
|
||||||
|
if FFastUnload then
|
||||||
|
commandLine.AppendSwitch('--enable-fast-unload');
|
||||||
|
|
||||||
|
if FDisableSafeBrowsing then
|
||||||
|
begin
|
||||||
|
commandLine.AppendSwitch('--disable-client-side-phishing-detection');
|
||||||
|
commandLine.AppendSwitch('--safebrowsing-disable-auto-update');
|
||||||
|
commandLine.AppendSwitch('--safebrowsing-disable-download-protection');
|
||||||
|
end;
|
||||||
|
|
||||||
if (FCustomCommandLines <> nil) and
|
if (FCustomCommandLines <> nil) and
|
||||||
(FCustomCommandLineValues <> nil) and
|
(FCustomCommandLineValues <> nil) and
|
||||||
(FCustomCommandLines.Count = FCustomCommandLineValues.Count) then
|
(FCustomCommandLines.Count = FCustomCommandLineValues.Count) then
|
||||||
|
@ -64,7 +64,6 @@ type
|
|||||||
FVisitor : ICefStringVisitor;
|
FVisitor : ICefStringVisitor;
|
||||||
FPDFPrintcb : ICefPdfPrintCallback;
|
FPDFPrintcb : ICefPdfPrintCallback;
|
||||||
FCookiDeletercb : ICefDeleteCookiesCallback;
|
FCookiDeletercb : ICefDeleteCookiesCallback;
|
||||||
FDOMVisitor : ICefDomVisitor;
|
|
||||||
FClientHandler : TVCLClientHandler;
|
FClientHandler : TVCLClientHandler;
|
||||||
FHandler : ICefClient;
|
FHandler : ICefClient;
|
||||||
FBrowser : ICefBrowser;
|
FBrowser : ICefBrowser;
|
||||||
@ -201,7 +200,6 @@ type
|
|||||||
FOnPdfPrintFinished : TOnPdfPrintFinishedEvent;
|
FOnPdfPrintFinished : TOnPdfPrintFinishedEvent;
|
||||||
FOnPrefsAvailable : TNotifyEvent;
|
FOnPrefsAvailable : TNotifyEvent;
|
||||||
FOnCookiesDeleted : TOnCookiesDeletedEvent;
|
FOnCookiesDeleted : TOnCookiesDeletedEvent;
|
||||||
FOnDocumentAvailable : TOnDocumentAvailableEvent;
|
|
||||||
|
|
||||||
function GetIsLoading : boolean;
|
function GetIsLoading : boolean;
|
||||||
function GetMultithreadApp : boolean;
|
function GetMultithreadApp : boolean;
|
||||||
@ -378,10 +376,8 @@ type
|
|||||||
|
|
||||||
// Internal procedures.
|
// Internal procedures.
|
||||||
// Only tasks, visitors or callbacks should use them in the right thread/process.
|
// Only tasks, visitors or callbacks should use them in the right thread/process.
|
||||||
procedure Internal_DOMVisit(const document: ICefDomDocument);
|
|
||||||
procedure Internal_CookiesDeleted(numDeleted : integer);
|
procedure Internal_CookiesDeleted(numDeleted : integer);
|
||||||
procedure Internal_GetHTML;
|
procedure Internal_GetHTML;
|
||||||
procedure Internal_VisitDOM;
|
|
||||||
procedure Internal_PdfPrintFinished(aResultOK : boolean);
|
procedure Internal_PdfPrintFinished(aResultOK : boolean);
|
||||||
procedure Internal_TextResultAvailable(const aText : string);
|
procedure Internal_TextResultAvailable(const aText : string);
|
||||||
procedure Internal_UpdatePreferences;
|
procedure Internal_UpdatePreferences;
|
||||||
@ -398,7 +394,6 @@ type
|
|||||||
|
|
||||||
procedure SimulateMouseWheel(aDeltaX, aDeltaY : integer);
|
procedure SimulateMouseWheel(aDeltaX, aDeltaY : integer);
|
||||||
procedure DeleteCookies;
|
procedure DeleteCookies;
|
||||||
procedure RetrieveDOMDocument;
|
|
||||||
procedure RetrieveHTML;
|
procedure RetrieveHTML;
|
||||||
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; aStartLine : integer = 0);
|
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; aStartLine : integer = 0);
|
||||||
procedure UpdatePreferences;
|
procedure UpdatePreferences;
|
||||||
@ -494,7 +489,6 @@ type
|
|||||||
property OnPdfPrintFinished : TOnPdfPrintFinishedEvent read FOnPdfPrintFinished write FOnPdfPrintFinished;
|
property OnPdfPrintFinished : TOnPdfPrintFinishedEvent read FOnPdfPrintFinished write FOnPdfPrintFinished;
|
||||||
property OnPrefsAvailable : TNotifyEvent read FOnPrefsAvailable write FOnPrefsAvailable;
|
property OnPrefsAvailable : TNotifyEvent read FOnPrefsAvailable write FOnPrefsAvailable;
|
||||||
property OnCookiesDeleted : TOnCookiesDeletedEvent read FOnCookiesDeleted write FOnCookiesDeleted;
|
property OnCookiesDeleted : TOnCookiesDeletedEvent read FOnCookiesDeleted write FOnCookiesDeleted;
|
||||||
property OnDocumentAvailable : TOnDocumentAvailableEvent read FOnDocumentAvailable write FOnDocumentAvailable;
|
|
||||||
|
|
||||||
// ICefClient
|
// ICefClient
|
||||||
property OnProcessMessageReceived : TOnProcessMessageReceived read FOnProcessMessageReceived write FOnProcessMessageReceived;
|
property OnProcessMessageReceived : TOnProcessMessageReceived read FOnProcessMessageReceived write FOnProcessMessageReceived;
|
||||||
@ -601,7 +595,7 @@ uses
|
|||||||
SysUtils, Math,
|
SysUtils, Math,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFCookieManager, uCEFFrame,
|
uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFCookieManager, uCEFFrame,
|
||||||
uCEFApplication;
|
uCEFApplication, uCEFProcessMessage;
|
||||||
|
|
||||||
constructor TChromium.Create(AOwner: TComponent);
|
constructor TChromium.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
@ -620,7 +614,6 @@ begin
|
|||||||
FVisitor := nil;
|
FVisitor := nil;
|
||||||
FPDFPrintcb := nil;
|
FPDFPrintcb := nil;
|
||||||
FCookiDeletercb := nil;
|
FCookiDeletercb := nil;
|
||||||
FDOMVisitor := nil;
|
|
||||||
FPDFPrintOptions := nil;
|
FPDFPrintOptions := nil;
|
||||||
FUpdatePreferences := False;
|
FUpdatePreferences := False;
|
||||||
FCustomHeaderName := '';
|
FCustomHeaderName := '';
|
||||||
@ -683,7 +676,6 @@ begin
|
|||||||
FVisitor := nil;
|
FVisitor := nil;
|
||||||
FPDFPrintcb := nil;
|
FPDFPrintcb := nil;
|
||||||
FCookiDeletercb := nil;
|
FCookiDeletercb := nil;
|
||||||
FDOMVisitor := nil;
|
|
||||||
|
|
||||||
if (FFontOptions <> nil) then FreeAndNil(FFontOptions);
|
if (FFontOptions <> nil) then FreeAndNil(FFontOptions);
|
||||||
if (FOptions <> nil) then FreeAndNil(FOptions);
|
if (FOptions <> nil) then FreeAndNil(FOptions);
|
||||||
@ -834,7 +826,6 @@ begin
|
|||||||
FOnPdfPrintFinished := nil;
|
FOnPdfPrintFinished := nil;
|
||||||
FOnPrefsAvailable := nil;
|
FOnPrefsAvailable := nil;
|
||||||
FOnCookiesDeleted := nil;
|
FOnCookiesDeleted := nil;
|
||||||
FOnDocumentAvailable := nil;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TChromium.CreateBrowser(const aBrowserParent : TWinControl; const aWindowName : string) : boolean;
|
function TChromium.CreateBrowser(const aBrowserParent : TWinControl; const aWindowName : string) : boolean;
|
||||||
@ -931,27 +922,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChromium.Internal_VisitDOM;
|
|
||||||
var
|
|
||||||
TempFrame : ICefFrame;
|
|
||||||
begin
|
|
||||||
try
|
|
||||||
if Initialized then
|
|
||||||
begin
|
|
||||||
TempFrame := FBrowser.MainFrame;
|
|
||||||
|
|
||||||
if (TempFrame <> nil) then
|
|
||||||
begin
|
|
||||||
if (FDOMVisitor = nil) then FDOMVisitor := TCustomDomVisitor.Create(self);
|
|
||||||
TempFrame.VisitDom(FDOMVisitor);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
except
|
|
||||||
on e : exception do
|
|
||||||
OutputDebugMessage('TChromium.Internal_VisitDOM error: ' + e.Message);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChromium.ClipboardCopy;
|
procedure TChromium.ClipboardCopy;
|
||||||
var
|
var
|
||||||
TempFrame : ICefFrame;
|
TempFrame : ICefFrame;
|
||||||
@ -1051,6 +1021,7 @@ begin
|
|||||||
aSettings.header_footer_url := CefString(aURL);
|
aSettings.header_footer_url := CefString(aURL);
|
||||||
aSettings.page_width := FPDFPrintOptions.page_width;
|
aSettings.page_width := FPDFPrintOptions.page_width;
|
||||||
aSettings.page_height := FPDFPrintOptions.page_height;
|
aSettings.page_height := FPDFPrintOptions.page_height;
|
||||||
|
aSettings.scale_factor := FPDFPrintOptions.scale_factor;
|
||||||
aSettings.margin_top := FPDFPrintOptions.margin_top;
|
aSettings.margin_top := FPDFPrintOptions.margin_top;
|
||||||
aSettings.margin_right := FPDFPrintOptions.margin_right;
|
aSettings.margin_right := FPDFPrintOptions.margin_right;
|
||||||
aSettings.margin_bottom := FPDFPrintOptions.margin_bottom;
|
aSettings.margin_bottom := FPDFPrintOptions.margin_bottom;
|
||||||
@ -1536,17 +1507,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChromium.RetrieveDOMDocument;
|
|
||||||
var
|
|
||||||
TempTask: ICefTask;
|
|
||||||
begin
|
|
||||||
if Initialized then
|
|
||||||
begin
|
|
||||||
TempTask := TCefGetDocumentTask.Create(self);
|
|
||||||
CefPostTask(TID_RENDERER, TempTask);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChromium.RetrieveHTML;
|
procedure TChromium.RetrieveHTML;
|
||||||
var
|
var
|
||||||
TempTask: ICefTask;
|
TempTask: ICefTask;
|
||||||
@ -2056,11 +2016,6 @@ begin
|
|||||||
if assigned(FOnCookiesDeleted) then FOnCookiesDeleted(self, numDeleted);
|
if assigned(FOnCookiesDeleted) then FOnCookiesDeleted(self, numDeleted);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChromium.Internal_DOMVisit(const document: ICefDomDocument);
|
|
||||||
begin
|
|
||||||
if assigned(FOnDocumentAvailable) then FOnDocumentAvailable(self, document);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChromium.Internal_PdfPrintFinished(aResultOK : boolean);
|
procedure TChromium.Internal_PdfPrintFinished(aResultOK : boolean);
|
||||||
begin
|
begin
|
||||||
if assigned(FOnPdfPrintFinished) then FOnPdfPrintFinished(self, aResultOK);
|
if assigned(FOnPdfPrintFinished) then FOnPdfPrintFinished(self, aResultOK);
|
||||||
|
@ -58,7 +58,6 @@ type
|
|||||||
TOnTextResultAvailableEvent = procedure(Sender: TObject; const aText : string) of object;
|
TOnTextResultAvailableEvent = procedure(Sender: TObject; const aText : string) of object;
|
||||||
TOnPdfPrintFinishedEvent = procedure(Sender: TObject; aResultOK : boolean) of object;
|
TOnPdfPrintFinishedEvent = procedure(Sender: TObject; aResultOK : boolean) of object;
|
||||||
TOnCookiesDeletedEvent = procedure(Sender: TObject; numDeleted : integer) of object;
|
TOnCookiesDeletedEvent = procedure(Sender: TObject; numDeleted : integer) of object;
|
||||||
TOnDocumentAvailableEvent = procedure(Sender: TObject; const aDocument : ICefDomDocument) of object;
|
|
||||||
TOnProcessMessageReceived = procedure(Sender: TObject; const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage; out Result: Boolean) of object;
|
TOnProcessMessageReceived = procedure(Sender: TObject; const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage; out Result: Boolean) of object;
|
||||||
TOnLoadingStateChange = procedure(Sender: TObject; const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean) of object;
|
TOnLoadingStateChange = procedure(Sender: TObject; const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean) of object;
|
||||||
TOnLoadStart = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType) of object;
|
TOnLoadStart = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType) of object;
|
||||||
|
@ -68,16 +68,6 @@ type
|
|||||||
constructor Create(const proc: TCefDomVisitorProc); reintroduce; virtual;
|
constructor Create(const proc: TCefDomVisitorProc); reintroduce; virtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TCustomDomVisitor = class(TCefDomVisitorOwn)
|
|
||||||
protected
|
|
||||||
FChromiumBrowser : TObject;
|
|
||||||
|
|
||||||
procedure visit(const document: ICefDomDocument); override;
|
|
||||||
|
|
||||||
public
|
|
||||||
constructor Create(const aChromiumBrowser : TObject); reintroduce;
|
|
||||||
end;
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -115,19 +105,4 @@ begin
|
|||||||
FProc(document);
|
FProc(document);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TCustomDomVisitor
|
|
||||||
|
|
||||||
constructor TCustomDomVisitor.Create(const aChromiumBrowser : TObject);
|
|
||||||
begin
|
|
||||||
inherited Create;
|
|
||||||
|
|
||||||
FChromiumBrowser := aChromiumBrowser;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomDomVisitor.visit(const document: ICefDomDocument);
|
|
||||||
begin
|
|
||||||
if (FChromiumBrowser <> nil) and (FChromiumBrowser is TChromium) then
|
|
||||||
TChromium(FChromiumBrowser).Internal_DOMVisit(document);
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -90,6 +90,7 @@ type
|
|||||||
ICefResourceBundleHandler = interface;
|
ICefResourceBundleHandler = interface;
|
||||||
ICefBrowserProcessHandler = interface;
|
ICefBrowserProcessHandler = interface;
|
||||||
ICefRenderProcessHandler = interface;
|
ICefRenderProcessHandler = interface;
|
||||||
|
ICefProcessMessage = interface;
|
||||||
|
|
||||||
TCefv8ValueArray = array of ICefv8Value;
|
TCefv8ValueArray = array of ICefv8Value;
|
||||||
TCefX509CertificateArray = array of ICefX509Certificate;
|
TCefX509CertificateArray = array of ICefX509Certificate;
|
||||||
@ -103,6 +104,8 @@ type
|
|||||||
TOnGetBrowserProcessHandler = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(var aCefBrowserProcessHandler : ICefBrowserProcessHandler) {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
TOnGetBrowserProcessHandler = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(var aCefBrowserProcessHandler : ICefBrowserProcessHandler) {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
||||||
TOnGetRenderProcessHandler = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(var aCefRenderProcessHandler : ICefRenderProcessHandler) {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
TOnGetRenderProcessHandler = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(var aCefRenderProcessHandler : ICefRenderProcessHandler) {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
||||||
TOnBeforeCommandLineProcessing = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const processType: ustring; const commandLine: ICefCommandLine) {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
TOnBeforeCommandLineProcessing = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const processType: ustring; const commandLine: ICefCommandLine) {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
||||||
|
TOnCustomMessage = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage) {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
||||||
|
TOnWebKitReady = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure() {$IFNDEF DELPHI12_UP}of object{$ENDIF};
|
||||||
|
|
||||||
TCefCompletionCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure;
|
TCefCompletionCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure;
|
||||||
TCefSetCookieCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(success: Boolean);
|
TCefSetCookieCallbackProc = {$IFDEF DELPHI12_UP}reference to{$ENDIF} procedure(success: Boolean);
|
||||||
@ -1196,8 +1199,7 @@ type
|
|||||||
ICefResponseFilter = interface(ICefBaseRefCounted)
|
ICefResponseFilter = interface(ICefBaseRefCounted)
|
||||||
['{5013BC3C-F1AE-407A-A571-A4C6B1D6831E}']
|
['{5013BC3C-F1AE-407A-A571-A4C6B1D6831E}']
|
||||||
function InitFilter: Boolean;
|
function InitFilter: Boolean;
|
||||||
function Filter(dataIn: Pointer; dataInSize, dataInRead: NativeUInt;
|
function Filter(dataIn: Pointer; dataInSize : NativeUInt; dataInRead: PNativeUInt; dataOut: Pointer; dataOutSize : NativeUInt; dataOutWritten: PNativeUInt): TCefResponseFilterStatus;
|
||||||
dataOut: Pointer; dataOutSize, dataOutWritten: NativeUInt): TCefResponseFilterStatus;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ICefRequestHandler = interface(ICefBaseRefCounted)
|
ICefRequestHandler = interface(ICefBaseRefCounted)
|
||||||
|
@ -59,6 +59,7 @@ type
|
|||||||
protected
|
protected
|
||||||
Fpage_width : integer;
|
Fpage_width : integer;
|
||||||
Fpage_height : Integer;
|
Fpage_height : Integer;
|
||||||
|
Fscale_factor : integer;
|
||||||
Fmargin_top : double;
|
Fmargin_top : double;
|
||||||
Fmargin_right : double;
|
Fmargin_right : double;
|
||||||
Fmargin_bottom : double;
|
Fmargin_bottom : double;
|
||||||
@ -74,7 +75,8 @@ type
|
|||||||
|
|
||||||
published
|
published
|
||||||
property page_width : integer read Fpage_width write Fpage_width default 0;
|
property page_width : integer read Fpage_width write Fpage_width default 0;
|
||||||
property page_height : Integer read Fpage_height write Fpage_height default 0;
|
property page_height : integer read Fpage_height write Fpage_height default 0;
|
||||||
|
property scale_factor : integer read Fscale_factor write Fscale_factor default 0;
|
||||||
property margin_top : double read Fmargin_top write Fmargin_top;
|
property margin_top : double read Fmargin_top write Fmargin_top;
|
||||||
property margin_right : double read Fmargin_right write Fmargin_right;
|
property margin_right : double read Fmargin_right write Fmargin_right;
|
||||||
property margin_bottom : double read Fmargin_bottom write Fmargin_bottom;
|
property margin_bottom : double read Fmargin_bottom write Fmargin_bottom;
|
||||||
@ -92,6 +94,7 @@ constructor TPDFPrintOptions.Create;
|
|||||||
begin
|
begin
|
||||||
Fpage_width := 0;
|
Fpage_width := 0;
|
||||||
Fpage_height := 0;
|
Fpage_height := 0;
|
||||||
|
Fscale_factor := 100;
|
||||||
Fmargin_top := 0;
|
Fmargin_top := 0;
|
||||||
Fmargin_right := 0;
|
Fmargin_right := 0;
|
||||||
Fmargin_bottom := 0;
|
Fmargin_bottom := 0;
|
||||||
|
@ -95,16 +95,17 @@ end;
|
|||||||
|
|
||||||
class function TCefProcessMessageRef.New(const name: ustring): ICefProcessMessage;
|
class function TCefProcessMessageRef.New(const name: ustring): ICefProcessMessage;
|
||||||
var
|
var
|
||||||
n: TCefString;
|
TempString : TCefString;
|
||||||
begin
|
begin
|
||||||
n := CefString(name);
|
TempString := CefString(name);
|
||||||
Result := UnWrap(cef_process_message_create(@n));
|
Result := UnWrap(cef_process_message_create(@TempString));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TCefProcessMessageRef.UnWrap(data: Pointer): ICefProcessMessage;
|
class function TCefProcessMessageRef.UnWrap(data: Pointer): ICefProcessMessage;
|
||||||
begin
|
begin
|
||||||
if data <> nil then
|
if (data <> nil) then
|
||||||
Result := Create(data) as ICefProcessMessage else
|
Result := Create(data) as ICefProcessMessage
|
||||||
|
else
|
||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -47,25 +47,47 @@ unit uCEFRenderProcessHandler;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
{$IFDEF DELPHI16_UP}
|
||||||
|
System.Classes,
|
||||||
|
{$ELSE}
|
||||||
|
Classes,
|
||||||
|
{$ENDIF}
|
||||||
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFListValue, uCEFBrowser, uCEFFrame, uCEFRequest,
|
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes, uCEFListValue, uCEFBrowser, uCEFFrame, uCEFRequest,
|
||||||
uCEFv8Context, uCEFv8Exception, uCEFv8StackTrace, uCEFDomNode, uCEFProcessMessage;
|
uCEFv8Context, uCEFv8Exception, uCEFv8StackTrace, uCEFDomNode, uCEFProcessMessage;
|
||||||
|
|
||||||
type
|
type
|
||||||
TCefRenderProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefRenderProcessHandler)
|
TCefRenderProcessHandlerOwn = class(TCefBaseRefCountedOwn, ICefRenderProcessHandler)
|
||||||
protected
|
protected
|
||||||
procedure OnRenderThreadCreated(const extraInfo: ICefListValue); virtual;
|
procedure OnRenderThreadCreated(const extraInfo: ICefListValue); virtual;
|
||||||
procedure OnWebKitInitialized; virtual;
|
procedure OnWebKitInitialized; virtual;
|
||||||
procedure OnBrowserCreated(const browser: ICefBrowser); virtual;
|
procedure OnBrowserCreated(const browser: ICefBrowser); virtual;
|
||||||
procedure OnBrowserDestroyed(const browser: ICefBrowser); virtual;
|
procedure OnBrowserDestroyed(const browser: ICefBrowser); virtual;
|
||||||
function GetLoadHandler: PCefLoadHandler; virtual;
|
function GetLoadHandler: PCefLoadHandler; virtual;
|
||||||
function OnBeforeNavigation(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; navigationType: TCefNavigationType; isRedirect: Boolean): Boolean; virtual;
|
function OnBeforeNavigation(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; navigationType: TCefNavigationType; isRedirect: Boolean): Boolean; virtual;
|
||||||
procedure OnContextCreated(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context); virtual;
|
procedure OnContextCreated(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context); virtual;
|
||||||
procedure OnContextReleased(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context); virtual;
|
procedure OnContextReleased(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context); virtual;
|
||||||
procedure OnUncaughtException(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context; const exception: ICefV8Exception; const stackTrace: ICefV8StackTrace); virtual;
|
procedure OnUncaughtException(const browser: ICefBrowser; const frame: ICefFrame; const context: ICefv8Context; const exception: ICefV8Exception; const stackTrace: ICefV8StackTrace); virtual;
|
||||||
procedure OnFocusedNodeChanged(const browser: ICefBrowser; const frame: ICefFrame; const node: ICefDomNode); virtual;
|
procedure OnFocusedNodeChanged(const browser: ICefBrowser; const frame: ICefFrame; const node: ICefDomNode); virtual;
|
||||||
function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; virtual;
|
function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; virtual;
|
||||||
public
|
public
|
||||||
constructor Create; virtual;
|
constructor Create; virtual;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TCefCustomRenderProcessHandler = class(TCefRenderProcessHandlerOwn)
|
||||||
|
protected
|
||||||
|
FMessageName : ustring;
|
||||||
|
FOnCustomMessage : TOnCustomMessage;
|
||||||
|
FOnWebKitReady : TOnWebKitReady;
|
||||||
|
|
||||||
|
procedure OnWebKitInitialized; override;
|
||||||
|
function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; override;
|
||||||
|
|
||||||
|
public
|
||||||
|
constructor Create; override;
|
||||||
|
|
||||||
|
property MessageName : ustring read FMessageName write FMessageName;
|
||||||
|
property OnCustomMessage : TOnCustomMessage read FOnCustomMessage write FOnCustomMessage;
|
||||||
|
property OnWebKitReady : TOnWebKitReady read FOnWebKitReady write FOnWebKitReady;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -159,23 +181,27 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// TCefRenderProcessHandlerOwn
|
||||||
|
|
||||||
|
|
||||||
constructor TCefRenderProcessHandlerOwn.Create;
|
constructor TCefRenderProcessHandlerOwn.Create;
|
||||||
begin
|
begin
|
||||||
inherited CreateData(SizeOf(TCefRenderProcessHandler));
|
inherited CreateData(SizeOf(TCefRenderProcessHandler));
|
||||||
|
|
||||||
with PCefRenderProcessHandler(FData)^ do
|
with PCefRenderProcessHandler(FData)^ do
|
||||||
begin
|
begin
|
||||||
on_render_thread_created := cef_render_process_handler_on_render_thread_created;
|
on_render_thread_created := cef_render_process_handler_on_render_thread_created;
|
||||||
on_web_kit_initialized := cef_render_process_handler_on_web_kit_initialized;
|
on_web_kit_initialized := cef_render_process_handler_on_web_kit_initialized;
|
||||||
on_browser_created := cef_render_process_handler_on_browser_created;
|
on_browser_created := cef_render_process_handler_on_browser_created;
|
||||||
on_browser_destroyed := cef_render_process_handler_on_browser_destroyed;
|
on_browser_destroyed := cef_render_process_handler_on_browser_destroyed;
|
||||||
get_load_handler := cef_render_process_handler_get_load_handler;
|
get_load_handler := cef_render_process_handler_get_load_handler;
|
||||||
on_before_navigation := cef_render_process_handler_on_before_navigation;
|
on_before_navigation := cef_render_process_handler_on_before_navigation;
|
||||||
on_context_created := cef_render_process_handler_on_context_created;
|
on_context_created := cef_render_process_handler_on_context_created;
|
||||||
on_context_released := cef_render_process_handler_on_context_released;
|
on_context_released := cef_render_process_handler_on_context_released;
|
||||||
on_uncaught_exception := cef_render_process_handler_on_uncaught_exception;
|
on_uncaught_exception := cef_render_process_handler_on_uncaught_exception;
|
||||||
on_focused_node_changed := cef_render_process_handler_on_focused_node_changed;
|
on_focused_node_changed := cef_render_process_handler_on_focused_node_changed;
|
||||||
on_process_message_received := cef_render_process_handler_on_process_message_received;
|
on_process_message_received := cef_render_process_handler_on_process_message_received;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCefRenderProcessHandlerOwn.GetLoadHandler: PCefLoadHandler;
|
function TCefRenderProcessHandlerOwn.GetLoadHandler: PCefLoadHandler;
|
||||||
@ -248,4 +274,34 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
// TCefCustomRenderProcessHandler
|
||||||
|
|
||||||
|
constructor TCefCustomRenderProcessHandler.Create;
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
|
||||||
|
FMessageName := '';
|
||||||
|
FOnCustomMessage := nil;
|
||||||
|
FOnWebKitReady := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCefCustomRenderProcessHandler.OnWebKitInitialized;
|
||||||
|
begin
|
||||||
|
if assigned(FOnWebKitReady) then FOnWebKitReady();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TCefCustomRenderProcessHandler.OnProcessMessageReceived(const browser : ICefBrowser;
|
||||||
|
sourceProcess : TCefProcessId;
|
||||||
|
const message : ICefProcessMessage): Boolean;
|
||||||
|
begin
|
||||||
|
if assigned(FOnCustomMessage) and (message.Name = FMessageName) then
|
||||||
|
begin
|
||||||
|
FOnCustomMessage(browser, sourceProcess, message);
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := inherited OnProcessMessageReceived(browser, sourceProcess, message);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -53,8 +53,7 @@ type
|
|||||||
TCefResponseFilterOwn = class(TCefBaseRefCountedOwn, ICefResponseFilter)
|
TCefResponseFilterOwn = class(TCefBaseRefCountedOwn, ICefResponseFilter)
|
||||||
protected
|
protected
|
||||||
function InitFilter: Boolean; virtual; abstract;
|
function InitFilter: Boolean; virtual; abstract;
|
||||||
function Filter(dataIn: Pointer; dataInSize, dataInRead: NativeUInt; dataOut: Pointer;
|
function Filter(dataIn: Pointer; dataInSize : NativeUInt; dataInRead: PNativeUInt; dataOut: Pointer; dataOutSize : NativeUInt; dataOutWritten: PNativeUInt): TCefResponseFilterStatus; virtual; abstract;
|
||||||
dataOutSize, dataOutWritten: NativeUInt): TCefResponseFilterStatus; virtual; abstract;
|
|
||||||
public
|
public
|
||||||
constructor Create; virtual;
|
constructor Create; virtual;
|
||||||
end;
|
end;
|
||||||
@ -70,11 +69,11 @@ begin
|
|||||||
Result := Ord(InitFilter());
|
Result := Ord(InitFilter());
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function cef_response_filter_filter(self: PCefResponseFilter; data_in: Pointer; data_in_size, data_in_read: NativeUInt;
|
function cef_response_filter_filter(self: PCefResponseFilter; data_in: Pointer; data_in_size : NativeUInt; var data_in_read: NativeUInt;
|
||||||
data_out: Pointer; data_out_size, data_out_written: NativeUInt): TCefResponseFilterStatus; stdcall;
|
data_out: Pointer; data_out_size: NativeUInt; var data_out_written: NativeUInt): TCefResponseFilterStatus; stdcall;
|
||||||
begin
|
begin
|
||||||
with TCefResponseFilterOwn(CefGetObject(self)) do
|
with TCefResponseFilterOwn(CefGetObject(self)) do
|
||||||
Result := Filter(data_in, data_in_size, data_in_read, data_out, data_out_size, data_out_written);
|
Result := Filter(data_in, data_in_size, @data_in_read, data_out, data_out_size, @data_out_written);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TCefResponseFilterOwn.Create;
|
constructor TCefResponseFilterOwn.Create;
|
||||||
|
@ -90,16 +90,6 @@ type
|
|||||||
constructor Create(const aChromiumBrowser : TObject); reintroduce;
|
constructor Create(const aChromiumBrowser : TObject); reintroduce;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TCefGetDocumentTask = class(TCefTaskOwn)
|
|
||||||
protected
|
|
||||||
FChromiumBrowser : TObject;
|
|
||||||
|
|
||||||
procedure Execute; override;
|
|
||||||
|
|
||||||
public
|
|
||||||
constructor Create(const aChromiumBrowser : TObject); reintroduce;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TCefDeleteCookiesTask = class(TCefTaskOwn)
|
TCefDeleteCookiesTask = class(TCefTaskOwn)
|
||||||
protected
|
protected
|
||||||
FCallBack : ICefDeleteCookiesCallback;
|
FCallBack : ICefDeleteCookiesCallback;
|
||||||
@ -152,8 +142,10 @@ begin
|
|||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// TCefTaskRef
|
// TCefTaskRef
|
||||||
|
|
||||||
|
|
||||||
procedure TCefTaskRef.Execute;
|
procedure TCefTaskRef.Execute;
|
||||||
begin
|
begin
|
||||||
PCefTask(FData).execute(FData);
|
PCefTask(FData).execute(FData);
|
||||||
@ -167,8 +159,10 @@ begin
|
|||||||
Result := nil;
|
Result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// TCefFastTask
|
// TCefFastTask
|
||||||
|
|
||||||
|
|
||||||
constructor TCefFastTask.Create(const method: TCefFastTaskProc);
|
constructor TCefFastTask.Create(const method: TCefFastTaskProc);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
@ -191,7 +185,10 @@ begin
|
|||||||
CefPostDelayedTask(threadId, Create(method), Delay);
|
CefPostDelayedTask(threadId, Create(method), Delay);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// TCefGetHTMLTask
|
// TCefGetHTMLTask
|
||||||
|
|
||||||
|
|
||||||
constructor TCefGetHTMLTask.Create(const aChromiumBrowser : TObject);
|
constructor TCefGetHTMLTask.Create(const aChromiumBrowser : TObject);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
@ -205,22 +202,10 @@ begin
|
|||||||
TChromium(FChromiumBrowser).Internal_GetHTML;
|
TChromium(FChromiumBrowser).Internal_GetHTML;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// TCefGetDocumentTask
|
|
||||||
constructor TCefGetDocumentTask.Create(const aChromiumBrowser : TObject);
|
|
||||||
begin
|
|
||||||
inherited Create;
|
|
||||||
|
|
||||||
FChromiumBrowser := aChromiumBrowser;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCefGetDocumentTask.Execute;
|
|
||||||
begin
|
|
||||||
if (FChromiumBrowser <> nil) and (FChromiumBrowser is TChromium) then
|
|
||||||
TChromium(FChromiumBrowser).Internal_VisitDOM;
|
|
||||||
end;
|
|
||||||
|
|
||||||
// TCefDeleteCookiesTask
|
// TCefDeleteCookiesTask
|
||||||
|
|
||||||
|
|
||||||
constructor TCefDeleteCookiesTask.Create(const aCallBack : ICefDeleteCookiesCallback);
|
constructor TCefDeleteCookiesTask.Create(const aCallBack : ICefDeleteCookiesCallback);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
@ -236,8 +221,10 @@ begin
|
|||||||
CookieManager.DeleteCookies('', '', FCallBack);
|
CookieManager.DeleteCookies('', '', FCallBack);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// TCefUpdatePrefsTask
|
// TCefUpdatePrefsTask
|
||||||
|
|
||||||
|
|
||||||
constructor TCefUpdatePrefsTask.Create(const aChromiumBrowser : TObject);
|
constructor TCefUpdatePrefsTask.Create(const aChromiumBrowser : TObject);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
@ -251,8 +238,10 @@ begin
|
|||||||
TChromium(FChromiumBrowser).Internal_UpdatePreferences;
|
TChromium(FChromiumBrowser).Internal_UpdatePreferences;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
// TCefSavePrefsTask
|
// TCefSavePrefsTask
|
||||||
|
|
||||||
|
|
||||||
constructor TCefSavePrefsTask.Create(const aChromiumBrowser : TObject);
|
constructor TCefSavePrefsTask.Create(const aChromiumBrowser : TObject);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
@ -265,6 +265,13 @@ type
|
|||||||
instance: HINST;
|
instance: HINST;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TFileVersionInfo = record
|
||||||
|
MajorVer : uint16;
|
||||||
|
MinorVer : uint16;
|
||||||
|
Release : uint16;
|
||||||
|
Build : uint16;
|
||||||
|
end;
|
||||||
|
|
||||||
// /include/internal/cef_types.h (cef_rect_t)
|
// /include/internal/cef_types.h (cef_rect_t)
|
||||||
TCefRect = record
|
TCefRect = record
|
||||||
x: Integer;
|
x: Integer;
|
||||||
@ -1636,7 +1643,7 @@ type
|
|||||||
TCefResponseFilter = record
|
TCefResponseFilter = record
|
||||||
base: TCefBaseRefCounted;
|
base: TCefBaseRefCounted;
|
||||||
init_filter: function(self: PCefResponseFilter): Integer; stdcall;
|
init_filter: function(self: PCefResponseFilter): Integer; stdcall;
|
||||||
filter: function(self: PCefResponseFilter; data_in: Pointer; data_in_size, data_in_read: NativeUInt; data_out: Pointer; data_out_size, data_out_written: NativeUInt): TCefResponseFilterStatus; stdcall;
|
filter: function(self: PCefResponseFilter; data_in: Pointer; data_in_size: NativeUInt; var data_in_read: NativeUInt; data_out: Pointer; data_out_size : NativeUInt; var data_out_written: NativeUInt): TCefResponseFilterStatus; stdcall;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// /include/capi/cef_auth_callback_capi.h (cef_auth_callback_t)
|
// /include/capi/cef_auth_callback_capi.h (cef_auth_callback_t)
|
||||||
@ -1790,6 +1797,7 @@ type
|
|||||||
header_footer_url: TCefString;
|
header_footer_url: TCefString;
|
||||||
page_width: Integer;
|
page_width: Integer;
|
||||||
page_height: Integer;
|
page_height: Integer;
|
||||||
|
scale_factor: Integer;
|
||||||
margin_top: double;
|
margin_top: double;
|
||||||
margin_right: double;
|
margin_right: double;
|
||||||
margin_bottom: double;
|
margin_bottom: double;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user