Page 1 of 2
Update to CEF 83.4.2
Posted: Thu Jul 02, 2020 9:04 am
by salvadordf
Hi,
CEF4Delphi is now updated to CEF 83.4.2.
This is what's new in the CEF binaries :
CEF4Delphi had these changes recently :
- Added the TChromium.DefaultWindowInfoExStyle property.
- Added a context menu option to delete the cache at runtime to the CookieVisitor demo.
- Fixed issue #248 : SimpleOSRBrowser shows a black screen in Windows 10 with Lazarus. Thanks pmccarenko!

- Added FPC 3.2.0 support thanks to paweld!

- Added a context menu option to set an input value and to visit the DOM using JavaScript in the DOMVisitor demo.
These are the CEF binaries :
Re: Update to CEF 83.4.2
Posted: Thu Jul 02, 2020 10:51 am
by salvadordf
I just added a few more features :
- Added TChromium.ClearCache procedure.
- Added TChromium.Offline property.
- Added a menu option to the MiniBrowser demo to clear the cache with the DevTools methods.
- Added a menu option to the MiniBrowser demo to take a screenshot with the DevTools methods.
The new screenshot feature works even when the hardware acceleration is enabled.

Re: Update to CEF 83.4.2
Posted: Thu Jul 02, 2020 12:18 pm
by dilfich
I may be asking a lot, but it wouldn't hurt to return the browser's "ReCreate" function for re-creation without restarting the app. Or is it no longer possible?
Re: Update to CEF 83.4.2
Posted: Fri Jul 03, 2020 8:08 am
by salvadordf
It's not possible to bring back the old TChromium.ReCreateBrowser procedure because it's necessary to follow the browser destruction steps to avoid crashes.
However, you can use the code in the demos that use frames to create and destroy browsers easily.
Re: Update to CEF 83.4.2
Posted: Sun Jul 05, 2020 9:14 am
by dilfich
Code: Select all
var
VL: ICefDictionaryValue;
begin
VL := TCefDictionaryValueRef.New;
VL.SetString(value, string);
Chromium1.ExecuteDevToolsMethod(0, 'Network.param', VL);
Changing the UserAgent, everything works fine. But how do I return the default value?
Re: Update to CEF 83.4.2
Posted: Sun Jul 05, 2020 9:52 am
by salvadordf
You can try "
Browser.getVersion"
https://chromedevtools.github.io/devtoo ... getVersion
It should return the user agent string among other things.
Re: Update to CEF 83.4.2
Posted: Sun Jul 05, 2020 10:08 am
by salvadordf
I just uploaded a small update to CEF4Delphi which includes a new procedure : TChromium.SetUserAgentOverride
The MiniBrowser demo uses that new procedure to change the user agent string at runtime using the new DevTools protocol methods.
Re: Update to CEF 83.4.2
Posted: Sun Jul 05, 2020 10:23 am
by dilfich
It is not difficult to change it as it turned out but how to return it to the default? I will certainly update and look, but it is interesting now)
I haven't figured out how to use get and get the result yet(
Re: Update to CEF 83.4.2
Posted: Sun Jul 05, 2020 10:31 am
by dilfich
{
https://en.wikipedia.org/wiki/List_of_t ... time_zones }
It also works, you can make an option. It is also interesting how to change the system time.
Re: Update to CEF 83.4.2
Posted: Sun Jul 05, 2020 11:17 am
by salvadordf
I updated CEF4Delphi again with a new procedure : TChromium.ClearDataForOrigin
It can be used to delete the storage data from a URL. The "aStorageTypes" parameters can have these values :
- cdstAppCache
- cdstCookies
- cdstFileSystems
- cdstIndexeddb
- cdstLocalStorage
- cdstShaderCache
- cdstWebsql
- cdstServiceWorkers
- cdstCacheStorage
- cdstAll : This is the default value and it deletes all storage data for that URL.
There are many new methods in the DevTools protocol that we can use now. It's tempting to add as many as possible but many of them are marked as "experimental" or "deprecated" which means that maintaining all DevTool methods in CEF4Delphi could be a little nightmare.
I'll try to add some of the most requested methods or at least give code examples showing how to use them.
https://chromedevtools.github.io/devtoo ... t/Browser/