summaryrefslogtreecommitdiffstats
path: root/src/core/browser_context_adapter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Avoid full storage update on installing URL scheme handlersJoerg Bornemann2016-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | When installing/removing URL scheme handlers, do not update the full URLRequestContextStorage. Only update the job factory. This avoids calling the - potentially expensive - generateStorage() method superfluously often. Change-Id: I99c4ec479fcfdee4e97d86b858ea42f3cdccfec4 Task-number: QTBUG-50160 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add spell checker supportMichal Klocek2016-02-011-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrate chromium spell checker: * add spellchecker and dependencies to build * underline misspelled words in html text areas * right-click context menu shows up to 4 options to correct the misspelled word * toggle spell check from context menu * add new qml and widget api calls to qwebengineprofile to enable/disable spell check, select spell check language, get list of supported languages/dictionaries * register new qml spell check properties for QtWebEngine 1.3 * CONFIG+="no_spellcheck" to remove spellcheck support Change-Id: Ie61434ab9493597d7759a6f33794f6859c4e3a4c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-181-9/+9
|\| | | | | | | Change-Id: I038f3544785862f3a2e2f35b8fab0b163e75d542
| * Fix crash in BrowserContextAdapter::removeCustomUrlSchemeHandlerJoerg Bornemann2016-01-151-2/+2
| | | | | | | | | | | | | | | | Do not cache the end iterator, because erase might invalidate it. Do not increment the iterator in the erase case. Change-Id: I1cbad04fdaaf1bf4cfae252bb7569d817b6ab5a5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Fix access of freed dataAllan Sandfeld Jensen2016-01-151-7/+7
| | | | | | | | | | | | | | | | | | The string parts inside the lambda construction were already freed, so instead use a simpler construction where we are sure we are still holding the stringlist. Change-Id: I3559ab9d203b368e2d62efef73497ce7f9135cc5 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Fix access violation error because of access to an invalid QString.Alexandru Croitor2016-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Commit 6ed125c0073288f46e544b9d415d1f9a9968cb2d introduced the usage of QT_USE_QSTRINGBUILDER, which caused an issue in BrowserContextAdapter::httpAcceptLanguageWithoutQualities, incorrectly deducing the return type of the lambda. Fix consists in explicitly setting the return type of the lambda to QString. Change-Id: If3f8992e031838e899d35bcd2f962d051976a8f7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-121-1/+0
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * Implicitly use QStringBuilder in all modulesJoerg Bornemann2016-01-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | Every Qt module is built with QT_USE_QSTRINGBUILDER by default. Also define QT_USE_QSTRINGBUILDER in the core API library. Remove superfluous qstringbuilder.h includes. Keep the use of operator% to make sure that QT_USE_QSTRINGBUILDER won't vanish in future build system changes. Change-Id: I41fd036fc4e6063951cd758aaafdf9aefed7dd5a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add function to clear data from the cacheSzabolcs David2016-01-061-0/+6
|/ | | | | | | | | It marks the entries of the current cache backend for deletion and starts to remove them. Task-number: QTBUG-48177 Change-Id: I85ec25048ff5429976f1b2dcacd74666bdbe6624 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Rename QWebEngineCookieStoreClient to QWebEngineCookieStoreMichal Klocek2015-12-011-4/+4
| | | | | Change-Id: I8f9a4c5c155a65ede24908799218fd867db0767c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Do not require to subclass/install QWebEngineCookieStoreClientKai Koehne2015-10-191-7/+2
| | | | | | | | | The class has only setters and getters, except for the virtual acceptCookie method. By replacing this method with a setCookieFilter callback we can avoid the need of users to subclass the client. Change-Id: Id78c01fc103b8d9cc267594527239b598e8975f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Decouple scheme and url scheme handlerAllan Sandfeld Jensen2015-10-161-2/+28
| | | | | | | | | Remove the scheme from the url scheme handler constructor, this way the same handler can handle multiple schemes, the API look more natural and we can get rid of the private class. Change-Id: I33906b8a5ea51641e28a53f93f4feb1472c24baf Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Remove unnecessay delegation over CustomUrlSchemeHandlerAllan Sandfeld Jensen2015-10-061-4/+3
| | | | | | | | | | | With QWebEngineSchemeHandler in QtWebEngineCore, we do not need the indirection and delegation CustomUrlSchemeHandler provided. This means the class can be removed and we can also store the handlers directly in BrowserContextAdapter and save a copy of the installed handlers in the QWebEngineProfile. Change-Id: Iabb5cc9d364c2f2a879bc77bfb2ff14b3c2ff640 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Remove whitespaces from custom HTTP user agentsSzabolcs David2015-09-291-2/+2
| | | | | | | | | This prevents adding additional headers to the outgoing HTTP request through overridden user agent and unskips userAgentNewlineStripping API test. Change-Id: If9b3a88b0346058a7dc462471637d9777683fe82 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Allan Sandfeld Jensen2015-09-241-0/+7
|\ | | | | | | Change-Id: Ice3d6e88238940a62d75e7c67f63b626285fccb0
| * Fix httpUserAgent setting after the view's initializationSzabolcs David2015-09-241-0/+7
| | | | | | | | | | | | | | | | | | | | Set user agent override on all WebContents of the specific BrowserContext. Task-number: QTBUG-47976 Change-Id: I4fc6f8d79aff6f372ca48d82642b3eab60f933d1 Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Move custom URL scheme handlers to coreAllan Sandfeld Jensen2015-08-271-0/+6
| | | | | | | | | | | | | | | | Makes the custom URL scheme handler API public, and moves it to core so that it may be shared with the QQuickWebEngine API. Change-Id: I745cb088df6f4cd11b1ac7c8c3c76f112032cb38 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | set Accept-Language in content::RendererPreferencesJoerg Bornemann2015-08-241-0/+12
| | | | | | | | | | | | | | This amends commit 2a56ec7ce4713711b55bb1dfc86a4320d943f606. Change-Id: I8103197f08c985557000de36c37ad80e1ceadf24 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | add API to set the Accept-Language HTTP request-header fieldJoerg Bornemann2015-08-041-0/+10
| | | | | | | | | | | | | | | | | | | | Add methods to set the Accept-Language field in QWebEngineProfile and QQuickWebEngineProfile. Task-number: QTBUG-47412 Change-Id: Ifa376bb3551fdc1fb3d68279d734b7f7735782fc Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add API for intercepting url requestsAndras Becsi2015-08-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is adding a QWebEngineUrlRequestInterceptor interface that can be subclassed to observe or intercept all resource requests making it possible to implement browser features like adblocking and setting custom request headers for url requests. The interceptRequest virtual function is executed on the IO thread. This patch also includes a unit test for the testable API parts. Change-Id: Ibe740fc55551a9a5da40794088ccb6d03d913631 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Martin Rotter <rotter.martinos@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Permission Management for Chromium 44Allan Sandfeld Jensen2015-07-011-0/+6
| | | | | | | | | | | | | | Implementing the new PermissionManager API. Change-Id: If0fdac24b8fec561a898aba009345576b5ce7fc6 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add QWebEngineCookieStoreClient core APIAndras Becsi2015-06-161-0/+12
|/ | | | | | | | | | | | | | | | | This class or its subclass can be set on the QWebEngineProfile and its API enables intercepting Chromium's cookies, setting and deleting cookies in the cookie store. These functions are asynchronous so if the result of the task is needed the user can provide a callback which will be run on the calling thread when the requested operation finishes. This does not include a hook for QQuick layer yet, there we have to figure out what the most convenient way is from a developer's perspective. Change-Id: I6a3af071883ce632df7a2fb952da93f306ac3fe2 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Clean up global profiles and ownershipAllan Sandfeld Jensen2015-03-121-5/+9
| | | | | | | | | | | | | This patch removes the unused global off-the-record browser-contexts and changes all browser-contexts to be ref-counted by an API level profile. The API default profiles are now owned by a global QObject and are deleted on exit. Change-Id: Id7c9eafa24829118105f58b66663a6348216823d Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>