ProcessInfo.h 754 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. RequestServer,
  20. ImageDecoder,
  21. };
  22. struct ProcessInfo : public Core::Platform::ProcessInfo {
  23. using Core::Platform::ProcessInfo::ProcessInfo;
  24. ProcessInfo(ProcessType type, pid_t pid)
  25. : Core::Platform::ProcessInfo(pid)
  26. , type(type)
  27. {
  28. }
  29. ProcessType type { ProcessType::WebContent };
  30. Optional<String> title;
  31. };
  32. }