summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_context_getter_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch '5.5' into 5.6Allan Sandfeld Jensen2015-08-181-6/+24
|\| | | | | | | Change-Id: I9977663123560a22f493b8c02d02de8897b38666
| * Use v8 backend for proxy resolutionKai Koehne2015-07-231-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the v8 proxy resolution backend instead of the native one in the multi-process case. This fixes a particular issue on windows where the winhttp one will attempt to find proxy servers for every single request: https://crbug.com/40797 . Chrome uses the v8 backend too. Resort to the native backend though if started with --single-process. This is because the Chromium renderer and the V8 ProxyResolver can't run in the same process. See also proxy_resolver_v8.h: // It is important that *ALL* instances of V8 in the process be using // v8::Locker. If not there can be race conditions between the non-locked V8 // instances and the locked V8 instances used by ProxyResolverV8 (assuming they // run on different threads). // // This is the case with the V8 instance used by chromium's renderer -- it runs // on a different thread from ProxyResolver (renderer thread vs PAC thread), // and does not use locking since it expects to be alone. Task-number: QTBUG-44763 Change-Id: I7b48cb9d0f3c41fdddffc9eb9f51d83442d80622 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | add API to set the Accept-Language HTTP request-header fieldJoerg Bornemann2015-08-041-2/+21
| | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 cookie API testsAndras Becsi2015-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tests the part of the cookie API that can be tested locally. The notification about third-party cookies (acceptCookieFromUrl) can not be tested locally since it requires cookies to be set from a different domain than the main frame, which requires a remote host or a local web server with support for virtual DNS. Testing requires the ability to set cookies for local pages loaded through the qrc scheme. We could eventually extend this in the future to enable setting cookies on registered custom schemes, but for that we might have to implement our own cookie store. Since Chromium's cookie store relies on source url's to manage cookies and qrc:// cookies do not specify a domain, a specific source url is needed to be able to delete an individual cookie that has been set by a page loaded through qrc://. This patch requires a new function on QNetworkCookie to be able to forward the source url of the cookie to Chromium. Change-Id: I97dd04b27fbb8ec63060f9b741ad65c29a773a6c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Other changes for Chromium 44Allan Sandfeld Jensen2015-07-011-3/+2
| | | | | | | | | | | | | | Minor changes for Chromium 44 that didn't fit in anywhere else. Change-Id: I569422239acd077e33e1878a1d5dc7afeac0bea6 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Fix ProxyResolverQt for Chromium 44Allan Sandfeld Jensen2015-06-231-3/+4
| | | | | | | | | | | | | | | | | | We now have to construct the proxy service using a proxy resolver factory. Change-Id: Id5c7957165f997c4a7f05d24d77b4ae68efd5a62 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* | Add QWebEngineCookieStoreClient core APIAndras Becsi2015-06-161-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Introduce ProxyResolverQtPierre Rossi2015-06-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | This allows using QtNetwork's proxy auto conf detection code from QNetworkProxyFactory, by setting the QTWEBENGINE_USE_QT_PROXYRESOLVER environment variable. Otherwise, we still rely on chromium's implementation. Task-number: QTBUG-45376 Change-Id: I7b8b77c932060ad36090d388d616b713d93cad0a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Support QNetworkProxy::applicationProxyPierre Rossi2015-05-291-2/+3
|/ | | | | | | | | Implement a ProxyConfigService that keeps track of the state of Qt's application proxy which, if set, takes precedence over the system settings. Change-Id: I7f1eba9015b70cf90f53a41736dd0a6d0ad28489 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Fix crash when updating a storage context with active requestsAllan Sandfeld Jensen2015-05-061-0/+12
| | | | | | | | | | Requests keep pointers to objects owneded by the storage context such as the SSL context handler and HTTP cache. This means we must stop all requests before destroying the context, otherwise the requests will access deleted data. Change-Id: I67863287b3ffb470c8d84ff6cac143493998a6da Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-0/+4
| | | | | | | | Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Synchronize with QAtomic instead of volatileAllan Sandfeld Jensen2015-02-201-23/+21
| | | | | | | | Replaces the three volatile bool with two atomic ints and an atomic pointer. Change-Id: Iad41aef4952bbf7de77523ffd729bd00ace68ee9 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Fix crashes and ownership issues in Custom URL scheme handlingAllan Sandfeld Jensen2015-02-201-1/+3
| | | | | | | | Fixes crashes exposed by implementing the qthelp protocol handler for Qt assistant. Change-Id: I0b1153bc52ff82838cde009f1fe1ac46edc43210 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Experimental custom URL scheme APIAllan Sandfeld Jensen2015-02-191-0/+6
| | | | | | | | Introduces API for custom URL scheme as an experimental API in widgets. A QML api is not included yet. Change-Id: Ice4542e5238feb961a4c9c60a809455e31dc1ec6 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Update Chromium to version 40.0.2214.28 and ninja to 1.5.3.Zeno Albisser2015-01-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scoped_refptr operator for implicit conversion to pointer has been disabled upstream: https://codereview.chromium.org/510323002 * Group permission API as done upstream: https://codereview.chromium.org/622793002 * content_worker gyp target has been removed upstream. * GetPageThumbnailData moved to DevToolsManagerDelegate. * ui/ui_resources has been renamed to ui/resources * WebPreferences and ResourceType have moved inside content. * Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(): https://codereview.chromium.org/457103003 * Remove obsolete accessibility events. * AX_EVENT_SELECTED_TEXT_CHANGED has been renamed to AX_EVENT_TEXT_SELECTION_CHANGED * AX_ROLE_MATH_ELEMENT was removed upstream. https://codereview.chromium.org/695133002 * Screen::IsDIPEnabled has been removed upstream. https://codereview.chromium.org/672823002 * Update DevToolsHttpHandlerDelegateQt according to ShellDevToolsManagerDelegate. * Various functionality from DevToolsHttpHandler was moved to DevToolsManagerDelegate https://codereview.chromium.org/560323005 * DevToolsHttpHandler::Start expects a scoped_ptr now. * Make sure event_factory_evdev.h is not included when USE_OZONE is not defined * ErrorPageParams was moved into namespace error_page. * Media Access is now handled by ContentBrowserClient::CheckMediaAccessPermission * SpecialStoragePolicy moved to namespace storage * Add implementation for new pure virtual function BrowserContext::GetSSLHostStateDelegate. * RenderPass::Id was renamed to RenderPass::RenderPassId * Include view_messages.h for ViewHostMsg_TextInputState_Param * CERT_UNABLE_TO_CHECK_REVOCATION has been deprecated by Chromium: https://codereview.chromium.org/449743002 * MailboxManager::ConsumeTexture only takes the mailbox as an argument * Replace RWHVQt::TextInputStateChanged with RWHVQt::TextInputTypeChanged. * RenderWidgetHostView::ScrollOffsetChanged has been removed. * SkBitmap::Config was removed upstream. * CopyFromCompositingSurfaceCallback has become an own type. * AcceleratedSurfaceInitialized only takes route_id as an argument. * ServerBoundCertService has been renamed to ChannelIDService. Related API has been renamed accordingly. * TextureImageTransportSurface was removed upstream. * Update MediaCaptureDispatcher::OnMediaRequestStateChanged signature. * AudioStream related functions are gone upstream. https://codereview.chromium.org/569713002 * Add implementation for RenderWidgetHostViewQt::GetLastScrollOffset. * Include generic touch_device implementation. * switches::kDisableDesktopNotifications was removed upstream. https://codereview.chromium.org/607843002 * PageTransition moved to ui. * Messages headers are not guarded. Including them multiple times does hurt. * ScaleGestureDetector does not create a standalone GestureDetector anymore. https://codereview.chromium.org/501503003 * MotionEvent::Cancel and Clone are not virtual anymore. https://codereview.chromium.org/502993004 * Exclude os_exchange_data_provider_mac from build. * Remove argument from ScopedClipboardWriter ctor. https://codereview.chromium.org/558913003 * Remove ShowPopupMenu override from WebContentsQt. The function is not pure virtual anymore, and we never implemented any specifics. * Do not use clang on desktop linux. * Request functions in ContentBrowserClient were merged into RequestPermission. * ninja: use configure.py --bootstrap instead of bootstrap.py Change-Id: I3575612826db7845461a949b4e737264bb4e8d88 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Do not use QDir::separator()Allan Sandfeld Jensen2015-01-071-3/+3
| | | | | | | | Build all paths Qt-style using / separators, and only convert it when converted to Chromium types. Change-Id: I181be6edb903f38e1772bcd324972d1d4e6672fc Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Introduce QWebEngineProfile APIAllan Sandfeld Jensen2014-12-121-108/+196
| | | | | | | | | | | | | | | Introduces initial widgets API for the Chromium BrowserContext. Adds API for controlling cookie jar policy, user-agent string and cache and persistent data paths. Similar QML API will follow in another patch. [ChangeLog][QtWebEngineWidgets][QWebEngineProfile] New API for profiles applying to groups of QWebEnginePages. Change-Id: I3c4ef4053fde7564af29178c91a0aca8a2b61a5f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Use in-memory caches for off-the-record browsingAllan Sandfeld Jensen2014-12-031-16/+32
| | | | | | | | | Off the record should leave no record, which means we should not use disk storage for cookies and cache but instead trigger memory caching. Change-Id: I3e14ed0f91f925bc65675d2e7d9f07eb379a30b0 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Cache to QStandardPaths::CacheLocationAllan Sandfeld Jensen2014-11-071-4/+5
| | | | | | | | | We should save our cache in the configured CacheLocation, and ensure we are prepared for multiple BrowserContext by caching to a Default subdir. This matches how chromium caches on linux. Change-Id: Ibe914fca35435ea1658565be87747cfabc71e97b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-211-15/+10
| | | | | | | Change-Id: Idbe0eafb51d77cc00e3a93179b81770724d5bfaa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Update the QtWebEngineCore library to run on top of Chromium 37Jocelyn Turcotte2014-08-141-7/+8
| | | | | | | | | | | | | | | Most of the patch is about upstream classes/methods that changed. Other important details: - icu data files are now used by default - cygwin is no longer required to build on Windows - RenderFrameHost has been replacing RenderViewHost in a few places, following the separate process iframes support in Chromium - The user agent is accessed through ContentClient::GetUserAgent instead of from the command line switches Change-Id: I86cc93aff7ce31176a80b0b4a5d54025674a451c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix Google Maps not showing tiles when panning/zoomingJocelyn Turcotte2014-05-091-6/+12
| | | | | | | | | | | | The issue is that the web worker that fetches and pre-process the map tiles couldn't be started successfully from a Blob. We were missing the blob: scheme handler that was passed to us in the ignored protocol_handlers argument of BrowserContextQt::CreateRequestContext. Change-Id: I24b726a1577e7092d53b1821efd3e4aa2a66c7d9 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Adapt to API changes in new stable branch 1750Andras Becsi2014-03-281-3/+4
| | | | | | Change-Id: If0cc263f36d396fd505c1d8b026e2493bfc29cc4 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Adapt to chromium API changes in refs/branch-heads/1650Andras Becsi2013-12-201-2/+5
| | | | | | | This patch also updates src/3rparty to the new snapshot. Change-Id: I56da8d795051a828d7b375e57c4dda8bc570229f Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Add ftp protocol handler.Xiao Zhang2013-12-101-0/+4
| | | | | Change-Id: Ib5ec11a23d609414f609969dbb2933d83eb6e3bd Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add qrc protocol handler.Xiao Zhang2013-12-061-0/+4
| | | | | | | | | | Support qrc resources in html. For example: <script type="text/javascript" src="qrc:///xx.js"></script> <image src="qrc:///xx.png"></image> Change-Id: I490efb7cc300bf894659e79948b65729a12ad73d Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Moving sources to src part 1: Move files.Jocelyn Turcotte2013-11-281-0/+172
This only move files without adjusting any paths. This moves: - lib/quick -> src/webengine/api (API files) lib/quick -> src/webengine (other files) This contains the main QtWebEngine module library since <ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>. - lib/widgets -> src/webenginewidgets Also rename this directory to match its module name and rename Api to api. - lib -> src/core - process -> src/process - resources -> src/core/resources - tools/* -> tools/scripts/ The build directory is spread as follow: - build/build.pro -> src/core/gyp_run.pro - build/qmake_extras/* -> src/core/ (for the host and target .pro files) - build/qmake -> tools/qmake - Build related scripts -> tools/buildscripts Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>