Page 1 of 5

BREAKING CHANGES

Posted: Thu Mar 28, 2019 10:04 am
by salvadordf
Hi,

This will be a fixed thread with all the breaking changes in case you are upgrading from a very old CEF4Delphi version.


TChromium.OnClose parameters changed!!!
Date : Mar 28, 2019



The latest CEF4Delphi update fixes an issue cancelling the browser destruction sequence and I had to modify the parameters in the TChromium.OnClose and TFMXChromium.OnClose events.

Before the change, TOnClose was declared like this :

Code: Select all

TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; out Result: Boolean) of object;
After this update, TOnClose is declared like this :

Code: Select all

TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction) of object;
Notice that the "out Result : boolean" parameter has been replaced by the new "var aAction : TCefCloseBrowserAction" parameter.

TCefCloseBrowserAction is defined in uCEFTypes.pas like this :

Code: Select all

TCefCloseBrowserAction = (cbaClose, cbaDelay, cbaCancel);
Each TCefCloseBrowserAction value has this meaning :
  • cbaCancel : stop closing the browser.
  • cbaClose : continue closing the browser (THIS IS THE DEFAULT VALUE IN THE ONCLOSE EVENT). This is equivalent to setting "Result" to false with the previous event parameters.
  • cbaDelay : stop closing the browser momentarily. Used when the application needs to execute some custom processes before closing the browser. This is usually needed to destroy a TCEFWindowParent in the main thread before closing the browser. This is equivalent to setting "Result" to true with the previous event parameters.
All the demos have been modified with the new OnClose code. In the case of some OSR demos the default value (cbaClose) is all they needed so the event was removed.

I'm sorry for the inconvenience. :oops:

Re: BREAKING CHANGES

Posted: Thu Apr 04, 2019 8:39 am
by salvadordf
Renamed units

The latest CEF4Delphi update has renamed a few units to fix the issue #119.
  • uBufferPanel.pas is now called uCEFBufferPanel.pas
  • uFMXBufferPanel.pas is now called uCEFFMXBufferPanel.pas
  • uFMXChromium.pas is now called uCEFFMXChromium.pas
  • uFMXWindowParent.pas is now called uCEFFMXWindowParent.pas
  • uFMXWorkScheduler.pas is now called uCEFFMXWorkScheduler.pas
  • uOLEDragAndDrop.pas is now called uCEFOLEDragAndDrop.pas
If you have any problems please uninstall CEF4Delphi from Delphi or Lazarus, delete all BPL and DCU files related to CEF4Delphi and install it again.

Re: BREAKING CHANGES

Posted: Sun Jun 16, 2019 9:20 am
by salvadordf
The update to CEF 75.0.7 introduced many API changes and that means many procedures, functions and events may have different parameters that can break your application.

Please, read this message for all the details details :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=807

Re: BREAKING CHANGES

Posted: Wed Jul 10, 2019 1:24 pm
by salvadordf
I just fixed an issue with the TChromiumWindow.OnBeforeClose event in this commit :
https://github.com/salvadordf/CEF4Delph ... ab743b0416

TChromiumWindow.OnBeforeClose is now executed in a different thread and the demos send a WM_CLOSE message to close the form.
If you use that event, please don't create or destroy any VCL control inside it.

Re: BREAKING CHANGES

Posted: Thu Jul 18, 2019 10:22 am
by salvadordf
The update to CEF 75.1.4 changed the parameters in the TChromium.OnGetAuthCredentials event.

Re: BREAKING CHANGES

Posted: Wed Sep 25, 2019 3:49 pm
by salvadordf
The update made on September 25th had these breaking changes :
  • The ICEFPostData.GetCount has been renamed to ICEFPostData.GetElementCount
  • ICEFPostData.GetElements has changed. See the PostInspectorBrowser demo to know how to get all the POST elements.
  • ICefPostDataRef.AddElement and ICefPostDataRef.RemoveElement return a boolean.
Read this post for more information :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=959

Re: BREAKING CHANGES

Posted: Wed Oct 30, 2019 10:38 am
by salvadordf
The update to CEF 78.2.9 removed several properties, parameters and functions :
  • Removed GlobalCEFApp.EnableNetSecurityExpiration
  • Removed TChromium.LoadString
  • Removed TFMXChromium.LoadString
  • The "EnableNetSecurityExpiration" parameter was removed from TCefRequestContextRef.New
  • ICefResponse.GetHeader was renamed to ICefResponse.GetHeaderByName
  • Removed CefIsCertStatusMinorError
Read this for more information :
https://www.briskbard.com/forum/viewtop ... 4454#p4454

Re: BREAKING CHANGES

Posted: Fri Nov 08, 2019 1:58 pm
by salvadordf
The update made on November 8th removed the TChromium.OnGetResourceRequestHandler event and replaced it with TChromium.OnGetResourceRequestHandler_ReqHdlr and TChromium.OnGetResourceRequestHandler_ReqCtxHdlr.

Read this for more info :
https://www.briskbard.com/forum/viewtop ... f=8&t=1025

Re: BREAKING CHANGES

Posted: Sun Nov 24, 2019 5:33 pm
by salvadordf
The update made on November 24th, 2019 included some changes in parameter and method names.

Read this for more information :
https://www.briskbard.com/forum/viewtop ... f=8&t=1042

Re: BREAKING CHANGES

Posted: Wed Mar 04, 2020 8:57 am
by salvadordf
The commit made on March 4th, 2020 had a different way to handle usernames and password for proxies :
https://github.com/salvadordf/CEF4Delph ... c99659e51a

CEF4Delphi will use the TChromium.ProxyUsername and TChromium.ProxyPassword properties only when TChromium.ProxyType has a CEF_PROXYTYPE_FIXED_SERVERS value.

All other TChromium.ProxyType values will trigger the TChromium.OnGetAuthCredentials event. The application should ask the user for the credentials, make a copy and use it again in later requests with this code :

Code: Select all

callback.cont(username, password);