Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: chrome/browser/zygote_host_linux.h

Issue 119335: Linux: refactor zygote support (Closed)
Patch Set: ... Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/browser/zygote_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698