[Qtwebengine] Quick Download API

Arvid Nilsson anilsson at blackberry.com
Thu Dec 5 11:13:00 CET 2013

Hi there!

For full backward compatibility, widget flavor of QtWebEngine might benefit from a QNetworkAccessManager shim on top of the Chromium HTTP stack, and using the regular QtNetwork types to manage downloads.

For QML, we would like to start discussion on how a QML-friendly download API could look like.

Requirements courtesy of cswei:
1. to control the download (stop , resume, pause, cancel, etc)
2. To get the download state notification ( progress, failure, finished, etc)
3. To initiate a download , like anilsson says:  user press-hold on a link/image, and selects "download" to download a resource
4. Give the application/user the opportunity to specify the storage location, the file name, etc.
5. Special download, like OMA download, download of DRM contents, etc.

I believe all the methods/signals/slots from 1 and 2 could go into a WebEngineDownloadRequest creatable class. Perhaps there will be use for a WebEngineDownloadHandler attached object
I think 3 should be an API on WebEngineView or WebEngineView.experimental: WebEngineView.download(WebEngineDownloadRequest). Also a signal for web-initiated downloads WebEngineView.onDownloadRequested (or possibly go straight to the WebEngineDownloadHandler).
I think 4 could also be in the WebEngineDownloadRequest or WebEngineDownloadHandler

All of the required functionality exists in the Chromium content APIs, we just need to figure out an API.

What do you think?

This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

More information about the QtWebEngine mailing list