Example #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);
            }
        }
Example #3
0
 internal void ResFailed(IWebURLResponse res, string des)
 {
     try
     {
         if (Owner.WebView != null)
         {
             ResourceFailedLoading(this, new WebKitResourceErrorEventArgs(res, des));
         }
     }
     catch { }
 }
Example #4
0
 internal void ResStart(IWebURLResponse res)
 {
     try
     {
         if (Owner.WebView != null)
         {
             ResourceStartedLoadingEvent(this, new WebKitResourcesEventArgs(res));
         }
     }
     catch { }
 }
Example #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;
 }
Example #7
0
 void resourcesLoadDelegate_ResourceLoading(IWebURLResponse res)
 {
     resourceIntercepter.ResStart(res);
 }
Example #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();
 }
Example #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);
 }
Example #15
0
 public WebKitLoadingResourceEventArgs(IWebURLResponse res, int length)
 {
     this.Resource = new WebKitResource(res);
     this.Received = length;
 }
Example #16
0
 public WebKitResourcesEventArgs(IWebURLResponse res)
 {
     this.Resource = new WebKitResource(res);
 }
Example #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 { }
 }
Example #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;
 }
Example #29
0
 void resourcesLoadDelegate_ResourceProgress(IWebURLResponse res, int length)
 {
     resourceIntercepter.ResProg(res, length);
 }
 public void didReceiveResponse(WebDownload download, IWebURLResponse response)
 {  
     DidReceiveResponse(download, response);
 }
Example #31
0
 void resourcesLoadDelegate_ResourceLoaded(IWebURLResponse res)
 {
     resourceIntercepter.ResFinish(res);
 }
 public void willResumeWithResponse(WebDownload download, IWebURLResponse response, long fromByte)
 {
     WillResumeWithResponse(download, response, fromByte);
 }