Revert of Integrate SIMD optimisations for zlib (patchset #14 id:280001 of https...
[chromium-blink-merge.git] / content / common / zygote_commands_linux.h
blobca5a1d5f7fac7d052724de3c0a1368cc5f1636fe
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
6 #define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
8 #include "base/posix/global_descriptors.h"
9 #include "ipc/ipc_descriptors.h"
11 namespace content {
13 // Contents of the initial message sent from the zygote to the browser right
14 // after it starts.
15 static const char kZygoteBootMessage[] = "ZYGOTE_BOOT";
17 // Contents of the initial message sent from the zygote to the browser when it
18 // is ready to go.
19 static const char kZygoteHelloMessage[] = "ZYGOTE_OK";
21 // Message sent by zygote children to the browser so the browser can discover
22 // the sending child's process ID.
23 static const char kZygoteChildPingMessage[] = "CHILD_PING";
25 // Maximum allowable length for messages sent to the zygote.
26 const size_t kZygoteMaxMessageLength = 8192;
28 // File descriptors initialized by the Zygote Host
29 const int kZygoteSocketPairFd =
30 kPrimaryIPCChannel + base::GlobalDescriptors::kBaseDescriptor;
32 // These are the command codes used on the wire between the browser and the
33 // zygote.
34 enum {
35 // Fork off a new renderer.
36 kZygoteCommandFork = 0,
38 // Reap a renderer child.
39 kZygoteCommandReap = 1,
41 // Check what happened to a child process.
42 kZygoteCommandGetTerminationStatus = 2,
44 // Read a bitmask of kSandboxLinux*
45 kZygoteCommandGetSandboxStatus = 3,
47 // Not a real zygote command, but a subcommand used during the zygote fork
48 // protocol. Sends the child's PID as seen from the browser process.
49 kZygoteCommandForkRealPID = 4
52 } // namespace content
54 #endif // CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_