1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-04-17 06:57:13 +02:00

Update uCEFDownloadImageCallBack.pas

make it work
This commit is contained in:
Dmitrij 2017-08-21 21:05:08 +03:00 committed by GitHub
parent a88659617f
commit 1545e387e7

View File

@ -10,7 +10,7 @@
// For more information about CEF4Delphi visit : // For more information about CEF4Delphi visit :
// https://www.briskbard.com/index.php?lang=en&pageid=cef // https://www.briskbard.com/index.php?lang=en&pageid=cef
// //
// Copyright © 2017 Salvador Díaz Fau. All rights reserved. // Copyright © 2017 Salvador Díaz Fau. All rights reserved.
// //
// ************************************************************************ // ************************************************************************
// ************ vvvv Original license and comments below vvvv ************* // ************ vvvv Original license and comments below vvvv *************
@ -81,13 +81,15 @@ end;
constructor TCefDownloadImageCallbackOwn.Create; constructor TCefDownloadImageCallbackOwn.Create;
begin begin
CreateData(SizeOf(TCefDownloadImageCallback), False); inherited CreateData(SizeOf(TCefDownloadImageCallback));
with PCefDownloadImageCallback(FData)^ do on_download_image_finished := nil; with PCefDownloadImageCallback(FData)^ do
on_download_image_finished := cef_download_image_callback_on_download_image_finished;
end; end;
constructor TCefFastDownloadImageCallback.Create(const proc: TOnDownloadImageFinishedProc); constructor TCefFastDownloadImageCallback.Create(const proc: TOnDownloadImageFinishedProc);
begin begin
inherited Create;
FProc := proc; FProc := proc;
end; end;
@ -96,4 +98,6 @@ begin
FProc(imageUrl, httpStatusCode, image); FProc(imageUrl, httpStatusCode, image);
end; end;
end. end.