Bug 1726358 [wpt PR 30072] - Add test for SDP a=setup attribute, a=testonly
[gecko.git] / security / sandbox / win / SandboxInitialization.h
blob7e255caf68adf760060a9de2b063ebc2a44060c4
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
10 namespace sandbox {
11 class BrokerServices;
12 class TargetServices;
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();
19 namespace mozilla {
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;
26 /**
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();
33 /**
34 * Lowers the permissions on the process sandbox.
35 * Provided because the GMP sandbox needs to be lowered from the executable.
37 void LowerSandbox();
39 /**
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