Page 1 of 1

More GlobalCEFApp initialization changes

Posted: Sat Oct 28, 2017 9:18 am
by salvadordf
Hi,

I've modified the GlobalCEFApp initialization and now GlobalCEFApp includes a custom BrowserProcessHandler to know when the global context is initialized.

According to the General Usage tutorial in the CEF3 web page, we should call TChromium.CreateBrowser after the global context is initialized or in the TForm.OnCreate event.

All demos use the TForm.OnShow to call CreateBrowser which is triggered after TForm.OnCreate, but in some occasions this is not enough and you may get a white screen with a crAppStart cursor (Hour glass and standard pointer combination).

Now GlobalCEFApp has all BrowserProcessHandler's events, including OnContextInitialized. If you have detected this problem in your app I suggest you use this event to know when you can start creating browsers.

Remember that the GlobalCEFApp.OnContextInitialized is called in a different thread and it should NOT be used to create components, only to signal your app that you can start creating browsers.

Re: More GlobalCEFApp initialization changes

Posted: Sat Oct 28, 2017 9:26 am
by salvadordf
I forgot to tell that GlobalCEFApp has a new boolean property called GlobalContextInitialized that is set to True when the global context is initialized.