| OLD | NEW | 
| (Empty) |  | 
 |   1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 
 |   2 // Use of this source code is governed by a BSD-style license that can be | 
 |   3 // found in the LICENSE file. | 
 |   4  | 
 |   5 #ifndef CHROME_BROWSER_ZYGOTE_HOST_LINUX_H_ | 
 |   6 #define CHROME_BROWSER_ZYGOTE_HOST_LINUX_H_ | 
 |   7  | 
 |   8 #include <string> | 
 |   9 #include <vector> | 
 |  10  | 
 |  11 #include "base/global_descriptors_posix.h" | 
 |  12 #include "base/singleton.h" | 
 |  13  | 
 |  14 // http://code.google.com/p/chromium/wiki/LinuxZygote | 
 |  15  | 
 |  16 // The zygote host is the interface, in the browser process, to the zygote | 
 |  17 // process. | 
 |  18 class ZygoteHost { | 
 |  19  public: | 
 |  20   ~ZygoteHost(); | 
 |  21  | 
 |  22   pid_t ForkRenderer(const std::vector<std::string>& command_line, | 
 |  23                      const base::GlobalDescriptors::Mapping& mapping); | 
 |  24   void EnsureProcessTerminated(pid_t process); | 
 |  25  | 
 |  26   // These are the command codes used on the wire between the browser and the | 
 |  27   // zygote. | 
 |  28   enum { | 
 |  29     kCmdFork = 0,  // Fork off a new renderer. | 
 |  30     kCmdReap = 1,  // Reap a renderer child. | 
 |  31   }; | 
 |  32  | 
 |  33  private: | 
 |  34   friend struct DefaultSingletonTraits<ZygoteHost>; | 
 |  35   ZygoteHost(); | 
 |  36   void LaunchZygoteProcess(); | 
 |  37  | 
 |  38   int control_fd_;  // the socket to the zygote | 
 |  39 }; | 
 |  40  | 
 |  41 #endif  // CHROME_BROWSER_ZYGOTE_HOST_LINUX_H_ | 
| OLD | NEW |