internal void ResProg(IWebURLResponse res, int r) { if (Owner.WebView != null) { ResourceSizeAvailableEvent(this, new WebKitLoadingResourceEventArgs(res, r)); } }
public void didFailLoadingWithError(WebView WebView, uint identifier, WebError error, IWebDataSource dataSource) { IWebURLResponse resp = null; resources.TryGetValue(identifier, out resp); if (resp != null) { ResourceFailedLoading(resources[identifier], error); } }
internal void ResFailed(IWebURLResponse res, string des) { try { if (Owner.WebView != null) { ResourceFailedLoading(this, new WebKitResourceErrorEventArgs(res, des)); } } catch { } }
internal void ResStart(IWebURLResponse res) { try { if (Owner.WebView != null) { ResourceStartedLoadingEvent(this, new WebKitResourcesEventArgs(res)); } } catch { } }
internal void ResFinish(IWebURLResponse res) { try { Resources.Add(new WebKitResource(res, (int)res.expectedContentLength())); if (Owner.WebView != null) { ResourceFinishedLoadingEvent(this, new WebKitResourcesEventArgs(res)); } } catch { } }
public void willSendRequest(WebDownload download, WebMutableURLRequest request, IWebURLResponse redirectResponse, out WebMutableURLRequest finalRequest) { finalRequest = request; }
void resourcesLoadDelegate_ResourceLoading(IWebURLResponse res) { resourceIntercepter.ResStart(res); }
void resourcesLoadDelegate_ResourceFailedLoading(IWebURLResponse res, WebError error) { resourceIntercepter.ResFailed(res, error.localizedDescription()); }
public WebKitResourcesEventArgs(IWebURLResponse res) { this.Resource = new WebKitResource(res); }
public WebKitResource(IWebURLResponse res) { this.Url = res.url(); this.MimeType = res.mimeType(); this.Encoding = res.textEncodingName(); }
internal void ResFailed(IWebURLResponse res, string des) { try { if (Owner.WebView != null) ResourceFailedLoading(this, new WebKitResourceErrorEventArgs(res, des)); } catch { } }
public IWebURLRequest willSendRequest(WebView WebView, uint identifier, IWebURLRequest request, IWebURLResponse redirectResponse, IWebDataSource dataSource) { string ret = ResourceRequestSent(request.url()); if (Owner.Preferences.IgnoreSSLErrors) { request.mutableCopy().setAllowsAnyHTTPSCertificate(); } if (string.IsNullOrEmpty(ret)) { return(null); } else { if (ret == request.url()) { return(request); } else { IWebURLRequest req = new WebURLRequestClass(); req.initWithURL(ret, _WebURLRequestCachePolicy.WebURLRequestUseProtocolCachePolicy, 60); return(req); } } }
public void didReceiveResponse(WebView WebView, uint identifier, IWebURLResponse response, IWebDataSource dataSource) { ResourceLoading(response); resources.Add(identifier, response); }
public WebKitLoadingResourceEventArgs(IWebURLResponse res, int length) { this.Resource = new WebKitResource(res); this.Received = length; }
public WebKitResourceErrorEventArgs(IWebURLResponse res, string error) { this.Resource = new WebKitResource(res); this.ErrorDescription = error; }
public IWebURLRequest willSendRequest(WebView WebView, uint identifier, IWebURLRequest request, IWebURLResponse redirectResponse, IWebDataSource dataSource) { string ret = ResourceRequestSent(request.url()); if (Owner.Preferences.IgnoreSSLErrors) request.mutableCopy().setAllowsAnyHTTPSCertificate(); if (string.IsNullOrEmpty(ret)) { return null; } else { if (ret == request.url()) { return request; } else { IWebURLRequest req = new WebURLRequestClass(); req.initWithURL(ret, _WebURLRequestCachePolicy.WebURLRequestUseProtocolCachePolicy, 60); return req; } } }
internal void ResFinish(IWebURLResponse res) { try { Resources.Add(new WebKitResource(res, (int)res.expectedContentLength())); if (Owner.WebView != null) ResourceFinishedLoadingEvent(this, new WebKitResourcesEventArgs(res)); } catch { } }
public void didReceiveResponse(IWebURLResponse response) { }
internal void ResProg(IWebURLResponse res, int r) { if (Owner.WebView != null) ResourceSizeAvailableEvent(this, new WebKitLoadingResourceEventArgs(res, r)); }
public void didReceiveResponse(WebDownload download, IWebURLResponse response) { DidReceiveResponse(download, response); }
public void willResumeWithResponse(WebDownload download, IWebURLResponse response, long fromByte) { WillResumeWithResponse(download, response, fromByte); }
void resourcesLoadDelegate_ResourceProgress(IWebURLResponse res, int length) { resourceIntercepter.ResProg(res, length); }
void resourcesLoadDelegate_ResourceLoaded(IWebURLResponse res) { resourceIntercepter.ResFinish(res); }