protected override bool OnQuotaRequest(CefBrowser browser, string originUrl, long newSize, CefRequestCallback callback)
 {
     using (callback) {
         callback.Continue(true);
         return(true);
     }
 }
 protected override bool OnCertificateError(CefBrowser browser, CefErrorCode certError, string requestUrl, CefSslInfo sslInfo, CefRequestCallback callback)
 {
     using (callback) {
         if (OwnerWebView.IgnoreCertificateErrors)
         {
             callback.Continue(true);
             return(true);
         }
         return(false);
     }
 }
Esempio n. 3
0
 public void Continue(bool requestAllowed) => _callback?.Continue(requestAllowed);
        // protected override bool CanGetCookies(CefBrowser browser, CefFrame frame, CefRequest request)
        //{
        //    return base.CanGetCookies(browser, frame, request);
        //}

        //protected override bool CanSetCookie(CefBrowser browser, CefFrame frame, CefRequest request, CefCookie cookie)
        //{
        //    return base.CanSetCookie(browser, frame, request, cookie);
        //}

        //protected override bool GetAuthCredentials(CefBrowser browser, CefFrame frame, bool isProxy, string host, int port, string realm, string scheme, CefAuthCallback callback)
        //{
        //    //isProxy = false;
        //    return base.GetAuthCredentials(browser, frame, isProxy, host, port, realm, scheme, callback);
        //}

        //protected override CefResourceHandler GetResourceHandler(CefBrowser browser, CefFrame frame, CefRequest request)
        //{

        //    //CefWebReadHandler cefWebRead = new CefWebReadHandler();


        //    return base.GetResourceHandler(browser, frame, request);
        //}
        //protected override bool OnBeforeBrowse(CefBrowser browser, CefFrame frame, CefRequest request, bool userGesture, bool isRedirect)
        //{
        //    return base.OnBeforeBrowse(browser, frame, request, userGesture, isRedirect);
        //}

        //protected override CefReturnValue OnBeforeResourceLoad(CefBrowser browser, CefFrame frame, CefRequest request, CefRequestCallback callback)
        //{
        //    Uri url;
        //    if (Uri.TryCreate(request.Url, UriKind.Absolute, out url) == false)
        //    {
        //        //If we're unable to parse the Uri then cancel the request
        //        // avoid throwing any exceptions here as we're being called by unmanaged code
        //        return CefReturnValue.Cancel;
        //    }

        //    if (_requestHeandler != null)
        //    {
        //        return base.OnBeforeResourceLoad(browser, frame, request, callback);
        //        //return base.OnBeforeResourceLoad(browserControl, browser, frame, request, callback);
        //    }

        //    return CefReturnValue.Continue;
        //    //return base.OnBeforeResourceLoad(browser, frame, request, callback);

        //}

        protected override bool OnCertificateError(CefBrowser browser, CefErrorCode certError, string requestUrl, CefSslInfo sslInfo, CefRequestCallback callback)
        {
            callback.Continue(true);
            return(base.OnCertificateError(browser, certError, requestUrl, sslInfo, callback));
        }