Exemple #1
0
 void IRequestHandler.OnResourceLoadComplete(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, UrlRequestStatus status, long receivedContentLength)
 {
     try
     {
         var pageFilter = FilterManager.GetFileter(request.Identifier.ToString());
         if (pageFilter != null)
         {
             pageFilter.SetHeader(request.Headers, response.ResponseHeaders);
             pageFilter.SendNotify();
         }
     }
     catch { }
 }
Exemple #2
0
        IResponseFilter IRequestHandler.GetResourceResponseFilter(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response)
        {
            var url = new Uri(request.Url);

            if (url.AbsoluteUri == "th://empty")
            {
                return(new EmptyPageFilter());
            }
            else
            {
                var pageFilter = FilterManager.CreateFilter(request.Identifier.ToString(), url.AbsoluteUri);
                pageFilter.NotifyResult += pageFilter_NotifyResult;

                return(pageFilter);
            }
        }