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

Update to CEF 3.3202.1683.gb095524

This commit is contained in:
Salvador Díaz Fau
2017-11-09 10:33:20 +01:00
parent b64cc746ab
commit 45d585970d
26 changed files with 230 additions and 49 deletions

View File

@@ -80,7 +80,7 @@ type
constructor Create(const method: TCefFastTaskProc); reintroduce;
end;
TCefGetHTMLTask = class(TCefTaskOwn)
TCefGetTextTask = class(TCefTaskOwn)
protected
FChromiumBrowser : TObject;
FFrameName : ustring;
@@ -96,6 +96,11 @@ type
destructor Destroy; override;
end;
TCefGetHTMLTask = class(TCefGetTextTask)
protected
procedure Execute; override;
end;
TCefDeleteCookiesTask = class(TCefTaskOwn)
protected
FCallBack : ICefDeleteCookiesCallback;
@@ -191,11 +196,10 @@ begin
CefPostDelayedTask(threadId, Create(method), Delay);
end;
// TCefGetHTMLTask
// TCefGetTextTask
constructor TCefGetHTMLTask.Create(const aChromiumBrowser : TObject; const aFrameName : ustring);
constructor TCefGetTextTask.Create(const aChromiumBrowser : TObject; const aFrameName : ustring);
begin
inherited Create;
@@ -205,7 +209,7 @@ begin
FFrameIdentifier := 0;
end;
constructor TCefGetHTMLTask.Create(const aChromiumBrowser : TObject; const aFrame : ICefFrame);
constructor TCefGetTextTask.Create(const aChromiumBrowser : TObject; const aFrame : ICefFrame);
begin
inherited Create;
@@ -215,7 +219,7 @@ begin
FFrameIdentifier := 0;
end;
constructor TCefGetHTMLTask.Create(const aChromiumBrowser : TObject; const aFrameIdentifier : int64);
constructor TCefGetTextTask.Create(const aChromiumBrowser : TObject; const aFrameIdentifier : int64);
begin
inherited Create;
@@ -225,13 +229,30 @@ begin
FFrameIdentifier := aFrameIdentifier;
end;
destructor TCefGetHTMLTask.Destroy;
destructor TCefGetTextTask.Destroy;
begin
FFrame := nil;
inherited Destroy;
end;
procedure TCefGetTextTask.Execute;
begin
if (FChromiumBrowser <> nil) and (FChromiumBrowser is TChromium) then
begin
if (FFrame <> nil) then
TChromium(FChromiumBrowser).Internal_GetText(FFrame)
else
if (FFrameIdentifier <> 0) then
TChromium(FChromiumBrowser).Internal_GetText(FFrameIdentifier)
else
TChromium(FChromiumBrowser).Internal_GetText(FFrameName);
end;
end;
// TCefGetHTMLTask
procedure TCefGetHTMLTask.Execute;
begin
if (FChromiumBrowser <> nil) and (FChromiumBrowser is TChromium) then