Page 1 of 1

Main and sub-process settings

Posted: Fri Mar 22, 2019 2:20 pm
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..

Re: Main and sub-process settings

Posted: Fri Mar 22, 2019 2:46 pm
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.

Re: Main and sub-process settings

Posted: Fri Mar 22, 2019 3:04 pm
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.