summaryrefslogtreecommitdiffstats
path: root/security/sandbox/mac/Sandbox.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /security/sandbox/mac/Sandbox.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'security/sandbox/mac/Sandbox.h')
-rw-r--r--security/sandbox/mac/Sandbox.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/security/sandbox/mac/Sandbox.h b/security/sandbox/mac/Sandbox.h
new file mode 100644
index 000000000..b2e1a7ec5
--- /dev/null
+++ b/security/sandbox/mac/Sandbox.h
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef mozilla_Sandbox_h
+#define mozilla_Sandbox_h
+
+#include <string>
+
+enum MacSandboxType {
+ MacSandboxType_Default = 0,
+ MacSandboxType_Plugin,
+ MacSandboxType_Content,
+ MacSandboxType_Invalid
+};
+
+enum MacSandboxPluginType {
+ MacSandboxPluginType_Default = 0,
+ MacSandboxPluginType_GMPlugin_Default, // Any Gecko Media Plugin
+ MacSandboxPluginType_GMPlugin_OpenH264, // Gecko Media Plugin, OpenH264
+ MacSandboxPluginType_GMPlugin_EME, // Gecko Media Plugin, EME
+ MacSandboxPluginType_GMPlugin_EME_Widevine, // Gecko Media Plugin, Widevine
+ MacSandboxPluginType_Invalid
+};
+
+typedef struct _MacSandboxPluginInfo {
+ _MacSandboxPluginInfo()
+ : type(MacSandboxPluginType_Default) {}
+ _MacSandboxPluginInfo(const struct _MacSandboxPluginInfo& other)
+ : type(other.type), pluginPath(other.pluginPath),
+ pluginBinaryPath(other.pluginBinaryPath) {}
+ MacSandboxPluginType type;
+ std::string pluginPath;
+ std::string pluginBinaryPath;
+} MacSandboxPluginInfo;
+
+typedef struct _MacSandboxInfo {
+ _MacSandboxInfo()
+ : type(MacSandboxType_Default), level(0) {}
+ _MacSandboxInfo(const struct _MacSandboxInfo& other)
+ : type(other.type), level(other.level),
+ hasSandboxedProfile(other.hasSandboxedProfile),
+ pluginInfo(other.pluginInfo),
+ appPath(other.appPath), appBinaryPath(other.appBinaryPath),
+ appDir(other.appDir), appTempDir(other.appTempDir),
+ profileDir(other.profileDir) {}
+ MacSandboxType type;
+ int32_t level;
+ bool hasSandboxedProfile;
+ MacSandboxPluginInfo pluginInfo;
+ std::string appPath;
+ std::string appBinaryPath;
+ std::string appDir;
+ std::string appTempDir;
+ std::string profileDir;
+} MacSandboxInfo;
+
+namespace mozilla {
+
+bool StartMacSandbox(MacSandboxInfo aInfo, std::string &aErrorMessage);
+
+} // namespace mozilla
+
+#endif // mozilla_Sandbox_h