summaryrefslogtreecommitdiffstats
path: root/src/core/profile_adapter.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for local font access notificationsKaloyan Chehlarski2024-03-151-0/+1
| | | | | | | | | | | | Accessing local fonts on the user's machine has been available in Chromium since v103, via a (draft) API descrived here: https://developer.chrome.com/docs/capabilities/web-apis/local-fonts This change adds support for the relevant notification types, effectively exposing the API to WebEngine applications. Task-number: QTBUG-121320 Change-Id: I42c5261dc689c3d7bb4aa3c58c6300421220a36a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add granular permission for clipboard-read/writeMoss Heim2024-03-111-2/+1
| | | | | | | | | | | | | | | Previously, permissions for clipboard access could only be managed through the JavascriptCanAccessClipboard and JavascriptCanPaste settings. This change allows copy/paste to be handled the same way as notification and geolocation permissions. If both JavascriptCanAccessClipboard and JavascriptCanPaste are enabled, permissions will be granted unconditionally without a feature request being made. Fixes: QTBUG-77450 Change-Id: I383e27e244ced3d6b7988644e38d2307c6267f76 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove the use of Q_WEBENGINECORE_PRIVATE_EXPORTAlexey Edelev2024-01-161-1/+1
| | | | | | Task-number: QTBUG-117983 Change-Id: I3f5b90c0d43071a5c8ebc4096995ce5e1e65aebb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add API to override User Agent Client HintsSzabolcs David2023-12-141-0/+19
| | | | | | | | | | | Implement QWebEngineClientHints class to provide API for each user agent client hints. Task-number: QTBUG-112826 Task-number: QTBUG-112825 Change-Id: I3091d60fb363bbafc16c8e48195c1fd82e8a81bb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Allow cancelling automatically accepted download requestsSzabolcs David2023-10-171-1/+1
| | | | | | | | | | | | | Calling QWebEngineDownloadRequest::cancel() had no effect if the download request was accepted by default. These downloads had no corresponding internal DownloadItem yet, but we tried to cancel them using the DownloadManager. The safest option is to always check if the DownloadItem exists in Chromium. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: I8f92d45e00e088aea7d22d5b7271b5b09adf6cbb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove QWebEngineUrlResponseInterceptor APIMichael Brüning2023-08-241-5/+0
| | | | | | | | | | | | | | | | | It has been found to not have any real effect, therefore, we remove it again to not release a non-functional API and create false expectations in users. This reverts commits 3f5de5fab74e6c152cdf5d04f3d893feaa31790b ab21f39c6a54be331dd8a155d3374bfe790e0274 (parts) 082eef1916a86d6d5e0c751d271c7c8a1a5e457d 5e257fb57a211f95556ec387fe6f262a60cbb6fe Pick-to: 6.6 Task-number: QTBUG-61071 Change-Id: Ifb33e32128e77dfffed863a1a7501ba21796692d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QWebEngineUrlResponseInterceptor: Implement new URL response interceptorYigit Akcay2023-03-101-0/+5
| | | | | | | | | | | | | | | | | | | | | This patch adds the QWebEngineUrlResponseInterceptor abstract class, which, when implemented, allows a user to intercept response headers and modify them in any way they like. A response interceptor can be set via QWebEngineProfile::setUrlResponseInterceptor(), QQuickWebEngineProfile::setUrlResponseInterceptor() or QWebEnginePage::setUrlResponseInterceptor(). Also, the QWebEngineUrlResponseInfo class is implemented, which contains the request and response data to be used with the response interceptor. If a response interceptor is set in the profile and page, the one in the profile takes precedence. Fixes: QTBUG-61071 Change-Id: I484d14373ff597b1d531541c066f0102bae28c72 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Remove setPushServiceEndpoint from APIMichal Klocek2022-12-221-3/+3
| | | | | | | | | | Use setPushServiceEnabled instead. Update also getter and documentation. Task-number: QTBUG-107442 Pick-to: 6.5 Change-Id: I299ce88b06edef0f1a0088fb10f4a142056039be Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Enable Push MessagingSzabolcs David2022-09-121-0/+4
| | | | | | | | | | | | | | | | | | Use Chrome's implementation of PushMessagingService. This feature relies on notification permissions, so it is not different from Web Notification from end-users perspective. We don't persist push subscriptions, because it seems these have to be consistent with persisting notification permissions. Make address of push service configurable by a profile setting. It is empty by default - which means the feature is disabled until the user sets the address of a push service. Task-number: QTBUG-98904 Task-number: QTBUG-53457 Change-Id: If44f459fecf2da482c28fee5562f62fe40de103e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-221-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Protect against default profile being deleted before its pagesAllan Sandfeld Jensen2022-06-131-0/+1
| | | | | | | | | Can really only happen in QML on exit. Pick-to: 6.3 6.4 Task-number: QTBUG-99445 Change-Id: I1a04d57b6c4c40ae264b5519d2e41c57bca79a61 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chrome 96Allan Sandfeld Jensen2022-03-291-0/+1
| | | | | Change-Id: I40039658762b8788a0be57bd186efab71f3e4448 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Clean up includes in profile_adapterMartin Negyokru2022-03-241-1/+2
| | | | | Change-Id: If345d774651b801362da67ff9d3f80867662b29d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove deprecated useforglobalcertificateverificationPeter Varga2021-07-061-5/+0
| | | | | | | | | | | | It enabled an unrecommended OCSP path on Linux [ChangeLog] (Q)WebEngineSettings::useForGlobalCertificateVerification has been removed. Pick-to: 6.2 Task-number: QTBUG-91467 Change-Id: I9f5d1ad5e4fcb59abd31e6a133ded7bf8319c811 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Add API for favicon databasePeter Varga2021-06-181-0/+11
| | | | | | | | | | | | [ChangeLog][QtWebEngineCore][QWebEngineProfile] Add new API to access icon database asynchronously. [ChangeLog][QtWebEngineQuick] image:/favicon/ URLs now can be used to access icon database. Pick-to: 6.2 Task-number: QTBUG-51184 Change-Id: I6096ad9a4210670ed59458c4fa099a02595e8a1e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace FaviconManager with Chromium's Favicon ComponentPeter Varga2021-06-041-0/+1
| | | | | | Task-number: QTBUG-51184 Change-Id: Ie050cb23f2c86841a66ec384bfbcdf0713cffa7c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add WebEngineWidgets, WebEngineQuick modules cmake buildMichal Klocek2021-05-191-5/+5
| | | | | | | | | Fix some library dependencies and make proper header includes in core. Task-number: QTBUG-91760 Change-Id: I415361dd42ef2cc39716ce3f5f56e6e8556ac4c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-121-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webenginewidgets/printme/printhandler.cpp src/3rdparty src/core/api/qwebenginepage_p.h src/core/content_browser_client_qt.h src/core/web_contents_adapter_client.h src/core/web_contents_delegate_qt.cpp src/core/web_contents_delegate_qt.h src/webenginequick/api/qquickwebengineview_p_p.h tests/auto/quick/qmltests/data/tst_download.qml tests/auto/quick/qmltests/data/tst_viewSoure.qml tests/auto/widgets/loadsignals/tst_loadsignals.cpp tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
| * Allow leaving OCSP offAllan Sandfeld Jensen2021-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | This form of OCSP is not good, so try to at least allow it to be disabled, until we remove it. Fixes: QTBUG-91467 Change-Id: Ied9e8c4960e6ea1503dea39ebbced2ad1af08d5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Use QList instead of QVectorJarek Kobus2020-07-151-2/+1
|/ | | | | | Task-number: QTBUG-84469 Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add support for clearing the feature requestAllan Sandfeld Jensen2020-05-201-1/+7
| | | | | | Task-number: QTBUG-83476 Change-Id: I63ad9801e3e97f7fdac959600c69c04d0105be1f Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* Cleanup interceptors in profileMichal Klocek2020-04-201-5/+0
| | | | | Change-Id: Ibc6d63845601b8189ac38bacc77885327284c81f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* ProfileIODataQt: remove more remains of non network service codeJüri Valdmann2020-04-101-1/+0
| | | | | | Task-number: QTBUG-83394 Change-Id: Ib1b4431ac75ae7e988bf62580e2bfb690840f54a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix 'setDownloadDirectory' for download item on 'SavePage' actionKirill Burtsev2019-11-291-1/+0
| | | | | | | | | | | | | | Chromium's DownloadManager doesn't create its download items before path for saving page is confirmed. So assert inside updateDownloadPath was not correct. Moreover, the name is confusing because it's not really updating anything. Remove it and use ProfileAdapterClient::DownloadInfo timestamp to determine updated filename after directory change. Ammends recent new api for changing download directory 0884fab3b1. Fixes: QTBUG-80372 Change-Id: If9efb52979deb3cf21fc4e12989173c85e04e090 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Adaptations for Chromium 75Allan Sandfeld Jensen2019-07-101-1/+0
| | | | | Change-Id: Idad08244e0c749a9f70f5eb9f8cd236039b941b3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add API to change download directory path and file nameTamas Zakor2019-07-051-0/+3
| | | | | | | | | | | | | | | | | | Add functions and property to change the download directory and file name in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and deprecate the path() and setPath(). Regenerating the uniquifying download filename after change the download directory. [ChangeLog][DownloadItem] Add functions and property to change the download directory and file name in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and deprecate the path() and setPath(). Task-number: QTBUG-56978 Change-Id: I6e63da82a187add8bc3206cc80c8bf6865fbdd35 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Switch export macros to standard formAllan Sandfeld Jensen2019-04-011-1/+1
| | | | | | | | | | Qt expects the export macros to have Q_ prefixes, otherwise the symbol versioning script won't find them and mark them. Task-number: QTBUG-74752 Change-Id: I1e057802f6715d170bdd9074f281e73fb96c9e52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix -no-ssl buildv5.13.0-beta1Peter Varga2019-03-071-0/+4
| | | | | Change-Id: I978f70545484060218f5243c74978c85bc603c16 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-03-041-0/+5
|\ | | | | | | Change-Id: I1dd136df7004b11e2f38a2ec4e82a6fa81627479
| * Force destruction of webcontent client before profile adapterMichal Klocek2019-03-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently users might forget to delete webcontent client before profile adapter. This might be nasty if users are not aware of default profile. Instead of asserting badly in chromium, clean up and release chromium resources. This avoids the crash, but might leak memory if users never deletes page. Task-number: QTBUG-74021 Change-Id: I66f466f169d12f7ee08866d505260dca47800bb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Tie client certificate stores to profilesAllan Sandfeld Jensen2019-03-011-0/+4
| | | | | | | | | | | | | | | | Move the client certificate store from being global to being tied to individual profiles. Change-Id: Ib21ae14c501b7d0612b84ae7535120291aeeada2 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Web Notifications APIKirill Burtsev2019-02-061-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements API for end-user notifications. Co-authored by Allan Sandfeld Jensen [ChangeLog][Profile] Support for Web Notifications API for end-user notifications through QWebEngineNotification Task-number: QTBUG-50995 Fixes: QTBUG-51191 Change-Id: Icebaaa05275a713e801f1f8ecdaaec725fa264c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-02-011-0/+2
|\| | | | | | | Change-Id: I2889e49fe9f71bfc996689feb0f350e09569f611
| * Answer permission checks for clipboard permissionsSzabolcs David2019-01-301-0/+2
| | | | | | | | | | | | | | | | Wire page settings into clipboard permissions and add some auto test. Task-number: QTBUG-72714 Change-Id: If921c65cdff7f55a48340d90fc593071febc6ebe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add API to set default download pathTamas Zakor2019-01-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Also add new test for check uniquifying download filename. Update plugins.qmltypes to 1.9 [ChangeLog][Profile][QtWebEngine][QtWebEngineWidgets] Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Task-number: QTBUG-66262 Task-number: QTBUG-72176 Change-Id: I7fa93b66c326766b176aec24d453dd75602b91de Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-221-0/+1
|\| | | | | | | Change-Id: Ib374079ded76e43d4b72f725bbf16fe353ef827e
| * Remove download items internally when API objects are deletedAllan Sandfeld Jensen2019-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | We were never removing internal download item. [ChangeLog][Behavioral Changes] Deleting a download item will now also cancel it if it is still in progress. Change-Id: I2fab497d7acf7ca6ca17f4a61e106b1c18bfb333 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Clean up visitedLinksManagerQt constructionMichal Klocek2019-01-101-1/+1
| | | | | | | | | | | | | | Remove dependency on profileAdapter. Change-Id: I362a0500413d39f2dec1d3a8bbc155df068d84ec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use QWebEngineUrlSchemeHandler for qrcJüri Valdmann2018-10-311-0/+2
| | | | | | | | | | | | | | | | Delete qrc protocol handler and use custom scheme protocol handler instead. Fixes: QTBUG-71215 Change-Id: I8aa390552c80b591a92f52b8a388e5a707d28f9e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Move the profiles' url scheme handler API to coreJüri Valdmann2018-10-311-6/+7
| | | | | | | | | | | | | | | | | | | | Implementation of the url scheme handler API in QWebEngineProfile and QQuickWebEngineProfile is exactly identical, so move it to the ProfileAdapter instead. Change-Id: I01baf1c4e5b3c393675adefb0470def90b8b2813 Task-number: QTBUG-71215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add setRequestInterceptor to QWebEnginePageAllan Sandfeld Jensen2018-10-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Makes it possible to make page specific intercepts, and is at the same time safer by running in the UI-thread. [ChangeLog][QtWebEngineWidgets][QWebEnginePage] Added setRequestInterceptor, similar to the same call on profile except it operates on a per-page basis and on the UI-thread. Change-Id: Id5a7173156c25d0f030f00b6ef314d283c7c8cdd Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Make it possible to enable OCSP on LinuxAllan Sandfeld Jensen2018-10-171-0/+4
|/ | | | | | | | | | | | | The code follows Chromium and also set a CertNetFetcher on both Linux and macOS, but it appears to be currently unused. [ChangeLog][QWebEngineProfile] A profile can now be designated to download OCSP records and thus enable OCSP verification on Linux. Task-number: QTBUG-58059 Task-number: QTBUG-71164 Change-Id: I84fd34d4351cb7aa4417ce4058f97bad4b8d0cd4 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Fix running webengine without default profileMichal Klocek2018-08-031-0/+1
| | | | | | | | | If default profile is not needed do not create by accident one in ~QWebEngineProfilePrivate. Task-number: QTBUG-66068 Change-Id: Ib4131268686178560f3a89dce41e59eb57613e17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename BrowserAdapterClient to ProfileAdapterClientMichal Klocek2018-07-091-5/+5
| | | | | Change-Id: I1f8c0d2e59c2565b24c8c636553f1b70bcd31774 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-0/+217
Follow change of BrowserContextQt to ProfileQt. Fix wrong naming usage of browserContext instead of browserContextAdapter. Change-Id: I75fdac685d9bffd44f0144921d3e87305d6d44c9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>