diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2021-02-05 10:56:48 +0100 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2021-02-09 12:42:43 +0100 |
commit | 78c5516711414ed8fd9b1b473a58b038b4a80279 (patch) | |
tree | 66b54c20a3f0b467897f37d18bd2acaa6a8db909 /src/core/web_engine_context.cpp | |
parent | 95e93830e45f5f10397248a794672ff6a681c8b8 (diff) |
Enable webrtc logging and the corresponding WebUI
The corresponding WebUI is chrome://webrtc-logs
It only makes sense with the hangout services extension. It seems to be
only useable with meet.google.com. The behavior is same for Chrome.
Uploading logs to Google is disabled in the Chromium patch. It is an
extension API functionality. The WebUI only lists the previously
generated logs.
Pulls in the following changes:
1dda5314b02 Enable webrtcLoggingPrivate extension API for hangout extension
7d71aca116d FIXUP: Enable webrtcLoggingPrivate extension API for hangout extension
Change-Id: I455fce7c8081e71967e55ab1f889df6ef91ed253
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 5f3212374..863b46a57 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -52,6 +52,9 @@ #include "base/task/thread_pool/thread_pool_instance.h" #include "base/threading/thread_restrictions.h" #include "cc/base/switches.h" +#if QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions) +#include "chrome/browser/media/webrtc/webrtc_log_uploader.h" +#endif #include "chrome/common/chrome_switches.h" #include "content/gpu/gpu_child_thread.h" #include "content/browser/compositor/surface_utils.h" @@ -356,6 +359,10 @@ void WebEngineContext::destroy() if (m_devtoolsServer) m_devtoolsServer->stop(); +#if QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions) + if (m_webrtcLogUploader) + m_webrtcLogUploader->Shutdown(); +#endif base::MessagePump::Delegate *delegate = static_cast<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl *>( @@ -413,6 +420,10 @@ void WebEngineContext::destroy() // Drop the false reference. m_handle->Release(); + +#if QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions) + m_webrtcLogUploader.reset(); +#endif } WebEngineContext::~WebEngineContext() @@ -841,6 +852,16 @@ printing::PrintJobManager* WebEngineContext::getPrintJobManager() } #endif +#if QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions) +WebRtcLogUploader *WebEngineContext::webRtcLogUploader() +{ + if (!m_webrtcLogUploader) + m_webrtcLogUploader = std::make_unique<WebRtcLogUploader>(); + return m_webrtcLogUploader.get(); +} +#endif + + static QMutex s_spmMutex; QAtomicPointer<gpu::SyncPointManager> WebEngineContext::s_syncPointManager; |