summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context_threads.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-15 17:08:33 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-28 13:32:48 +0100
commit2d002e42a8b6e711e3c9ca5b6dd3611e9d8426ab (patch)
tree2da22e8e37770c245be1f72f1c454a9c798b8db4 /src/core/web_engine_context_threads.cpp
parent4aa1690516fe76630a7cbb4816f56f0da081c596 (diff)
Adaptations for 104-based
Change-Id: Ieb44b5c98b3342adca38916d8b77c54e8ed8e1d7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_engine_context_threads.cpp')
-rw-r--r--src/core/web_engine_context_threads.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/web_engine_context_threads.cpp b/src/core/web_engine_context_threads.cpp
index 2d0f8a90c..5e969fb98 100644
--- a/src/core/web_engine_context_threads.cpp
+++ b/src/core/web_engine_context_threads.cpp
@@ -4,14 +4,14 @@
#include "web_engine_context.h"
#include "base/bind.h"
-#include "base/task/post_task.h"
+#include "base/task/thread_pool.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread_restrictions.h"
#include "content/browser/gpu/gpu_main_thread_factory.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
#include "content/browser/utility_process_host.h"
+#include "content/child/child_process.h"
#include "content/gpu/gpu_child_thread.h"
-#include "content/gpu/gpu_process.h"
#include "content/gpu/in_process_gpu_thread.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
@@ -29,14 +29,14 @@ struct GpuThreadControllerQt : content::GpuThreadController
{
GpuThreadControllerQt(const content::InProcessChildThreadParams &params, const gpu::GpuPreferences &gpuPreferences)
{
- base::PostTask(
- FROM_HERE, { content::BrowserThread::UI },
+ content::GetUIThreadTaskRunner({})->PostTask(
+ FROM_HERE,
base::BindOnce(&GpuThreadControllerQt::createGpuProcess, params, gpuPreferences));
}
~GpuThreadControllerQt() override
{
- base::PostTask(
- FROM_HERE, { content::BrowserThread::UI },
+ content::GetUIThreadTaskRunner({})->PostTask(
+ FROM_HERE,
base::BindOnce(&GpuThreadControllerQt::destroyGpuProcess));
}
@@ -48,7 +48,7 @@ struct GpuThreadControllerQt : content::GpuThreadController
if (s_gpuProcessDestroyed)
return;
- s_gpuProcess = std::make_unique<content::GpuProcess>(base::ThreadPriority::NORMAL);
+ s_gpuProcess = std::make_unique<content::ChildProcess>(base::ThreadPriority::NORMAL);
auto gpuInit = std::make_unique<gpu::GpuInit>();
gpuInit->InitializeInProcess(base::CommandLine::ForCurrentProcess(), gpuPreferences);
auto childThread = new content::GpuChildThread(params, std::move(gpuInit));
@@ -68,11 +68,11 @@ struct GpuThreadControllerQt : content::GpuThreadController
s_gpuProcessDestroyed = true;
}
- static std::unique_ptr<content::GpuProcess> s_gpuProcess;
+ static std::unique_ptr<content::ChildProcess> s_gpuProcess;
static bool s_gpuProcessDestroyed;
};
-std::unique_ptr<content::GpuProcess> GpuThreadControllerQt::s_gpuProcess;
+std::unique_ptr<content::ChildProcess> GpuThreadControllerQt::s_gpuProcess;
bool GpuThreadControllerQt::s_gpuProcessDestroyed = false;
static std::unique_ptr<content::GpuThreadController> createGpuThreadController(