CefRenderProcessHandler methods not called

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.

Re: CefRenderProcessHandler methods not called

Postby PhilMReel » Mon Mar 28, 2016 3:37 pm

Ok. I got significantly further with my integration of CEF. I solved my previous problem by placing some JS in OnLoadStart. Anyway, now I have a new problem. I allow the user to open multiple CEF windows, and I keep track of them in my CCefSimpleHandler by the browser address. When OnAfterCreated is called, I store a pointer to the browser in the view. When OnBeforeClose is called, I check to see which browser it is, so I know which window to destroy. The thing is the browser pointers are completely different values from OnAfterCreated and OnBeforeClose. Is this correct, and if so why? Currently, I allow multiple application views to be made, and they each have their own handler. The handler can have up to two views: one application view, and one dev tools view. Is there any way I can tell which view is being destroyed, so I can do a proper cleanup? Thanks in advance.
PhilMReel
Techie
 
Posts: 13
Joined: Wed Jan 13, 2016 11:13 am

Re: CefRenderProcessHandler methods not called

Postby magreenblatt » Tue Mar 29, 2016 9:35 am

PhilMReel wrote:Ok. I got significantly further with my integration of CEF. I solved my previous problem by placing some JS in OnLoadStart. Anyway, now I have a new problem. I allow the user to open multiple CEF windows, and I keep track of them in my CCefSimpleHandler by the browser address. When OnAfterCreated is called, I store a pointer to the browser in the view. When OnBeforeClose is called, I check to see which browser it is, so I know which window to destroy. The thing is the browser pointers are completely different values from OnAfterCreated and OnBeforeClose. Is this correct, and if so why? Currently, I allow multiple application views to be made, and they each have their own handler. The handler can have up to two views: one application view, and one dev tools view. Is there any way I can tell which view is being destroyed, so I can do a proper cleanup? Thanks in advance.

Use CefBrowser::GetIdentifier() for comparison purposes.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CefRenderProcessHandler methods not called

Postby PhilMReel » Tue Mar 29, 2016 9:44 am

Thansk! That worked.
PhilMReel
Techie
 
Posts: 13
Joined: Wed Jan 13, 2016 11:13 am

Re: CefRenderProcessHandler methods not called

Postby xins0123 » Thu May 19, 2016 1:07 am

I just want to know how to show a cef window as modal window? Thanks!
xins0123
Newbie
 
Posts: 3
Joined: Tue Feb 23, 2016 3:56 am

Re: CefRenderProcessHandler methods not called

Postby magreenblatt » Thu May 19, 2016 9:11 am

xins0123 wrote:I just want to know how to show a cef window as modal window? Thanks!

Please don't post on an unrelated topic. Start a new topic instead.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 95 guests