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 file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 export const ProcessType = Object.freeze({
7 * Converts a key string to a fluent ID defined in processTypes.ftl.
10 // Keys defined in xpcom/build/GeckoProcessTypes.h
11 default: "process-type-default",
12 gpu: "process-type-gpu",
13 tab: "process-type-tab",
14 rdd: "process-type-rdd",
15 socket: "process-type-socket",
16 utility: "process-type-utility",
18 // Keys defined in dom/ipc/RemoteType.h
19 extension: "process-type-extension",
20 file: "process-type-file",
21 prealloc: "process-type-prealloc",
22 privilegedabout: "process-type-privilegedabout",
23 privilegedmozilla: "process-type-privilegedmozilla",
24 web: "process-type-web",
25 webIsolated: "process-type-webisolated",
26 webServiceWorker: "process-type-webserviceworker",
29 kFallback: "process-type-unknown",
31 fluentNameFromProcessTypeString(type) {
32 return this.kProcessTypeMap[type] || this.kFallback;