Our embedded browser needs to use geolocation stuff, let me know if this is the wrong way of going about it.
I need to implement the CefGeolocationHandler and overwrite the OnRequestGeolocationpermission to return true like this.
- Code: Select all
class ExampleCEFGeoLocationHandler : CefGeolocationHandler{
protected override void OnRequestGeolocationPermission(CefBrowser browser, string requestingUrl, int requestId, CefGeolocationCallback callback)
{
MessageBox.Show("On Request Geolocation");
callback.Continue(true);
}
protected override void OnCancelGeolocationPermission(CefBrowser browser, string requesting_url, int request_id)
{
}
}
Now I am struggling to actually implement my ExampleCEFGeolocationHandler so that this override takes place.
I can not find anywhere in the documentation that allows me to set this handler. Anyone know how I can do this?
(Yes I have set up the Places API key variables)