From f180972f22421f8c42e2d3352aef69f4174fa8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20D=C3=ADaz=20Fau?= Date: Wed, 6 Nov 2019 11:18:33 +0100 Subject: [PATCH] Update to CEF 78.2.14 --- README.md | 10 ++-- demos/Lazarus/MiniBrowser/MiniBrowser.lps | 10 +++- demos/Lazarus/PopupBrowser2/PopupBrowser2.lps | 49 ++----------------- packages/cef4delphi_lazarus.lpk | 2 +- source/uCEFApplication.pas | 4 +- source/uCEFChromium.pas | 14 ++++-- source/uCEFFMXChromium.pas | 14 ++++-- update_CEF4Delphi.json | 4 +- 8 files changed, 42 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 0021f7d2..549e8ab5 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ CEF4Delphi is an open source project created by Salvador D CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. -CEF4Delphi uses CEF 78.2.10 which includes Chromium 78.0.3904.70. +CEF4Delphi uses CEF 78.2.14 which includes Chromium 78.0.3904.87. The CEF binaries used by CEF4Delphi are available for download at spotify : -* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_78.2.10%2Bg942899d%2Bchromium-78.0.3904.70_windows32.tar.bz2) -* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_78.2.10%2Bg942899d%2Bchromium-78.0.3904.70_windows64.tar.bz2) +* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_78.2.14%2Bg9633d3e%2Bchromium-78.0.3904.87_windows32.tar.bz2) +* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_78.2.14%2Bg9633d3e%2Bchromium-78.0.3904.87_windows64.tar.bz2) -CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.4/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. +CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. ## Links * [Installation instructions and more information about CEF4Delphi](https://www.briskbard.com/index.php?lang=en&pageid=cef) @@ -17,7 +17,7 @@ CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in * These components need Windows 7, 8, 8.1, 10 or newer to run. If you need Windows XP and Vista support use [OldCEF4Delphi](https://github.com/salvadordf/OldCEF4Delphi) ## Stable releases -This is the development branch and it may have issues. Use the [latest release](https://github.com/salvadordf/CEF4Delphi/releases) if you need a stable component. +This is the development branch and it may have issues. Use the [latest release](https://github.com/salvadordf/CEF4Delphi/releases/latest) if you need a stable component. ## Suppport If you find this project useful, please consider making a donation. diff --git a/demos/Lazarus/MiniBrowser/MiniBrowser.lps b/demos/Lazarus/MiniBrowser/MiniBrowser.lps index cc56ea83..17f9280a 100644 --- a/demos/Lazarus/MiniBrowser/MiniBrowser.lps +++ b/demos/Lazarus/MiniBrowser/MiniBrowser.lps @@ -4,7 +4,7 @@ - + @@ -20,7 +20,6 @@ - @@ -40,6 +39,7 @@ + @@ -80,6 +80,12 @@ + + + + + + diff --git a/demos/Lazarus/PopupBrowser2/PopupBrowser2.lps b/demos/Lazarus/PopupBrowser2/PopupBrowser2.lps index d04b468d..be4cf9fa 100644 --- a/demos/Lazarus/PopupBrowser2/PopupBrowser2.lps +++ b/demos/Lazarus/PopupBrowser2/PopupBrowser2.lps @@ -37,7 +37,8 @@ - + + @@ -54,12 +55,10 @@ - - + - @@ -84,7 +83,7 @@ - + @@ -165,46 +164,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/cef4delphi_lazarus.lpk b/packages/cef4delphi_lazarus.lpk index 02189077..0f6e1a27 100644 --- a/packages/cef4delphi_lazarus.lpk +++ b/packages/cef4delphi_lazarus.lpk @@ -21,7 +21,7 @@ - + diff --git a/source/uCEFApplication.pas b/source/uCEFApplication.pas index ef210361..c60629a6 100644 --- a/source/uCEFApplication.pas +++ b/source/uCEFApplication.pas @@ -62,13 +62,13 @@ uses const CEF_SUPPORTED_VERSION_MAJOR = 78; CEF_SUPPORTED_VERSION_MINOR = 2; - CEF_SUPPORTED_VERSION_RELEASE = 10; + CEF_SUPPORTED_VERSION_RELEASE = 14; CEF_SUPPORTED_VERSION_BUILD = 0; CEF_CHROMEELF_VERSION_MAJOR = 78; CEF_CHROMEELF_VERSION_MINOR = 0; CEF_CHROMEELF_VERSION_RELEASE = 3904; - CEF_CHROMEELF_VERSION_BUILD = 70; + CEF_CHROMEELF_VERSION_BUILD = 87; {$IFDEF MSWINDOWS} LIBCEF_DLL = 'libcef.dll'; diff --git a/source/uCEFChromium.pas b/source/uCEFChromium.pas index 8d42a59c..e204ef30 100644 --- a/source/uCEFChromium.pas +++ b/source/uCEFChromium.pas @@ -575,7 +575,7 @@ type function IsSameBrowser(const aBrowser : ICefBrowser) : boolean; function ExecuteTaskOnCefThread(aCefThreadId : TCefThreadId; aTaskID : cardinal; aDelayMs : Int64 = 0) : boolean; - function DeleteCookies(const url : ustring = ''; const cookieName : ustring = '') : boolean; + function DeleteCookies(const url : ustring = ''; const cookieName : ustring = ''; aDeleteImmediately : boolean = False) : boolean; function VisitAllCookies(aID : integer = 0) : boolean; function VisitURLCookies(const url : ustring; includeHttpOnly : boolean = False; aID : integer = 0) : boolean; function SetCookie(const url, name_, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; aSetImmediately : boolean = True; aID : integer = 0): Boolean; @@ -2322,7 +2322,9 @@ begin end; end; -function TChromium.DeleteCookies(const url, cookieName: ustring) : boolean; +// If aDeleteImmediately is false TChromium.DeleteCookies triggers the TChromium.OnCookiesDeleted +// event when the cookies are deleted. +function TChromium.DeleteCookies(const url, cookieName: ustring; aDeleteImmediately : boolean) : boolean; var TempManager : ICefCookieManager; TempCallback : ICefDeleteCookiesCallback; @@ -2335,8 +2337,12 @@ begin if (TempManager <> nil) then try - TempCallback := TCefCustomDeleteCookiesCallback.Create(self); - Result := TempManager.DeleteCookies(url, cookieName, TempCallback); + if aDeleteImmediately then + TempCallBack := nil + else + TempCallback := TCefCustomDeleteCookiesCallback.Create(self); + + Result := TempManager.DeleteCookies(url, cookieName, TempCallback); finally TempCallback := nil; end; diff --git a/source/uCEFFMXChromium.pas b/source/uCEFFMXChromium.pas index 7bf32910..90b9e609 100644 --- a/source/uCEFFMXChromium.pas +++ b/source/uCEFFMXChromium.pas @@ -540,7 +540,7 @@ type function IsSameBrowser(const aBrowser : ICefBrowser) : boolean; function ExecuteTaskOnCefThread(aCefThreadId : TCefThreadId; aTaskID : cardinal; aDelayMs : Int64 = 0) : boolean; - function DeleteCookies(const url : ustring = ''; const cookieName : ustring = '') : boolean; + function DeleteCookies(const url : ustring = ''; const cookieName : ustring = ''; aDeleteImmediately : boolean = False) : boolean; function VisitAllCookies(aID : integer = 0) : boolean; function VisitURLCookies(const url : ustring; includeHttpOnly : boolean = False; aID : integer = 0) : boolean; function SetCookie(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; aSetImmediately : boolean = True; aID : integer = 0): Boolean; @@ -2121,7 +2121,9 @@ begin end; end; -function TFMXChromium.DeleteCookies(const url, cookieName: ustring) : boolean; +// If aDeleteImmediately is false TChromium.DeleteCookies triggers the TChromium.OnCookiesDeleted +// event when the cookies are deleted. +function TFMXChromium.DeleteCookies(const url, cookieName: ustring; aDeleteImmediately : boolean) : boolean; var TempManager : ICefCookieManager; TempCallback : ICefDeleteCookiesCallback; @@ -2134,8 +2136,12 @@ begin if (TempManager <> nil) then try - TempCallback := TCefCustomDeleteCookiesCallback.Create(self); - Result := TempManager.DeleteCookies(url, cookieName, TempCallback); + if aDeleteImmediately then + TempCallBack := nil + else + TempCallback := TCefCustomDeleteCookiesCallback.Create(self); + + Result := TempManager.DeleteCookies(url, cookieName, TempCallback); finally TempCallback := nil; end; diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 8534a002..e7334fe3 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,9 +2,9 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 53, + "InternalVersion" : 54, "Name" : "cef4delphi_lazarus.lpk", - "Version" : "78.2.10.0" + "Version" : "78.2.14.0" } ], "UpdatePackageData" : {