OnBeforeBrowse not called

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

OnBeforeBrowse not called

Postby DMEW » Fri Sep 30, 2016 12:56 am

Hey using CEF3 (single_process mode), and my OnBeforeBrowse function is not being called. My CefApp inheritance looks something like this:

class ClientAppBrowser : public ClientApp,
public CefBrowserProcessHandler,
public CefRenderProcessHandler,
public CefLoadHandler,
public CefRequestHandler,
public CefClient

I properly setup a GetRequestHandler function in this class as well as overriding OnBeforeBrowse.

bool OnBeforeBrowse(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request,
bool is_redirect) OVERRIDE;

All my other callbacks work (OnBeforeNavigate, OnLoadStart, OnLoadEnd). Any ideas what I am missing or not thinking of? Thanks.
DMEW
Newbie
 
Posts: 4
Joined: Tue Sep 13, 2016 11:20 am

Re: OnBeforeBrowse not called

Postby Czarek » Fri Sep 30, 2016 1:26 am

Check GetRequestHandler() and whether other CefRequestHandler callbacks are being called.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: OnBeforeBrowse not called

Postby DMEW » Mon Oct 03, 2016 9:06 am

Thanks man. That helped narrow it down. Turns out there is another RequestHandler/GetRequestHandler being used in Browser_Window* classes. I just had to insert myself in one of those "OnBrowserRequest" functions.
DMEW
Newbie
 
Posts: 4
Joined: Tue Sep 13, 2016 11:20 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 20 guests