OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ | 5 #ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ |
6 #define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ | 6 #define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/posix/global_descriptors.h" | 10 #include "base/posix/global_descriptors.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 static const char kZygoteHelloMessage[] = "ZYGOTE_OK"; | 21 static const char kZygoteHelloMessage[] = "ZYGOTE_OK"; |
22 | 22 |
23 // Message sent by zygote children to the browser so the browser can discover | 23 // Message sent by zygote children to the browser so the browser can discover |
24 // the sending child's process ID. | 24 // the sending child's process ID. |
25 static const char kZygoteChildPingMessage[] = "CHILD_PING"; | 25 static const char kZygoteChildPingMessage[] = "CHILD_PING"; |
26 | 26 |
27 // Maximum allowable length for messages sent to the zygote. | 27 // Maximum allowable length for messages sent to the zygote. |
28 const size_t kZygoteMaxMessageLength = 8192; | 28 const size_t kZygoteMaxMessageLength = 8192; |
29 | 29 |
30 // File descriptors initialized by the Zygote Host | 30 // File descriptors initialized by the Zygote Host |
31 const int kZygoteSocketPairFd = | 31 const int kZygoteSocketPairFd = base::GlobalDescriptors::kBaseDescriptor; |
32 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor; | |
33 | 32 |
34 // These are the command codes used on the wire between the browser and the | 33 // These are the command codes used on the wire between the browser and the |
35 // zygote. | 34 // zygote. |
36 enum { | 35 enum { |
37 // Fork off a new renderer. | 36 // Fork off a new renderer. |
38 kZygoteCommandFork = 0, | 37 kZygoteCommandFork = 0, |
39 | 38 |
40 // Reap a renderer child. | 39 // Reap a renderer child. |
41 kZygoteCommandReap = 1, | 40 kZygoteCommandReap = 1, |
42 | 41 |
43 // Check what happened to a child process. | 42 // Check what happened to a child process. |
44 kZygoteCommandGetTerminationStatus = 2, | 43 kZygoteCommandGetTerminationStatus = 2, |
45 | 44 |
46 // Read a bitmask of kSandboxLinux* | 45 // Read a bitmask of kSandboxLinux* |
47 kZygoteCommandGetSandboxStatus = 3, | 46 kZygoteCommandGetSandboxStatus = 3, |
48 | 47 |
49 // Not a real zygote command, but a subcommand used during the zygote fork | 48 // Not a real zygote command, but a subcommand used during the zygote fork |
50 // protocol. Sends the child's PID as seen from the browser process. | 49 // protocol. Sends the child's PID as seen from the browser process. |
51 kZygoteCommandForkRealPID = 4 | 50 kZygoteCommandForkRealPID = 4 |
52 }; | 51 }; |
53 | 52 |
54 } // namespace content | 53 } // namespace content |
55 | 54 |
56 #endif // CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ | 55 #endif // CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ |
OLD | NEW |