blob: 6911787648b8cc0824e107d3bb20918e9a8a2e8a (
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 (c) 2009 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.
// http://code.google.com/p/chromium/wiki/LinuxSandboxIPC
#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
#define CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
#include "base/singleton.h"
// This is a singleton object which handles sandbox requests from the
// renderers.
class RenderSandboxHostLinux {
public:
// Get the file descriptor which renderers should be given in order to signal
// crashes to the browser.
int GetRendererSocket() const { return renderer_socket_; }
pid_t pid() const { return pid_; }
private:
friend struct DefaultSingletonTraits<RenderSandboxHostLinux>;
// This object must be constructed on the main thread.
RenderSandboxHostLinux();
~RenderSandboxHostLinux();
int renderer_socket_;
int childs_lifeline_fd_;
pid_t pid_;
DISALLOW_EVIL_CONSTRUCTORS(RenderSandboxHostLinux);
};
#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_SANDBOX_HOST_LINUX_H_
|