chromium/extensions/common/mojom/api_permission_id.mojom

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module extensions.mojom;

// The IDs of all permissions available to apps. Add as many permissions here
// as needed to generate meaningful permission messages. Add the rules for the
// messages to ChromePermissionMessageProvider.
// Do not reorder this enumeration or remove any entries. To deprecate an
// entry, prefix it with the "kDeleted_" specifier and to add a new entry, and
// be sure to update the "ExtensionPermission3" enum in
// tools/metrics/histograms/histograms.xml (by running
// update_extension_permission.py).
// TODO(sashab): Move this to a more central location, and rename it to
// PermissionID.
//
// Additionally, this enum should be sync with APIPermission::ID enum until
// are replaced with mojom::APIPermissionID.
enum APIPermissionID {
  // Error codes.
  kInvalid = 0,
  kUnknown = 1,

  // Actual permission IDs. Not all of these are valid permissions on their
  // own; some are just needed by various manifest permissions to represent
  // their permission message rule combinations.
  kAccessibilityFeaturesModify = 2,
  kAccessibilityFeaturesRead = 3,
  kAccessibilityPrivate = 4,
  kActiveTab = 5,
  kActivityLogPrivate = 6,
  kAlarms = 7,
  kAlphaEnabled = 8,
  kAlwaysOnTopWindows = 9,
  kAppView = 10,
  kAudio = 11,
  kAudioCapture = 12,
  kDeleted_AudioModem = 13,
  kAutofillPrivate = 14,
  kAutomation = 15,
  kAutoTestPrivate = 16,
  kBackground = 17,
  kBluetoothPrivate = 18,
  kBookmark = 19,
  kDeleted_BookmarkManagerPrivate = 20,
  kBrailleDisplayPrivate = 21,
  kBrowser = 22,
  kBrowsingData = 23,
  kDeleted_Cast = 24,
  kDeleted_CastStreaming = 25,
  kChromeosInfoPrivate = 26,
  kClipboardRead = 27,
  kClipboardWrite = 28,
  kDeleted_CloudPrintPrivate = 29,
  kCommandLinePrivate = 30,
  kCommandsAccessibility = 31,
  kContentSettings = 32,
  kContextMenus = 33,
  kCookie = 34,
  kDeleted_Copresence = 35,
  kDeleted_CopresencePrivate = 36,
  kDeleted_CryptotokenPrivate = 37,
  kDeleted_DataReductionProxy = 38,
  kDiagnostics = 39,
  kDeleted_Dial = 40,
  kDebugger = 41,
  kDeclarative = 42,
  kDeclarativeContent = 43,
  kDeclarativeWebRequest = 44,
  kDesktopCapture = 45,
  kDeleted_DesktopCapturePrivate = 46,
  kDeveloperPrivate = 47,
  kDevtools = 48,
  kDns = 49,
  kDocumentScan = 50,
  kDownloads = 51,
  kDeleted_DownloadsInternal = 52,
  kDownloadsOpen = 53,
  kDownloadsShelf = 54,
  kDeleted_EasyUnlockPrivate = 55,
  kEchoPrivate = 56,
  kDeleted_EmbeddedExtensionOptions = 57,
  kEnterprisePlatformKeys = 58,
  kEnterprisePlatformKeysPrivate = 59,
  kDeleted_ExperienceSamplingPrivate = 60,
  kExperimental = 61,
  kDeleted_ExtensionView = 62,
  // TODO(crbug.com/40864987): Remove this entry.
  kDeprecated_ExternallyConnectableAllUrls = 63,
  kFeedbackPrivate = 64,
  kFileBrowserHandler = 65,
  kDeleted_FileBrowserHandlerInternal = 66,
  kFileManagerPrivate = 67,
  kFileSystem = 68,
  kFileSystemDirectory = 69,
  kFileSystemProvider = 70,
  kFileSystemRequestFileSystem = 71,
  kFileSystemRetainEntries = 72,
  kFileSystemWrite = 73,
  kDeleted_FileSystemWriteDirectory = 74,
  kFirstRunPrivate = 75,
  kFontSettings = 76,
  kFullscreen = 77,
  kDeleted_GcdPrivate = 78,
  kGcm = 79,
  kGeolocation = 80,
  kHid = 81,
  kHistory = 82,
  kHomepage = 83,
  kHotwordPrivate = 84,
  kIdentity = 85,
  kIdentityEmail = 86,
  kDeleted_IdentityPrivate = 87,
  kIdltest = 88,
  kIdle = 89,
  kImeWindowEnabled = 90,
  kDeleted_InlineInstallPrivate = 91,
  kInput = 92,
  kInputMethodPrivate = 93,
  kDeleted_InterceptAllKeys = 94,
  kDeleted_LauncherSearchProvider = 95,
  kLocation = 96,
  kDeleted_LogPrivate = 97,
  kManagement = 98,
  kMediaGalleries = 99,
  kMediaPlayerPrivate = 100,
  kDeleted_MediaRouterPrivate = 101,
  kMetricsPrivate = 102,
  kMDns = 103,
  kDeleted_MusicManagerPrivate = 104,
  kNativeMessaging = 105,
  kDeleted_NetworkingConfig = 106,
  kNetworkingPrivate = 107,
  kDeleted_NotificationProvider = 108,
  kNotifications = 109,
  kOverrideEscFullscreen = 110,
  kPageCapture = 111,
  kPointerLock = 112,
  kPlatformKeys = 113,
  kDeleted_Plugin = 114,
  kPower = 115,
  kDeleted_PreferencesPrivate = 116,
  kDeleted_PrincipalsPrivate = 117,
  kPrinterProvider = 118,
  kPrivacy = 119,
  kProcesses = 120,
  kProxy = 121,
  kImageWriterPrivate = 122,
  kDeleted_ReadingListPrivate = 123,
  kRtcPrivate = 124,
  kSearchProvider = 125,
  kSearchEnginesPrivate = 126,
  kSerial = 127,
  kSessions = 128,
  kSettingsPrivate = 129,
  kDeleted_SignedInDevices = 130,
  kSocket = 131,
  kStartupPages = 132,
  kStorage = 133,
  kDeleted_StreamsPrivate = 134,
  kSyncFileSystem = 135,
  kSystemPrivate = 136,
  kSystemDisplay = 137,
  kSystemStorage = 138,
  kTab = 139,
  kTabCapture = 140,
  kTabCaptureForTab = 141,
  kTerminalPrivate = 142,
  kTopSites = 143,
  kTts = 144,
  kTtsEngine = 145,
  kUnlimitedStorage = 146,
  kU2fDevices = 147,
  kUsb = 148,
  kUsbDevice = 149,
  kVideoCapture = 150,
  kVirtualKeyboardPrivate = 151,
  kVpnProvider = 152,
  kWallpaper = 153,
  kDeleted_WallpaperPrivate = 154,
  kWebcamPrivate = 155,
  kDeleted_kWebConnectable = 156,
  kWebNavigation = 157,
  kWebRequest = 158,
  kWebRequestBlocking = 159,
  kWebrtcAudioPrivate = 160,
  kWebrtcDesktopCapturePrivate = 161,
  kWebrtcLoggingPrivate = 162,
  kWebstorePrivate = 163,
  kDeleted_WebstoreWidgetPrivate = 164,
  kWebView = 165,
  kWindowShape = 166,
  kDeleted_ScreenlockPrivate = 167,
  kSystemCpu = 168,
  kSystemMemory = 169,
  kSystemNetwork = 170,
  kSystemInfoCpu = 171,
  kSystemInfoMemory = 172,
  kBluetooth = 173,
  kBluetoothDevices = 174,
  kFavicon = 175,
  kFullAccess = 176,
  kHostReadOnly = 177,
  kHostReadWrite = 178,
  kHostsAll = 179,
  kHostsAllReadOnly = 180,
  kMediaGalleriesAllGalleriesCopyTo = 181,
  kMediaGalleriesAllGalleriesDelete = 182,
  kMediaGalleriesAllGalleriesRead = 183,
  kNetworkState = 184,
  kDeleted_OverrideBookmarksUI = 185,
  kShouldWarnAllHosts = 186,
  kSocketAnyHost = 187,
  kSocketDomainHosts = 188,
  kSocketSpecificHosts = 189,
  kDeleted_UsbDeviceList = 190,
  kUsbDeviceUnknownProduct = 191,
  kUsbDeviceUnknownVendor = 192,
  kUsersPrivate = 193,
  kPasswordsPrivate = 194,
  kLanguageSettingsPrivate = 195,
  kEnterpriseDeviceAttributes = 196,
  kCertificateProvider = 197,
  kResourcesPrivate = 198,
  kDeleted_DisplaySource = 199,
  kClipboard = 200,
  kNetworkingOnc = 201,
  kVirtualKeyboard = 202,
  kDeleted_NetworkingCastPrivate = 203,
  kMediaPerceptionPrivate = 204,
  kLockScreen = 205,
  kNewTabPageOverride = 206,
  kDeclarativeNetRequest = 207,
  kLockWindowFullscreenPrivate = 208,
  kWebrtcLoggingPrivateAudioDebug = 209,
  kEnterpriseReportingPrivate = 210,
  kCecPrivate = 211,
  kSafeBrowsingPrivate = 212,
  kDeleted_FileSystemRequestDownloads = 213,
  kDeleted_SystemPowerSource = 214,
  kArcAppsPrivate = 215,
  kEnterpriseHardwarePlatform = 216,
  kLoginScreenUi = 217,
  kDeclarativeNetRequestFeedback = 218,
  kTransientBackground = 219,
  kLogin = 220,
  kLoginScreenStorage = 221,
  kLoginState = 222,
  kPrintingMetrics = 223,
  kPrinting = 224,
  kCrashReportPrivate = 225,
  kDeleted_AutofillAssistantPrivate = 226,
  kEnterpriseNetworkingAttributes = 227,
  kSearch = 228,
  kTabGroups = 229,
  kScripting = 230,
  kWmDesksPrivate = 231,
  kWebAuthenticationProxy = 232,
  kDeclarativeNetRequestWithHostAccess = 233,
  kChromeOSTelemetry = 234,
  kSpeechRecognitionPrivate = 235,
  kChromeOSDiagnostics = 236,
  kChromeOSTelemetrySerialNumber = 237,
  kSharedStoragePrivate = 238,
  kEnterpriseRemoteApps = 239,
  kOffscreen = 240,
  kSidePanel = 241,
  kDownloadsUi = 242,
  kWebRequestAuthProvider = 243,
  kChromeOSTelemetryNetworkInformation = 244,
  kPdfViewerPrivate = 245,
  kSystemLog = 246,
  kSmartCardProviderPrivate = 247,
  kChromeOSEvents = 248,
  kChromeOSAttachedDeviceInfo = 249,
  kReadingList = 250,
  kImageLoaderPrivate = 251,
  kAccessibilityServicePrivate = 252,
  kUserScripts = 253,
  kChromeOSBluetoothPeripheralsInfo = 254,
  kEnterpriseKioskInput = 255,
  kOdfsConfigPrivate = 256,
  kChromeOSManagementAudio = 257,
  kChromeOSDiagnosticsNetworkInfoForMlab = 258,

  // Add new entries at the end of the enum and be sure to update the
  // "ExtensionPermission3" enum in
  // tools/metrics/histograms/metadata/extensions/enums.xml (by running
  // update_extension_permission.py).
};