Thanks, that was helpful. I think I am tracking now.
I tried implementing IRequestHandler and I am most probably doing something wrong as I can't seem to capture any of the OnBefore... events.
To implement it, all I did was add IRequestHandler to my form:
public partial class Form1 : Form, IRequestHandler
I then added the members:
bool IRequestHandler.OnBeforeBrowse(IWebBrowser browser, IRequest request,
NavigationType naigationvType, bool isRedirect)
{
System.Diagnostics.Debug.WriteLine("OnBeforeBrowse");
return false;
}
bool IRequestHandler.OnBeforeResourceLoad(IWebBrowser browser,
IRequestResponse requestResponse)
{
System.Diagnostics.Debug.WriteLine("OnBeforeResourceLoad");
return false;
}
void IRequestHandler.OnResourceResponse(IWebBrowser browser, string url,
int status, string statusText,
string mimeType, WebHeaderCollection headers)
{
System.Diagnostics.Debug.WriteLine("OnResourceResponse");
}
I never get any events, so I am obviously doing something wrong.
The closest example I could find was in the CefSharp.Example project, the ExamplePresenter class attempts to do the same thing I am trying to do. The example project works perfect, but my project does not. Perhaps there is something obvious I am doing wrong?