Hi Benoit, Frameloader has the following API which can be used to check if the URL can be displayed in webview.
'bool canShowMIMEType(const String& MIMEType) const;' In GTK port, wrapper to this method, which is exposed is gboolean webkit_web_view_can_show_mime_type(WebKitWebView* webView, const gchar* mimeType) In order to show 'Download window' in GTK port, you could do the following, a. Connect to 'mime-type-policy-decision-requested' b. In signal handler of above signal, call 'webkit_web_view_can_show_mime_type' to check if mime type can be displayed by webview. c. Call 'webkit_web_policy_decision_download()', if webview cannot display the content, which will trigger the download. There should be equivalent of above API's in other ports as well to trigger download. You can find the example at 'WebKit/gtk/tests/testdownload.c' On Mon, Nov 9, 2009 at 12:18 PM, Benoit Chesneau <[email protected]>wrote: > Hi, > > How could I display a "download window" when content behind a link > can't displayed in the webview ? There is a hook for for upload input > but I didn't see any hook for this. I sthere a way to know the url > can't be displayed ? > > > - benoiƮt > _______________________________________________ > webkit-help mailing list > [email protected] > http://lists.webkit.org/mailman/listinfo.cgi/webkit-help > -- Regards, _Nayan_
_______________________________________________ webkit-help mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
