diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-04-16 13:20:04 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-04-20 09:44:53 +0200 |
commit | a05bb73747620dd8f0294a57ff690a4f4202884e (patch) | |
tree | fcbdd58b8b03b8233035699aaf6b4d4498f89c8e /src/core/web_contents_adapter.cpp | |
parent | 41e8f7046949b7418c6780e342ddc0c2d4bbd026 (diff) |
Move request interceptor to ui thread
We use now network service avoid io-ui-io-ui hops,
pipe proxying url loader factory directly to ui thread.
This solves thread safty issues.
Add deprecated request interceptor test cases.
Task-number: QTBUG-83082
Task-number: QTBUG-82999
Change-Id: I38778cf1a70789c5e92e04c93d1c93e2cc4c765a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index a97db169b..2d559bb38 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -1014,6 +1014,16 @@ ProfileAdapter* WebContentsAdapter::profileAdapter() static_cast<ProfileQt*>(m_webContents->GetBrowserContext())->profileAdapter() : nullptr; } +void WebContentsAdapter::setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor) +{ + m_requestInterceptor = interceptor; +} + +QWebEngineUrlRequestInterceptor* WebContentsAdapter::requestInterceptor() const +{ + return m_requestInterceptor; +} + #ifndef QT_NO_ACCESSIBILITY QAccessibleInterface *WebContentsAdapter::browserAccessible() { |