protected override void OnLoadStart(CefBrowser browser, CefFrame frame) { lock (FRenderer.FLock) { FRenderer.FFrameLoadCount++; FRenderer.FErrorText = string.Empty; if (frame.IsMain) { FRenderer.FCurrentUrl = frame.GetURL(); } } base.OnLoadStart(browser, frame); }
internal void OnLoadStart(CefFrame frame) { lock (FLock) { FLoadCount++; if (frame.IsMain) { FCurrentDom = null; FErrorText = string.Empty; FCurrentUrl = frame.GetURL(); } } }
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; }
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; }