Пример #1
0
 public void decidePolicyForMIMEType(WebView WebView, string type, IWebURLRequest request, webFrame frame, IWebPolicyDecisionListener listener)
 {
     if (WebView.canShowMIMEType(type) == 0 && !request.url().StartsWith("file:") && !type.Contains("pdf"))
     {
         if (AllowDownloads)
             listener.download();
         else
             listener.ignore();
     }
     else
     {
         listener.use();
         Owner.tempmimetype = type;
     }
 }
Пример #2
0
 public void decidePolicyForMIMEType(WebView webView, string type, IWebURLRequest request, IWebFrame frame, IWebPolicyDecisionListener listener)
 {
     // todo: add support for showing custom MIME type documents
     // and for changing which MIME types are handled here
     if (webView.canShowMIMEType(type) == 0)
     {
         if (AllowDownloads)
             listener.download();
         else
             listener.ignore();
     }
     else
     {
         listener.use();
     }
 }
Пример #3
0
 public void decidePolicyForMIMEType(WebView WebView, string type, IWebURLRequest request, webFrame frame, IWebPolicyDecisionListener listener)
 {
     if (WebView.canShowMIMEType(type) == 0 && !request.url().StartsWith("file:") && !type.Contains("pdf"))
     {
         if (AllowDownloads)
         {
             listener.download();
         }
         else
         {
             listener.ignore();
         }
     }
     else
     {
         listener.use();
         Owner.tempmimetype = type;
     }
 }
Пример #4
0
 public void decidePolicyForMIMEType(WebView WebView, string type, IWebURLRequest request, webFrame frame, IWebPolicyDecisionListener listener)
 {
     // todo: add support for showing custom MIME type documents
     // and for changing which MIME types are handled here
     if (WebView.canShowMIMEType(type) == 0)
     {
         if (AllowDownloads)
         {
             listener.download();
         }
         else
         {
             listener.ignore();
         }
     }
     else
     {
         listener.use();
     }
 }