ladybird/Userland/Libraries/LibWebView/ProcessInfo.h
Timothy Flynn 2851c05dee LibWebView: Display each tab's title in the Task Manager
This allows us to more easily differentiate between WebContent processes
in the Task Manager at a glance.
2024-04-22 14:46:10 -06:00

43 lines
769 B
C++

/*
* Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Optional.h>
#include <AK/String.h>
#include <AK/Types.h>
#include <LibCore/Platform/ProcessInfo.h>
#if defined(AK_OS_MACH)
# include <LibCore/MachPort.h>
#endif
namespace WebView {
enum class ProcessType {
Chrome,
WebContent,
WebWorker,
SQLServer,
RequestServer,
ImageDecoder,
};
struct ProcessInfo : public Core::Platform::ProcessInfo {
using Core::Platform::ProcessInfo::ProcessInfo;
ProcessInfo(ProcessType type, pid_t pid)
: Core::Platform::ProcessInfo(pid)
, type(type)
{
}
ProcessType type { ProcessType::WebContent };
Optional<String> title;
};
}