Original issue 1088 created by Daniel.Shaulov on 2013-09-25T20:29:16.000Z:
We will need to add an extra_info parameter to BrowserCreate[Sync] and OnBeforePopup (Those should cover all browser creations). People will set the info in those functions and get it in OnBrowserCreated on the renderer side.
This was discussed here:
I have seen somewhere in the forums/issues that OnBrowserCreated may be called multiple times for the same browser (In cross-origin navigations?).
I am thinking of perhaps just saving the info in the renderer side representation of the browser and having a "GetExtraInfo" call added to CefBrowser.
This aproach will be a bit better since otherwise users will need to keep a map from the browser ID to that extra_info, so they can acess it later. With this aproach, in each callback we imidiatly have acess to that extra_info object.
This has the immidiate oportunity to attach any other info the users have that is specific to a browser to that object. On the Browser process we have the GetClient for that (Users can have one to one relation between CefClient and CefBrowser objects, and keep all needed info in there).
What do you think, go for first aproach (extra_info in OnBrowserCreated) or the second one (GetExtraInfo added to CefBrowser)?