summaryrefslogtreecommitdiffstats
path: root/components/nacl/loader/nacl_helper_linux.h
blob: 644e26bd71b6da5128ab1db7bee572e81a37b430 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2013 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 COMPONENTS_NACL_LOADER_NACL_HELPER_LINUX_H_
#define COMPONENTS_NACL_LOADER_NACL_HELPER_LINUX_H_

namespace nacl {

// A mini-zygote specifically for Native Client. This file defines
// constants used to implement communication between the nacl_helper
// process and the Chrome zygote.

#define kNaClMaxIPCMessageLength 2048

// Used by Helper to tell Zygote it has started successfully.
#define kNaClHelperStartupAck "NACLHELPER_OK"

enum NaClZygoteIPCCommand {
  kNaClForkRequest,
  kNaClGetTerminationStatusRequest,
};

// The next set of constants define global Linux file descriptors.
// For communications between NaCl loader and browser.
// See also content/common/zygote_main_linux.cc and
// http://code.google.com/p/chromium/wiki/LinuxZygote

// For communications between NaCl loader and zygote.
#define kNaClZygoteDescriptor 3

} // namespace nacl

#endif  // COMPONENTS_NACL_LOADER_NACL_HELPER_LINUX_H_