summaryrefslogtreecommitdiffstats
path: root/src/core/api
Commit message (Collapse)AuthorAgeFilesLines
...
* Change QWebEngineUrlRequestInterceptor::interceptRequest to void.Michael Bruning2015-12-024-1/+13
| | | | | | | | Now uses a flag in QWebEngineUrlRequestInfoPrivate to store if the interceptor actually changed the request. Change-Id: Idccbd1c15696e577ee69248e53b75ba6ec1c571c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Doc: edit QWebEngineCookieStoreClient::FilterRequest docsLeena Miettinen2015-12-021-7/+18
| | | | | | | | | - Add \brief commands. - Each \variable command needs to be in a separate help topic. - Edit the language Change-Id: Iac9b57ceaca5d3decce83305b8d3d39d54eb09dd Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add core-private dependency to core_api.proJoerg Bornemann2015-12-011-1/+1
| | | | | | | | We want to use private QtCore API in later commits. Change-Id: If006d9bfd503cdb21b3adf164c0ebf2aa8967bac Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Remove superfluous destructor from QWebEngineCookieStorePrivateJoerg Bornemann2015-12-012-6/+0
| | | | | | Change-Id: I449f4c19b256373b78fa4585c14d06dbc8bc7276 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Rename QWebEngineCookieStoreClient to QWebEngineCookieStoreMichal Klocek2015-12-014-76/+76
| | | | | Change-Id: I8f9a4c5c155a65ede24908799218fd867db0767c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Remove the empty virtual destructor from QWebEngineUrlRequestInterceptor.Michael Bruning2015-12-011-3/+0
| | | | | Change-Id: Ia7bcdcfd7db7120e6d9e5f46842501ec0f613f18 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Rename url scheme handler's destroyed signalAllan Sandfeld Jensen2015-12-012-2/+4
| | | | | | | | Make the signal distinct from the QObject destroyed signal and make sure it is not documented and follows private signal naming. Change-Id: If10a6e7fcee5e9ea4d3ed12ddb8e6ff3f1170adc Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Replace QList with QVectorKai Koehne2015-11-061-3/+2
| | | | | | | | Replace QList with QVector in all places where the type isn't a pointer, and is not already (indirectly) exposed through public API. Change-Id: I90e3db56bf9ebda6b3cb8fb4396d2ae283159727 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Properly mark value based classesKai Koehne2015-11-023-1/+16
| | | | | | | Change-Id: I937ce0daf2fa73d7179a5f62585abfb1acea7264 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove left-overs of QWebEngineUrlSchemeHandlerPrivateAllan Sandfeld Jensen2015-10-282-4/+0
| | | | | | | | The class no longer exists, these appears to have been overlooked when it was removed. Change-Id: I0f3632ac075f8e59bdb40b4178094fbb2cb348e4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Remove const from QWebEngineCookieStoreClient::FilterRequest in ↵David Rosca2015-10-233-4/+4
| | | | | | | | | | setCookieFilter callback FilterRequest can be rejected by changing FilterRequest::accepted to false, so it should not be const. Change-Id: I87cd0f97dd442c6676aeeda9e1cbeb582eb06741 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Do not require to subclass/install QWebEngineCookieStoreClientKai Koehne2015-10-194-18/+64
| | | | | | | | | 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-164-90/+4
| | | | | | | | | 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 private API warning from qwebengineurlrequestjob.hKai Koehne2015-10-121-11/+0
| | | | | Change-Id: Ie2c9e3ac60790e49a449c473cd9fb60ef698b6de Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Add firstPartyUrl to QWebEngineUrlRequestInfoDavid Rosca2015-10-123-1/+16
| | | | | | | | Add firstPartyUrl that can be used to identify third-party requests. Change-Id: I2b8e48ff0a1a4402af224c80f91d4e599a61a89c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Doc: add missing parameter name to function signature in docsLeena Miettinen2015-10-091-2/+2
| | | | | | | | ...to fix a QDoc error. Change-Id: Id074b1e43fd1739a6dddd77b922b2483d0879727 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Doc: edit QWebEngineUrlSchemeHandler docsLeena Miettinen2015-10-061-2/+11
| | | | | | | | | - Add missing docs - Edit for grammar Change-Id: I407818d66f17a354cf3f5051bed5a648bc807424 Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Doc: edit QWebEngineUrlRequestJob docsLeena Miettinen2015-10-061-9/+29
| | | | | | | | | - Add docs for the Error enum - Fix incorrect argument name - Edit for grammar Change-Id: I6c4364eb0a4dd52e38eaf1cde46aec4ddff99532 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Remove unnecessay delegation over CustomUrlSchemeHandlerAllan Sandfeld Jensen2015-10-064-32/+14
| | | | | | | | | | | 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>
* Fix assert on deleting installed custom URL scheme handlerAllan Sandfeld Jensen2015-09-302-0/+4
| | | | | | | | | | When the QObject::destroyed signal is emitted the inherited class parts have already been destroyed and thus it is no longer a QWebEngineUrlSchemeHandler and qobject_cast will return 0, which is asserted against. Change-Id: I7130c60a26088067930499a30e0081ed297a92d9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* fix debug_and_release build on WindowsJoerg Bornemann2015-09-241-0/+8
| | | | | | | | | | | | | | | | | | | | The public API symbols are compiled in a static library that's linked to core with --whole-archive when using gcc. There's no equivalent for this in MSVC. We hacked around this limitation in commit 38944be4 by creating a source file that includes every public header. Unfortunately this breaks debug_and_release builds, because we must inject this generated source file as absolute path, and gyp will generate the same object file for every source file that's specified with an absolute path... This reverts commit 38944be4 and replaces the work-around by simulating -whole-archive on MSVC. This is done by passing all object files that belong to qtwebenginecoreapi.lib to the linker via a response file that is created when building qtwebenginecoreapi.lib. Task-number: QTBUG-48376 Change-Id: Iaa991fe96a2c336d982d29d6924ce950c0be5398 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Disambiguate debug and release builds of libqtwebenginecoreapiKai Koehne2015-09-171-1/+1
| | | | | | | | | | Though the destination directory for a debug and a release build differ, the static library is still intermediately placed in a common directory. This patch adds a unique suffix to the library name to avoid clashes. Task-number: QTBUG-48287 Change-Id: I299704529539d0b7ed9aaf1df06245ae1c3ce363 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove cookie_monster_delegate_qt.h from private headerJoerg Bornemann2015-09-102-1/+6
| | | | | | | Otherwise we cannot include qwebenginecookiestoreclient_p.h in tests. Change-Id: I1c45a097cfb81f29e71d0d954919541ccad0b64b Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* Make request job and request info methods consistentAllan Sandfeld Jensen2015-09-064-19/+29
| | | | | | | | | | Changes the method names so the two request representation uses the same method name and the same style of naming of actions on the requests. Change-Id: I409ed1a5f6ac0835878f65ee978b6f224e42aa20 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add invokable to QQuickWebEngineProfile to set cookie clientAndras Becsi2015-08-281-0/+2
| | | | | | | | | This makes it possible to set a cookie client in the C++ part of a QtQuick application to receive notifications about cookies. Add setting for blocking third party cookies to quicktestbrowser. Change-Id: I627eaab067e92a7be5b36ffed68794e54c7be0e8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Move custom URL scheme handlers to coreAllan Sandfeld Jensen2015-08-276-2/+466
| | | | | | | | 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>
* Add support for blocking cookiesAndras Becsi2015-08-273-0/+27
| | | | | | | | | This patch adds acceptCookie virtual function that is called when a request wants to set a new cookie and can be overridden to intercept or block these cookies. Change-Id: I8b932d4176ffc3c0ac48b1656486d5492cabaefd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Consistenly use Q_DISABLE_COPY in public APIKai Koehne2015-08-262-1/+2
| | | | | | | Improves error messages for people trying to copy ... Change-Id: If95e33058ebff46ab39164ba6226b3396b6aef15 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add documentation for cookie API and request interception in coreAndras Becsi2015-08-202-0/+235
| | | | | | Change-Id: I6908ff3da9e0c78c3cf3d9b27d6c532029423d24 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Fix #include's in public headersKai Koehne2015-08-044-14/+14
| | | | | | | | | | | Uniformly use the <Module/class.h> style, like https://wiki.qt.io/Coding_Conventions mandates. Change-Id: I4c05599fa689f375158fd3b0a54aada8571e5c59 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add API for intercepting url requestsAndras Becsi2015-08-035-0/+387
| | | | | | | | | | | | | | 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>
* Add support for batch tasks to the cookie clientAndras Becsi2015-07-084-0/+122
| | | | | | | | | | This patch adds support for deleteSessionCookies, deleteAllCookies and getAllCookies to make these features directly accessible without the need of subclassing QWebEngineCookieStoreClient and having to implement a less efficient equivalent. Change-Id: I6645bee7fcef38d00dccfaa81f4e9ada86c491df Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Remove onloaded signal from Cookie APIAllan Sandfeld Jensen2015-07-013-8/+0
| | | | | | | | This callback is no longer available from Chromium, and was not very important to the API in the first place. Change-Id: If65509380f2c27053cb4c04801b4e50694440d6a Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add QWebEngineCookieStoreClient core APIAndras Becsi2015-06-166-3/+344
| | | | | | | | | | | | | | | | | 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>
* Move QWebEngineCallback to core API and templatize CallbackDirectoryAndras Becsi2015-06-083-0/+307
| | | | | | | | | | | This undocumented helper template will also be utilized by the core API since Chromium's content API heavily relies on callbacks. To make the internal CallbackDirectory easily extendable with new types, templatize its callback registration and dispatching functions to be able to replace its type switches and the internal union. Change-Id: I3f636fef48973ac95253f1c1bd396550286e571e Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Add public QtWebEngineCore C++ APIAndras Becsi2015-06-084-0/+146
This patch introduces a new public C++ API layer in preparation to make it possible to integrate with lower level Chromium features related mostly to networking operations like accessing and blocking cookies, custom request headers, etc. This API layer can be used both by Qt Widgets and Qt Quick applications with a small C++ core. It should contatain API to access features that usually run on the IO thread to make it possible to perform heavy tasks that would otherwise require costly context switches to the UI thread. Furthermore for these features a QML API does either not make sense, since they are non-UI-related, or a QML API is simply not feasible, because the API is meant for advanced usecases like web browser development (i.e. custom protocol handlers, network traffic interception cookie syncing, etc.). In the long term this layer could also make it possible to reduce code duplication in the widgets and quick layers by moving common parts to the core layer. The new API is built entirely by qmake as a separate static library which is then linked into the QtWebEngineCore library built by gyp and ninja, to prevent the build options passed to Chromium to break the API layer. As a first step this only contains the global headers for core. Change-Id: Iccf8544587cde7c0d9c6abd462e4766bf9ec81ae Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>