1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_sandboxing_SandboxInitialization_h
8 #define mozilla_sandboxing_SandboxInitialization_h
13 } // namespace sandbox
15 // Things that use this file will probably want access to the IsSandboxedProcess
16 // function defined in one of the Chromium sandbox cc files.
17 extern "C" bool IsSandboxedProcess();
20 // Note the Chromium code just uses a bare sandbox namespace, which makes using
21 // sandbox for our namespace painful.
22 namespace sandboxing
{
24 class PermissionsService
;
27 * Initializes (if required) and returns the Chromium sandbox TargetServices.
29 * @return the TargetServices or null if the creation or initialization failed.
31 sandbox::TargetServices
* GetInitializedTargetServices();
34 * Lowers the permissions on the process sandbox.
35 * Provided because the GMP sandbox needs to be lowered from the executable.
40 * Initializes (if required) and returns the Chromium sandbox BrokerServices.
42 * @return the BrokerServices or null if the creation or initialization failed.
44 sandbox::BrokerServices
* GetInitializedBrokerServices();
46 PermissionsService
* GetPermissionsService();
48 } // namespace sandboxing
49 } // namespace mozilla
51 #endif // mozilla_sandboxing_SandboxInitialization_h