Chromium Code Reviews| Index: chrome/common/nacl_fork_delegate_linux.h |
| diff --git a/chrome/common/nacl_fork_delegate_linux.h b/chrome/common/nacl_fork_delegate_linux.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c9e6f32fa0b901e223c3c1dd9f5bd257b06434dd |
| --- /dev/null |
| +++ b/chrome/common/nacl_fork_delegate_linux.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_COMMON_NACL_FORK_DELEGATE_LINUX_H_ |
| +#define CHROME_COMMON_NACL_FORK_DELEGATE_LINUX_H_ |
| +#pragma once |
| + |
| +#include "base/basictypes.h" |
| +#include "content/common/zygote_fork_delegate_linux.h" |
| + |
| +class NaClForkDelegate : public ZygoteForkDelegate { |
|
Evan Martin
2011/06/24 18:57:33
Needs file-level comments describing what this is.
Brad Chen
2011/06/25 22:14:51
Done.
|
| + public: |
| + // The NaClForkDelegate is created during Chrome linux zygote |
| + // initialization, and provides "fork()" functionality with |
| + // NaCl specific process characteristics (specifically address |
| + // space layout) as an alternative to forking the zygote. |
| + // A new delegate is passed in as an argument to ZygoteMain(). |
| + NaClForkDelegate(); |
| + ~NaClForkDelegate(); |
| + |
| + virtual void Init(const bool sandboxed, |
|
Evan Martin
2011/06/24 18:57:33
Please use OVERRIDE on virtual methods that you ar
Brad Chen
2011/06/25 22:14:51
Done.
|
| + const int browserdesc, |
| + const int sandboxdesc); |
| + virtual bool CanHelp(const std::string& process_type); |
| + virtual pid_t Fork(const std::vector<int>& fds); |
| + virtual bool AckChild(const int fd, const std::string& channel_switch); |
| + |
| + private: |
| + bool sandboxed_; |
| + int fd_; |
| + pid_t pid_; |
| +}; |
| + |
| +#endif // CHROME_COMMON_NACL_FORK_DELEGATE_LINUX_H_ |