Bug 1857998 [wpt PR 42432] - [css-nesting-ident] Enable relaxed syntax, a=testonly
[gecko.git] / toolkit / modules / ProcessType.sys.mjs
blob4c30068755654482804b250e4c030bbb68b761d0
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({
6   /**
7    * Converts a key string to a fluent ID defined in processTypes.ftl.
8    */
9   kProcessTypeMap: {
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",
27   },
29   kFallback: "process-type-unknown",
31   fluentNameFromProcessTypeString(type) {
32     return this.kProcessTypeMap[type] || this.kFallback;
33   },
34 });