private int on_request_geolocation_permission(cef_geolocation_handler_t *self, cef_browser_t *browser, cef_string_t *requesting_url, int request_id, cef_geolocation_callback_t *callback) { CheckSelf(self); var m_browser = CefBrowser.FromNative(browser); var m_requesting_url = cef_string_t.ToString(requesting_url); var m_callback = CefGeolocationCallback.FromNative(callback); var m_result = OnRequestGeolocationPermission(m_browser, m_requesting_url, request_id, m_callback); return(m_result ? 1 : 0); }
/// <summary> /// Called when a page requests permission to access geolocation information. /// |requesting_url| is the URL requesting permission and |request_id| is the /// unique ID for the permission request. Return true and call /// CefGeolocationCallback::Continue() either in this method or at a later /// time to continue or cancel the request. Return false to cancel the request /// immediately. /// </summary> protected abstract bool OnRequestGeolocationPermission(CefBrowser browser, string requestingUrl, int requestId, CefGeolocationCallback callback);