ProcessInfo.h 769 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2024, Andrew Kaster <akaster@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Optional.h>
  8. #include <AK/String.h>
  9. #include <AK/Types.h>
  10. #include <LibCore/Platform/ProcessInfo.h>
  11. #if defined(AK_OS_MACH)
  12. # include <LibCore/MachPort.h>
  13. #endif
  14. namespace WebView {
  15. enum class ProcessType {
  16. Chrome,
  17. WebContent,
  18. WebWorker,
  19. SQLServer,
  20. RequestServer,
  21. ImageDecoder,
  22. };
  23. struct ProcessInfo : public Core::Platform::ProcessInfo {
  24. using Core::Platform::ProcessInfo::ProcessInfo;
  25. ProcessInfo(ProcessType type, pid_t pid)
  26. : Core::Platform::ProcessInfo(pid)
  27. , type(type)
  28. {
  29. }
  30. ProcessType type { ProcessType::WebContent };
  31. Optional<String> title;
  32. };
  33. }