summaryrefslogtreecommitdiffstats
path: root/src/core/browser_context_adapter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-544/+0
| | | | | | | | | 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>
* Finalize change from BrowserContext to ProfileMichal Klocek2018-07-061-37/+37
| | | | | | | | | | Changes 6c319ce and af313cb splited BrowserContextQt into ProfileQt and ProfileIODataQt. Finalize the change and rename leftover browserContext references to follow the initial change. Change-Id: I845142b1edb67ec4b94439be1e6cfc841dd3f55c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Migrate from BUILDFLAG to QT_CONFIGMichal Klocek2018-07-021-4/+4
| | | | | | | | | | | During configuration we mapped qt webengine fetures to chromium ones and passed them to gn. We used BUILDFLAG to optionally compile code in core. Use QT_CONFIG directly for qt files and add config sanity checks to make sure requested features are present. Change-Id: I930df114ac9aec8e73139ea9135925fc3ad8e39c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-261-1/+1
| | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Adaptations for Chromium 66Allan Sandfeld Jensen2018-06-261-2/+0
| | | | | Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-061-3/+3
| | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Unify and simplify profile constructorsMichal Klocek2018-05-281-16/+1
| | | | | | | Use one constructor for private profile creation. Change-Id: I57a227b6344b6e308cfd4931986fa1dede75cfce Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Refactor out ProfileIODataQtMichal Klocek2018-05-251-36/+30
| | | | | | | | | | | | | | | | | | | | | | Currently we can crash due to use-after-free of browser context, it happens due to fact that resource context has pointer to browser context which is destroyed on ui thread, while resource context is destroyed on io thread. We used url request getter to maintain objects destruction on io thread. Refactor the code and create profile io data, which will live on io thread, move all the objects currently maintained by url request getter qt to newly created class. Fix destruction order and remove references to browser context from resource context. Compared to url request getter, profile io data is not ref counted class and uses weak pointer factory to handle all "generate" requests. Task-number: QTBUG-67865 Change-Id: Iee4fec854eda1c1600d26e991657d4877cbc966f Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Rename BrowserContextQt to ProfileQtMichal Klocek2018-05-251-4/+4
| | | | | | | | | | | | Following commits are going to introduce ProfileIODataQt and to keep things self documented just rename the class so it reflects Chromium one. Fix minor style issues in profile_qt.h Presort include headers as requested on review. Change-Id: If58f5aec8ac64cfaf30642195838a77497b75244 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Track BrowserContextAdapter in WebEngineContextMichal Klocek2018-05-231-12/+7
| | | | | | | | Instead of keeping BrowserContextAdapter as a child of global object add them to the list kept by WebEngineContext. Change-Id: I626ca6ff6dec3eb76530e3cfb6d589cb961a5795 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Change BrowserContextAdapter to be QPointerMichal Klocek2018-05-181-10/+5
| | | | | | | | | | | | | | | | | | | BrowserContextAdapter is living and accessed only in UI thread, remove QSharedPointer usage and change QWebengineProfile to use QPointer. Prevent BrowserContextAdapter outliving WebEngineContext by setting globalObject as a parent to track WebEngineContext destruction. This commits tries to simplify the life cycle handling of browser context, it removes profile shutdown methods and QWebEngineBrowserContext, which was used to track profile destruction. Task-number: QTBUG-62147 Change-Id: I79f2c38a123cd053e3a59f4900afbdc759a396fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Cleanup file locationsAllan Sandfeld Jensen2018-03-201-2/+2
| | | | | | | | Move printing and network specific classes to subdirectories so we have fewer files in the main dir. Change-Id: I675b1b8b8fd1588061104cec181087f305b44f98 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Allow disabling cache of off-the-record profilesAllan Sandfeld Jensen2018-02-151-0/+2
| | | | | Change-Id: Ib319f46465e9f330ef5f2c7a5b2f6a3d50c33c00 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix AssertBrowserContextWasntDestroyed DCHECKJüri Valdmann2018-02-131-0/+14
| | | | | | | | Triggered sometimes in tst_qwebenginedownloads if the memory allocator reuses memory for a BrowserContextQt. Change-Id: Idb2db94cf0a8419dc45c25620708f3f3da8f9ec8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-121-1/+1
|\ | | | | | | Change-Id: If971fbfcb158c921e2328dfcdef3bd3322f30c4b
| * Merge remote-tracking branch 'origin/5.9' into 5.10.1Michael Brüning2018-02-051-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/core/web_engine_context.cpp Change-Id: I004994a0ab6dbc54370b6973de1816cd673154c6
| | * Shutdown storage in browser context adapter destructorMichal Klocek2018-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Shutdown storage should take place in destructor, otherwise it might get recreated on web content destruction. Task-number: QTBUG-66081 Change-Id: Ibba3fce50e05e09131cf45061320a9f99267babd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Add checks for offTheRecord profileMichal Klocek2018-02-121-12/+16
|/ / | | | | | | | | | | | | | | | | If user creates offTheRecord profile but later uses any of the api calls to change storage location will couse undesired effect of regenerating storage information. Change-Id: Iac34c697881ba7761033130a7b2a4002b6a0d6bd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2018-01-081-2/+12
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/api/qwebengineurlrequestjob.cpp src/core/browser_context_adapter.cpp src/core/renderer/user_resource_controller.cpp src/core/web_engine_context.cpp src/webenginewidgets/api/qwebenginepage.cpp Change-Id: I5278e5e22e1776d42975fc94d70ff8ca4f81fb9a
| * Fix access after free on shutdownAllan Sandfeld Jensen2018-01-051-2/+12
| | | | | | | | | | | | | | | | | | | | After we keep around the browser-context after the profile is deleted it was keeping pointers to deleted objects and would sometimes use them on shutdown. Change-Id: Ib67d0ee0b27cb1a1b64d9b8b4c348ed418b9bbc3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Use BrowsingDataRemover to clear HTTP cacheSzabolcs David2017-12-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | This is a more convenient solution to remove cache instead of going down to the current cache backend and dooming its entries manually. It also fixes WebCacheManager and behavior of clearHttpCache() API on http://refreshyourcache.com/en/cache-test/ example. Task-number: QTBUG-63606 Change-Id: I43e5d6eb53aff66ed1b23caa2868ccfc0f4ebce1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Implement pause and resume action in Download ItemsAllan Sandfeld Jensen2017-06-231-0/+10
|/ | | | | | | | | Adds the ability to pause downloads, and resume paused or interrupted downloads. Task-number: QTBUG-56840 Change-Id: I018bd30c3a772a36d48e4154d94f69cb8d8319e4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix crash on exit with url-request interceptorsAllan Sandfeld Jensen2017-05-081-0/+2
| | | | | | | | | | If the interceptor is the child of the profile, they will be deleted with the API profile which is before the underlying browser-context, they should therefore be unset from the browser context first. Task-number: QTBUG-60236 Change-Id: I2954e8106863b8b421ef166f6bf8fa79240c95ee Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix spellcheck feature checkAllan Sandfeld Jensen2017-04-041-4/+4
| | | | | | | | | Was changed to generated buildflag headers instead of command line defines. Task-number: QTBUG-59687 Change-Id: Iead64f5321d000c07172ee27a0032394527ec501 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Rename WebCoreVisitedLinksManager to VisitedLinksManagerQtAllan Sandfeld Jensen2017-03-261-3/+3
| | | | | | | | Rename to follow our standard naming. This class was one of our oldest and probably predates our standard naming convention. Change-Id: I32dfbad9611b789ad13114d9692b07045806f7c0 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Simple adaptations to Chromium 55Allan Sandfeld Jensen2017-03-011-0/+1
| | | | | | | The simplest adaptations to API and build changes in Chromium 55 Change-Id: I923fa188690a04902492317807f72f006bcab9c6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update spellcheck api to support multiple languagesMichal Klocek2016-10-291-5/+5
| | | | | | Task-number: QTBUG-56074 Change-Id: I2a66e91dd4ed1026e5ab2539cfd3f9094263b48c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Cleanup directory structureAllan Sandfeld Jensen2016-09-271-1/+2
| | | | | | | | | | | | | The src/core/renderer directory is meant to contain files that would be in the renderer process and the chrome/renderer subdirectory in chromium, but a few classes from the browser process and the renderer_host dir has snuck in. This patch cleans up the structure so that classes in the browser that serves as host classes for renderer classes goes in renderer_host. Change-Id: I9333b1322e2246d4da9b4e8cfe6be604f6d996bf Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Make UserPrefs available without spell-checkingAllan Sandfeld Jensen2016-08-051-8/+1
| | | | | | | | Autofill and other components also need user preferences, so make it included by default. Change-Id: Id63241b2239451456ca8a8e1cd9771df4d48b8b8 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-051-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also blacklist tst_QWebEnginePage::comboBoxPopupPositionAfterChildMove() and comboBoxPopupPositionAfterMove(). Conflicts: .qmake.conf src/3rdparty src/core/render_widget_host_view_qt.cpp src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-platform-notes.qdoc src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h tests/auto/widgets/qwebenginepage/BLACKLIST tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp tools/qmake/mkspecs/features/functions.prf Task-number: QTBUG-55158 Change-Id: I1d73ac9b3ca5293ad3c7e3a56f4c395da930e6f4
| * Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-08-021-0/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/resources/resources.gyp src/webengine/doc/src/qtwebengine-overview.qdoc src/webenginewidgets/api/qwebenginepage.cpp src/webenginewidgets/api/qwebenginescriptcollection.cpp src/webenginewidgets/api/qwebenginescriptcollection_p.h tests/auto/widgets/qwebenginepage/BLACKLIST And readded newly in 5.6 enabled tests to the BLACKLIST. Change-Id: I4ab1fc54ebfaaf940df81b0d8d6bdd15cae8b7c4
| | * Add persistent backend to channel id serviceAllan Sandfeld Jensen2016-07-191-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Channel-ids are only supposed to be memory only when running in off the record profiles. We have just never initialized the sql-based backend. We follow the cookie-settings, because channel-ids are used together with cookies, have similar implications, and newer Chromium versions will assert that cookie-store and channel-id store have matching storage models. Change-Id: I0a64146f0ed36a8913706bfc3fcadd7404894745 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | | Add back spellchecking supportMichal Klocek2016-07-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit: * d364c05de52f9ab39034e56cac4e0a7981dc541d * e507f140b70f464fb970d2f94357ac588dcc4f03 Moreover it fixes shut down of keyed services, updates versioning of and fixes spellcheck unit test context menu request, which otherwise fails on windows. Change-Id: I9bfc589544cb969abd6d2d7af69531b4c5c907b7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Initialize browser contextAllan Sandfeld Jensen2016-06-011-0/+5
|/ / | | | | | | | | | | | | Browser contexts must now be initialized and registered with Mojo. Change-Id: Id33026bd6d0ce2d63eafe7007bf527a6dc26191d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-201-5/+14
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/browser_context_adapter.cpp src/core/web_contents_adapter.cpp tests/auto/widgets/qwebenginepage/BLACKLIST Change-Id: I45ee0a33f6316f585555d58fede8072fe514aecf
| * Fix CXX :visited selectorIlia Kirianovskii2016-05-131-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes highlighting of visited links and now Acid3 test completely works (100 of 100). The reason is that VisitedLinkMaster must be initialized before a new RenderView will be created. Otherwise, it will not handle content::NOTIFICATION_RENDERER_PROCESS_CREATED event and therefore VisitedLinkSlave will be left uninitialized (salt_ is zero). Because of this reason CSS :visited selector was broken and didn't work. Change-Id: I769cd5dbae2ffb95fd128df634a54e562b9cc91d Reviewed-by: Ilia Kirianovskii <ilia.kirianovskii@lgepartner.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-05-091-0/+2
|\| | | | | | | Change-Id: I2843a633721212850db77c772caf24e0ea82b450
| * Fix threading issues with URLRequestContextAllan Sandfeld Jensen2016-05-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | URLRequestContextGetterQt contains data which is shared between UI and IO thread. Make the class more thread friendly by making copies of the data that can be accessed from the IO thread, and protect synchronization with a full mutex instead of atomics. Also fixes circular reference between URLRequestContextGetterQt and BrowserContextAdapter. Task-number: QTBUG-50160 Task-number: QTBUG-52509 Change-Id: Idaba211533cfad229e1d1872cdfdf4e7dffeb3d8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Remove availableDictionaries from spellcheck apiMichal Klocek2016-05-041-9/+0
| | | | | | | | | | | | | | | | | | | | | | This method is broken, since SpellcheckerService is lazily initialized and dictionaries might be not loaded yet. Moreover there is a missing implementation on mac. Instead log warning when SpellcheckService can not load dictionary. Change-Id: Ifa2e769d83307543fa6cdf529475e9ab980022f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-251-2/+27
|\| | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Do not access browser-context to read user-agent or accept languageAllan Sandfeld Jensen2016-04-211-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Switches HttpUserAgentSettingsQt to reading local string that lives on the IO thread, instead of accessing a pointer that may be deleted. Also adds a test and fixes updating accept-language of already initialized WebContents. Change-Id: Iff4e3bd1ac40482a92bed50c3f703ed8b974b0ad Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
| * Remove direct access BrowserContextAdapter's customUrlSchemeHandlersAllan Sandfeld Jensen2016-04-201-5/+6
| | | | | | | | | | | | | | | | Remove the non-const reference access to customUrlSchemeHandlers, and replace the last remaining use-case with clearCustomUrlSchemeHandlers. Change-Id: If9077e3900593d7f9520fb9bbcef2f1aa3307eac Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Improve thread-safety of custom scheme handlersAllan Sandfeld Jensen2016-04-201-0/+10
| | | | | | | | | | | | | | | | | | Avoids accessing the QWebEngineUrlSchemeHandler from any other thread than the UI thread, since it may be deleted at any time on the UI thread. Change-Id: Icb4331b3c36f6f619a9fd975d155a9fd608dc5e9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Switch BrowserContextAdapter to QSharedPointerAllan Sandfeld Jensen2016-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | BrowserContextAdapter is not a form of shared data, and using QExplicitSharedDataPointer on it as always been a misuse of the class. Instead we should switch it to QSharedPointer, which also allows us to use QWeakPointer. Change-Id: I8eb489b4a12d3fdddcde55821be294814a156a9d Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Update spellchecker APIsMichal Klocek2016-04-181-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * marks new properties in QQuickWebEngineProfile as FINAL * removes QT_NO_SPELLCHECK from API headers * renames spellCheckLanguages() to availableDictionaries() * removes "togle spellcheck" methods and actions * use WEBENGINE_CONFIG instead of CONFIG for disable the feature at compile time: WEBENGINE_CONFIG+=no_spellcheck Done-With: Peter Varga <pvarga@inf.u-szeged.hu> Task-number: QTBUG-52371 Change-Id: I8c8eff497b9e7afe0cec2edc97dec248151487f2 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-04-111-2/+12
|\| | | | | | | Change-Id: I53645ee5405b1c43807123fd3c196e314cfd1ce9
| * Implement CheckMediaAccessPermissionAllan Sandfeld Jensen2016-04-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | Fixes access of label of MediaStream tracks Also fixes the logged error: WebContentsDelegate::CheckMediaAccessPermission: Not supported. Change-Id: I3fee9ccd9e8b2e5cbd6b707336cc61425a44ba31 Task-number: QTBUG-52216 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Fix typo in the folder name of the cookiesSzabolcs David2016-04-031-2/+7
| | | | | | | | | | Change-Id: I9e1acaa0dbd31978730dae33ebb517f467f8df49 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Rename UserScriptController/Host to UserResourceController/HostSzabolcs David2016-02-101-5/+5
| | | | | | | | | | | | | | These classes can operate user stylesheets too. Change-Id: Ia283af92e52a822b26003ff65e0e7dc391b0904d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-02-041-1/+1
|\| | | | | | | Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0