I've got this working in a basic sense, but without this feature being implemented it's of limited use because the size, position and title of the popup cannot be set by the javascript:
browser_host_impl.cc- Code: Select all
// TODO(cef): Figure out how to populate these values.
// See: http://crbug.com/110510
CefPopupFeatures features;
Do you have any idea where this one is in the stack of issues to be addressed?
For reference, to get a popup browser window hosted in my own custom parent I'm following this flow:
1. OnBeforePopup: Set windowInfo.style to something without WS_VISIBLE to avoid an ugly flash while reparenting takes place because it doesn't seem to be possible to call windowInfo.SetAsChild() at this point. Now create my custom parent and a new ClientHandler for the popup.
2. ClientHandler::OnAfterCreated (for the popup): Reparent the browser window into the custom parent, remove the WS_CAPTION style that all non-child windows automatically get, resize to fit within the custom parent and then show the browser window.
This all works but feels a little hacky. It could be simplified if windowInfo.SetAsChild() worked during the OnBeforePopup callback.
Cheers,
- Andy