コード例 #1
0
 protected override bool OnLoadError(CefBrowser browser, CefFrame frame, CefHandlerErrorCode errorCode, string failedUrl, ref string errorText)
 {
     lock (FRenderer.FLock)
     {
         FRenderer.FCurrentDom     = null;
         FRenderer.FFrameLoadCount = 0;
         FRenderer.FErrorText      = errorText;
     }
     return(base.OnLoadError(browser, frame, errorCode, failedUrl, ref errorText));
 }
コード例 #2
0
 internal void OnLoadError(CefFrame frame, CefHandlerErrorCode errorCode, string failedUrl, string errorText)
 {
     lock (FLock)
     {
         FLoadCount--;
         if (frame.IsMain)
         {
             FCurrentDom = null;
             FErrorText  = errorText;
         }
     }
 }
コード例 #3
0
        protected override bool OnLoadError(CefBrowser browser, CefFrame frame, CefHandlerErrorCode errorCode, string failedUrl, ref string errorText)
        {
            /*
             #if DIAGNOSTICS
             * Cef.Logger.Trace(LogTarget.CefLoadHandler, "LoadHandler.OnLoadError: ErrorCode=[{0}] FailedUrl=[{1}] ErrorText=[{2}]", errorCode, failedUrl, errorText);
             #endif
             */
            Console.WriteLine("OnLoadError: Name=[{0}] Url=[{1}] ",
                              frame.IsMain ? "MAIN" : frame.GetName(),
                              frame.GetURL()
                              );

            return(false);
            // errorText = "OnLoadError: ErrorCode=[" + errorCode.ToString() + "], URL=[" + failedUrl + "].";
            // return true;
        }
コード例 #4
0
 /// <summary>
 /// Notifies the client that the request ended with an error.
 /// </summary>
 protected virtual void OnError(CefWebUrlRequest requester, CefHandlerErrorCode errorCode)
 {
 }
コード例 #5
0
ファイル: WebClient.cs プロジェクト: tekcor/vvvv-sdk
 protected override bool OnLoadError(CefBrowser browser, CefFrame frame, CefHandlerErrorCode errorCode, string failedUrl, ref string errorText)
 {
     FRenderer.OnLoadError(frame, errorCode, failedUrl, errorText);
     return(base.OnLoadError(browser, frame, errorCode, failedUrl, ref errorText));
 }
コード例 #6
0
 /// <summary>
 /// Called when the browser fails to load a resource.
 /// |errorCode| is the error code number and |failedUrl| is the URL that failed to load.
 /// To provide custom error text assign the text to |errorText| and return true.
 /// Otherwise, return false for the default error text.
 /// See net\base\net_error_list.h for complete descriptions of the error codes.
 /// </summary>
 protected virtual bool OnLoadError(CefBrowser browser, CefFrame frame, CefHandlerErrorCode errorCode, string failedUrl, ref string errorText)
 {
     // FIXME: change api... instead of return true/false we can return errorText (custom), or null/empty to default error text.
     return false;
 }
コード例 #7
0
 /// <summary>
 /// Called when the browser fails to load a resource.
 /// |errorCode| is the error code number and |failedUrl| is the URL that failed to load.
 /// To provide custom error text assign the text to |errorText| and return true.
 /// Otherwise, return false for the default error text.
 /// See net\base\net_error_list.h for complete descriptions of the error codes.
 /// </summary>
 protected virtual bool OnLoadError(CefBrowser browser, CefFrame frame, CefHandlerErrorCode errorCode, string failedUrl, ref string errorText)
 {
     // FIXME: change api... instead of return true/false we can return errorText (custom), or null/empty to default error text.
     return(false);
 }
コード例 #8
0
        protected override bool OnLoadError(CefBrowser browser, CefFrame frame, CefHandlerErrorCode errorCode, string failedUrl, ref string errorText)
        {
            /*
            #if DIAGNOSTICS
            Cef.Logger.Trace(LogTarget.CefLoadHandler, "LoadHandler.OnLoadError: ErrorCode=[{0}] FailedUrl=[{1}] ErrorText=[{2}]", errorCode, failedUrl, errorText);
            #endif
            */
            Console.WriteLine("OnLoadError: Name=[{0}] Url=[{1}] ",
                frame.IsMain ? "MAIN" : frame.GetName(),
                frame.GetURL()
                );

            return false;
            // errorText = "OnLoadError: ErrorCode=[" + errorCode.ToString() + "], URL=[" + failedUrl + "].";
            // return true;
        }