summaryrefslogtreecommitdiffstats
path: root/mobile/android/geckoview/src/main/java/org/mozilla/gecko/process/GeckoProcessType.java
blob: 92ab6099081024e072a9775174faead5fa233b4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* 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/. */

package org.mozilla.gecko.process;

import org.mozilla.gecko.annotation.WrapForJNI;

@WrapForJNI
public enum GeckoProcessType {
  // These need to match the stringified names from the GeckoProcessType enum
  PARENT("default"),
  PLUGIN("plugin"),
  CONTENT("tab"),
  IPDLUNITTEST("ipdlunittest"),
  GMPLUGIN("gmplugin"),
  GPU("gpu"),
  VR("vr"),
  RDD("rdd"),
  SOCKET("socket"),
  REMOTESANDBOXBROKER("sandboxbroker"),
  FORKSERVER("forkserver"),
  UTILITY("utility");

  private final String mGeckoName;

  GeckoProcessType(final String geckoName) {
    mGeckoName = geckoName;
  }

  @Override
  public String toString() {
    return mGeckoName;
  }

  @WrapForJNI
  private static GeckoProcessType fromInt(final int type) {
    return values()[type];
  }
}