WebContent.swift (648B)
1 // This Source Code Form is subject to the terms of the Mozilla Public 2 // License, v. 2.0. If a copy of the MPL was not distributed with this 3 // file, You can obtain one at http://mozilla.org/MPL/2.0/ 4 5 import BrowserEngineKit 6 import GeckoView 7 8 @main 9 class WebContent : NSObject, GeckoProcessExtension, WebContentExtension { 10 override required init() {} 11 12 func handle(xpcConnection: xpc_connection_t) { 13 GeckoRuntime.childMain(xpcConnection: xpcConnection, process: self) 14 } 15 16 func lockdownSandbox(_ version: String!) { 17 if version == "1.0" { 18 self.applyRestrictedSandbox(revision: .revision1) 19 } 20 } 21 }