Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Change GlobalCEFApp.cache folder at runtime after GlobalCEFApp.StartMainProcess

Post Reply
EdsonAlves
Posts: 7
Joined: Sun Jan 28, 2018 12:38 pm

Change GlobalCEFApp.cache folder at runtime after GlobalCEFApp.StartMainProcess

Post by EdsonAlves »

There is the possibility of setting in rumtime after the GlobalCEFApp.StartMainProcess the GlobalCEFApp.cache folder, is that I need to access a page twice in separate tabs, but it identifies that I am already connected, the only way I see would be to set the GlobalCEFApp.cache folder in runtime.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Change GlobalCEFApp.cache folder at runtime after GlobalCEFApp.StartMainProcess

Post by salvadordf »

Hi,

You need to use a different request context for each browser before you call TChromium.CreateBrowser.

The MDIBrowser demo allows to do this if you set the "Create a new request context for new browsers" checkbox in the upper panel.

The request context is created in the TChildForm.FormShow procedure in uChildForm.pas. The first parameter in TCefRequestContextRef.New is the cache directory used for that browser.
Post Reply