Where is the api like android's OnCreateWindow interface?

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Where is the api like android's OnCreateWindow interface?

Postby simonhong » Mon Jan 26, 2015 9:10 pm

Hi,

I built cefclient on MacOSX and tested.
cefclient creates new sub window(only titlebar) when I clicked link.
Which interface is used for creating new window?
I'm reading header files but can't find :)
Please point out.

Thanks.
Simon.
simonhong
Newbie
 
Posts: 3
Joined: Sun Jan 25, 2015 3:23 am

Re: Where is the api like android's OnCreateWindow interface

Postby magreenblatt » Mon Jan 26, 2015 10:36 pm

I don't know what OnCreateWindow does, but CefBrowserHost::CreateBrowser will create a new window with CEF.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Where is the api like android's OnCreateWindow interface

Postby simonhong » Mon Jan 26, 2015 11:00 pm

WebChromeClient::OnCreateWindow(in android webview) is called when new browser window is requested from webpage.
On cefclient on mac, new window is created when I clicks a link.
So I thought there is a api like that.
But I can't find in include directory.(So I posted :))

After code reading, CefBrowserHost::CreateBrowser() is only called once when application is started.
Am I missing some other places for that?
simonhong
Newbie
 
Posts: 3
Joined: Sun Jan 25, 2015 3:23 am

Re: Where is the api like android's OnCreateWindow interface

Postby magreenblatt » Mon Jan 26, 2015 11:08 pm

Sounds like you want OnBeforeBrowse or OnBeforePopup.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Where is the api like android's OnCreateWindow interface

Postby simonhong » Tue Jan 27, 2015 12:08 am

Ah, yes. It's popup window.
I checked that new popup window is created in CefBrowserHostImpl::WebContentsCreated().
Thanks!
simonhong
Newbie
 
Posts: 3
Joined: Sun Jan 25, 2015 3:23 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 22 guests