示例#1
0
 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);
            }
        }
示例#3
0
 internal void ResFailed(IWebURLResponse res, string des)
 {
     try
     {
         if (Owner.WebView != null)
         {
             ResourceFailedLoading(this, new WebKitResourceErrorEventArgs(res, des));
         }
     }
     catch { }
 }
示例#4
0
 internal void ResStart(IWebURLResponse res)
 {
     try
     {
         if (Owner.WebView != null)
         {
             ResourceStartedLoadingEvent(this, new WebKitResourcesEventArgs(res));
         }
     }
     catch { }
 }
示例#5
0
 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;
 }
示例#7
0
 void resourcesLoadDelegate_ResourceLoading(IWebURLResponse res)
 {
     resourceIntercepter.ResStart(res);
 }
示例#8
0
 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();
 }
示例#11
0
 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);
 }
示例#15
0
 public WebKitLoadingResourceEventArgs(IWebURLResponse res, int length)
 {
     this.Resource = new WebKitResource(res);
     this.Received = length;
 }
示例#16
0
 public WebKitResourcesEventArgs(IWebURLResponse res)
 {
     this.Resource = new WebKitResource(res);
 }
示例#17
0
 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;
         }
     }
 }
 public void didReceiveResponse(WebView WebView, uint identifier, IWebURLResponse response, IWebDataSource dataSource)
 {
     ResourceLoading(response);
     resources.Add(identifier, response);
 }
 internal void ResFinish(IWebURLResponse res)
 {
     try
     {
         Resources.Add(new WebKitResource(res, (int)res.expectedContentLength()));
         if (Owner.WebView != null)
             ResourceFinishedLoadingEvent(this, new WebKitResourcesEventArgs(res));
     }
     catch { }
 }
 internal void ResStart(IWebURLResponse res)
 {
     try
     {
         if (Owner.WebView != null)
         {
             ResourceStartedLoadingEvent(this, new WebKitResourcesEventArgs(res));
         }
     }
     catch { }
 }
示例#22
0
 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 WebKitResourceErrorEventArgs(IWebURLResponse res, string error)
 {
     this.Resource = new WebKitResource(res);
     this.ErrorDescription = error;
 }
 public void willResumeWithResponse(WebDownload download, IWebURLResponse response, long fromByte)
 {
     WillResumeWithResponse(download, response, fromByte);
 }
 public WebKitLoadingResourceEventArgs(IWebURLResponse res, int length)
 {
     this.Resource = new WebKitResource(res);
     this.Received = length;
 }
 public void willSendRequest(WebDownload download, WebMutableURLRequest request, IWebURLResponse redirectResponse, out WebMutableURLRequest finalRequest)
 {
     finalRequest = request;
 }
示例#29
0
 void resourcesLoadDelegate_ResourceProgress(IWebURLResponse res, int length)
 {
     resourceIntercepter.ResProg(res, length);
 }
 public void didReceiveResponse(WebDownload download, IWebURLResponse response)
 {  
     DidReceiveResponse(download, response);
 }
示例#31
0
 void resourcesLoadDelegate_ResourceLoaded(IWebURLResponse res)
 {
     resourceIntercepter.ResFinish(res);
 }
 public void willResumeWithResponse(WebDownload download, IWebURLResponse response, long fromByte)
 {
     WillResumeWithResponse(download, response, fromByte);
 }