1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Added/modified TChromium frame properties and functions

- Modified TChromium.RetreiveHTML to get the frame HTML source
- Added TChromium.FrameCount property
- Added TChromium.GetFrameNames funcion
This commit is contained in:
Salvador Díaz Fau
2017-09-22 10:04:50 +02:00
parent f0ebfb7f6c
commit 11e8a588e9
7 changed files with 295 additions and 268 deletions

View File

@@ -83,11 +83,12 @@ type
TCefGetHTMLTask = class(TCefTaskOwn)
protected
FChromiumBrowser : TObject;
FFrameName : ustring;
procedure Execute; override;
public
constructor Create(const aChromiumBrowser : TObject); reintroduce;
constructor Create(const aChromiumBrowser : TObject; const aFrameName : ustring); reintroduce;
end;
TCefDeleteCookiesTask = class(TCefTaskOwn)
@@ -189,17 +190,18 @@ end;
// TCefGetHTMLTask
constructor TCefGetHTMLTask.Create(const aChromiumBrowser : TObject);
constructor TCefGetHTMLTask.Create(const aChromiumBrowser : TObject; const aFrameName : ustring);
begin
inherited Create;
FChromiumBrowser := aChromiumBrowser;
FFrameName := aFrameName;
end;
procedure TCefGetHTMLTask.Execute;
begin
if (FChromiumBrowser <> nil) and (FChromiumBrowser is TChromium) then
TChromium(FChromiumBrowser).Internal_GetHTML;
TChromium(FChromiumBrowser).Internal_GetHTML(FFrameName);
end;