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.

Main and sub-process settings

Post Reply
petko
Posts: 52
Joined: Sun Jul 02, 2017 9:58 am

Main and sub-process settings

Post by petko »

I use CEF with sub-process in my application. Recently I've read in some posts in the forum that the main and sub-process should have the same settings. I am not sure what that means. Some of the settings are only applicable to the main process (BrowserSubprocessPath for example).

So, which settings exactly should be shared? Only the path settings (cache, locale, etc) or also anything else?

P.S.: The demo says

Code: Select all

// The main process and the subprocess *MUST* have the same FrameworkDirPath, ResourcesDirPath,
// LocalesDirPath, cache, cookies and UserDataPath paths
P.P.S.: I use CEF4Delphi for a long time without specifying anything in the sub-process exe and everything works properly as far as I can tell..
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Main and sub-process settings

Post by salvadordf »

GlobalCEFAp.BrowserSubprocessPath is only applicable to the main process and some events will only be executed in some processes.

If you were using the same EXE for all processes then all of them would be initialized with the same GlobalCEFApp properties and events. Some of them would be ignored by CEF in some processes.

In case of different EXEs, use the same properties and events for all processes, except BrowserSubprocessPath.

I'll update those code comments the next time I upload a new CEF4Delphi version.
petko
Posts: 52
Joined: Sun Jul 02, 2017 9:58 am

Re: Main and sub-process settings

Post by petko »

salvadordf wrote: Fri Mar 22, 2019 2:46 pmIn case of different EXEs, use the same properties and events for all processes, except BrowserSubprocessPath.
That's my case.
Post Reply