Confusion about "browser-instance-specific"

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Confusion about "browser-instance-specific"

Postby ckr » Tue Nov 21, 2023 4:49 am

Hello
I am reading the document of GeneralUsage. In the chapter "Application Structure",
Every CEF3 application has the same general structure.
Provide an entry-point function that initializes CEF and runs either sub-process executable logic or the CEF message loop.
Provide an implementation of CefApp to handle process-specific callbacks.
Provide an implementation of CefClient to handle browser-instance-specific callbacks.
Call CefBrowserHost::CreateBrowser() to create a browser instance and manage the browser life span using CefLifeSpanHandler.


I have some confusion about "browser-instance-specific"
Taking Google Chrome browser as an example:
When I open the Chrome application on the desktop, there is currently one browser process and one renderer process. (let's just ignore processes other than the browser process and renderer processe)
And when I open a new website in a new tab, it triggers the creation of an additional renderer process.
So for now , i have one browser process and two renderer processes.
In this scenario, what does 'browser-instance' represent?
ckr
Newbie
 
Posts: 5
Joined: Tue Nov 21, 2023 3:20 am

Re: Confusion about "browser-instance-specific"

Postby magreenblatt » Tue Nov 21, 2023 8:47 am

“browser-instance-specific” means callbacks for a specific CefBrowser instance.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Confusion about "browser-instance-specific"

Postby ckr » Tue Nov 21, 2023 9:09 am

magreenblatt wrote:“browser-instance-specific” means callbacks for a specific CefBrowser instance.

1. In the scenario above, how many CefBrowser instance exist?
2. When accessing different sites, is there a one-to-one relationship between CefBrowser instances and tabs
ckr
Newbie
 
Posts: 5
Joined: Tue Nov 21, 2023 3:20 am

Re: Confusion about "browser-instance-specific"

Postby magreenblatt » Tue Nov 21, 2023 9:38 am

There would be one CefBrowser instance per tab. Any navigation in a tab stays in the same CefBrowser instance.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 193 guests