Index: content/public/browser/zygote_host_linux.h |
diff --git a/content/public/browser/zygote_host_linux.h b/content/public/browser/zygote_host_linux.h |
index ebe5ee7387fb67dc3e7be5349eb009d9e3a1787b..726a6850da1cc23b7cf2fe6f3c22037ec5527d16 100644 |
--- a/content/public/browser/zygote_host_linux.h |
+++ b/content/public/browser/zygote_host_linux.h |
@@ -7,28 +7,41 @@ |
#include <unistd.h> |
+#include <cstddef> |
+ |
#include "base/process/process.h" |
#include "content/common/content_export.h" |
namespace content { |
+#if defined(OS_LINUX) |
mdempsky
2016/01/15 20:29:42
I think these should go into a new content/public/
Greg K
2016/01/19 19:34:19
Done.
|
+class ZygoteCommunication; |
+using ZygoteHandle = ZygoteCommunication*; |
+#else |
+using ZygoteHandle = std::nullptr_t; |
+#endif |
+ |
// http://code.google.com/p/chromium/wiki/LinuxZygote |
-// The zygote host is the interface, in the browser process, to the zygote |
+// The zygote host is an interface, in the browser process, to the zygote |
// process. |
class ZygoteHost { |
public: |
// Returns the singleton instance. |
CONTENT_EXPORT static ZygoteHost* GetInstance(); |
+ // Allocates and initializes a zygote process, and returns the |
+ // ZygoteHandle used to communicate with it. |
+ CONTENT_EXPORT static ZygoteHandle CreateZygote(); |
+ |
virtual ~ZygoteHost() {} |
// Returns the pid of the Zygote process. |
- virtual pid_t GetPid() const = 0; |
+ virtual bool IsZygotePid(pid_t pid) = 0; |
// Returns an int which is a bitmask of kSandboxLinux* values. Only valid |
// after the first render has been forked. |
- virtual int GetSandboxStatus() const = 0; |
+ virtual int GetRendererSandboxStatus() const = 0; |
// Adjust the OOM score of the given renderer's PID. The allowed |
// range for the score is [0, 1000], where higher values are more |