diff --git a/tools/@types/index.d.ts b/tools/@types/index.d.ts index f8d3f7ba93a5..ccab118aec14 100644 --- a/tools/@types/index.d.ts +++ b/tools/@types/index.d.ts @@ -8,6 +8,12 @@ /// /// /// +/// + +/// Platform specific XPCOM modules. +/// +/// +/// /// Order of references matters here, for overriding type signatures. /// diff --git a/tools/@types/lib.gecko.win32.d.ts b/tools/@types/lib.gecko.win32.d.ts new file mode 100644 index 000000000000..4119bfd80b36 --- /dev/null +++ b/tools/@types/lib.gecko.win32.d.ts @@ -0,0 +1,381 @@ +/** + * NOTE: Do not modify this file by hand. + * Content was generated from source XPCOM .idl files. + * If you're updating some of the sources, see README for instructions. + */ + +declare global { + +// https://searchfox.org/mozilla-central/source/toolkit/components/aboutthirdparty/nsIAboutThirdParty.idl + +interface nsIInstalledApplication extends nsISupports { + readonly name: string; + readonly publisher: string; +} + +interface nsIAboutThirdParty extends nsISupports { + readonly ModuleType_Unknown: 1; + readonly ModuleType_IME: 2; + readonly ModuleType_ShellExtension: 4; + readonly ModuleType_BlockedByUser: 8; + readonly ModuleType_BlockedByUserAtLaunch: 16; + + lookupModuleType(aLeafName: string): u32; + lookupApplication(aModulePath: string): nsIInstalledApplication; + readonly isDynamicBlocklistAvailable: boolean; + readonly isDynamicBlocklistDisabled: boolean; + updateBlocklist(aLeafName: string, aNewBlockStatus: boolean): Promise; + collectSystemInfo(): Promise; + loadModuleForTesting(aModulePath: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/aboutwindowsmessages/nsIAboutWindowsMessages.idl + +interface nsIAboutWindowsMessages extends nsISupports { + getMessages(currentWindow: mozIDOMWindowProxy, messages: OutParam, windowTitles: OutParam): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/alerts/nsIWindowsAlertsService.idl + +} // global + +declare namespace nsIWindowsAlertNotification { + +enum ImagePlacement { + eInline = 0, + eHero = 1, + eIcon = 2, +} + +} + +declare global { + +interface nsIWindowsAlertNotification extends nsIAlertNotification, Enums { + handleActions: boolean; + imagePlacement: nsIWindowsAlertNotification.ImagePlacement; +} + +interface nsIWindowsAlertsService extends nsIAlertsService { + handleWindowsTag(aWindowsTag: string): Promise; + getXmlStringForWindowsAlert(aAlert: nsIAlertNotification, aWindowsTag?: string): string; + removeAllNotificationsForInstall(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/mozapps/defaultagent/nsIDefaultAgent.idl + +interface nsIDefaultAgent extends nsISupports { + registerTask(aUniqueToken: string): void; + updateTask(aUniqueToken: string): void; + unregisterTask(aUniqueToken: string): void; + uninstall(aUniqueToken: string): void; + secondsSinceLastAppRun(): i64; + getDefaultBrowser(): string; + getReplacePreviousDefaultBrowser(aCurrentBrowser: string): string; + getDefaultPdfHandler(): string; + sendPing(aCurrentBrowser: string, aPreviousBrowser: string, aPdfHandler: string, aNotificationShown: string, aNotificationAction: string, daysSinceLastAppLaunch: u32): void; + setDefaultBrowserUserChoice(aAumid: string, aExtraFileExtensions: string[]): void; + setDefaultBrowserUserChoiceAsync(aAumid: string, aExtraFileExtensions: string[]): Promise; + setDefaultExtensionHandlersUserChoice(aAumid: string, aFileExtensions: string[]): void; + agentDisabled(): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/mozapps/defaultagent/nsIWindowsMutex.idl + +interface nsIWindowsMutex extends nsISupports { + tryLock(): void; + isLocked(): boolean; + unlock(): void; +} + +interface nsIWindowsMutexFactory extends nsISupports { + createMutex(aName: string): nsIWindowsMutex; +} + +// https://searchfox.org/mozilla-central/source/dom/geolocation/nsIGeolocationUIUtilsWin.idl + +interface nsIGeolocationUIUtilsWin extends nsISupports { + dismissPrompts(aBC: BrowsingContext): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/socket/nsINamedPipeService.idl + +// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIWindowsShellService.idl + +} // global + +declare namespace nsIWindowsShellService { + +enum LaunchOnLoginEnabledEnumerator { + LAUNCH_ON_LOGIN_DISABLED_BY_SETTINGS = 0, + LAUNCH_ON_LOGIN_DISABLED = 1, + LAUNCH_ON_LOGIN_ENABLED = 2, + LAUNCH_ON_LOGIN_ENABLED_BY_POLICY = 3, +} + +} + +declare global { + +interface nsIWindowsShellService extends nsIShellService, Enums { + createShortcut(aBinary: nsIFile, aArguments: string[], aDescription: string, aIconFile: nsIFile, aIconIndex: u16, aAppUserModelId: string, aShortcutFolder: string, aShortcutName: string): Promise; + getLaunchOnLoginShortcuts(): string[]; + pinCurrentAppToStartMenuAsync(aCheckOnly: boolean): Promise; + isCurrentAppPinnedToStartMenuAsync(): Promise; + enableLaunchOnLoginMSIXAsync(aTaskId: string): Promise; + disableLaunchOnLoginMSIXAsync(aTaskId: string): Promise; + getLaunchOnLoginEnabledMSIXAsync(aTaskId: string): Promise; + pinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise; + checkPinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise; + isCurrentAppPinnedToTaskbarAsync(aumid: string): Promise; + pinShortcutToTaskbar(aAppUserModelId: string, aShortcutPath: string): Promise; + createWindowsIcon(aFile: nsIFile, aContainer: imgIContainer): Promise; + unpinShortcutFromTaskbar(aShortcutPath: string): void; + getTaskbarTabShortcutPath(aShortcutName: string): string; + getTaskbarTabPins(): string[]; + classifyShortcut(aPath: string): string; + hasPinnableShortcut(aAUMID: string, aPrivateBrowsing: boolean): Promise; + canSetDefaultBrowserUserChoice(): boolean; + checkAllProgIDsExist(): boolean; + checkBrowserUserChoiceHashes(): boolean; + isDefaultHandlerFor(aFileExtensionOrProtocol: string): boolean; + queryCurrentDefaultHandlerFor(aFileExtensionOrProtocol: string): string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/taskscheduler/nsIWinTaskSchedulerService.idl + +interface nsIWinTaskSchedulerService extends nsISupports { + registerTask(aFolderName: string, aTaskName: string, aDefinitionXML: string, aUpdateExisting?: boolean): void; + validateTaskDefinition(aDefinitionXML: string): i32; + getTaskXML(aFolderName: string, aTaskName: string): string; + getCurrentUserSid(): string; + deleteTask(aFolderName: string, aTaskName: string): void; + getFolderTasks(aFolderName: string): string[]; + createFolder(aParentFolderName: string, aSubFolderName: string): void; + deleteFolder(aParentFolderName: string, aSubFolderName: string): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIJumpListBuilder.idl + +interface nsIJumpListBuilder extends nsISupports { + obtainAndCacheFavicon(faviconURL: nsIURI): string; + obtainAndCacheFaviconAsync(faviconURL: nsIURI): Promise; + isAvailable(): Promise; + checkForRemovals(): Promise; + populateJumpList(aTaskDescriptions: any, aCustomTitle: string, aCustomDescriptions: any): Promise; + clearJumpList(): Promise; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPrintSettingsWin.idl + +// https://searchfox.org/mozilla-central/source/widget/nsITaskbarOverlayIconController.idl + +interface nsITaskbarOverlayIconController extends nsISupports { + setOverlayIcon(statusIcon: imgIContainer, statusDescription: string, paintContext?: nsISVGPaintContext): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreview.idl + +interface nsITaskbarPreview extends nsISupports { + controller: nsITaskbarPreviewController; + tooltip: string; + visible: boolean; + active: boolean; + invalidate(): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreviewButton.idl + +interface nsITaskbarPreviewButton extends nsISupports { + tooltip: string; + dismissOnClick: boolean; + hasBorder: boolean; + disabled: boolean; + image: imgIContainer; + visible: boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsITaskbarPreviewController.idl + +type nsITaskbarPreviewCallback = Callable<{ + done(aCanvas: nsISupports, aDrawBorder: boolean): void; +}> + +interface nsITaskbarPreviewController extends nsISupports { + readonly width: u32; + readonly height: u32; + readonly thumbnailAspectRatio: float; + requestPreview(aCallback: nsITaskbarPreviewCallback): void; + requestThumbnail(aCallback: nsITaskbarPreviewCallback, width: u32, height: u32): void; + onClose(): void; + onActivate(): boolean; + onClick(button: nsITaskbarPreviewButton): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl + +interface nsITaskbarProgress extends nsISupports { + readonly STATE_NO_PROGRESS: 0; + readonly STATE_INDETERMINATE: 1; + readonly STATE_NORMAL: 2; + readonly STATE_ERROR: 3; + readonly STATE_PAUSED: 4; + + setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsITaskbarTabPreview.idl + +interface nsITaskbarTabPreview extends nsITaskbarPreview { + title: string; + icon: imgIContainer; + move(aNext: nsITaskbarTabPreview): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsITaskbarWindowPreview.idl + +interface nsITaskbarWindowPreview extends nsITaskbarPreview { + readonly NUM_TOOLBAR_BUTTONS: 7; + + getButton(index: u32): nsITaskbarPreviewButton; + enableCustomDrawing: boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIWinTaskbar.idl + +interface nsIWinTaskbar extends nsISupports { + readonly available: boolean; + readonly defaultGroupId: string; + readonly defaultPrivateGroupId: string; + createTaskbarTabPreview(shell: nsIDocShell, controller: nsITaskbarPreviewController): nsITaskbarTabPreview; + getTaskbarWindowPreview(shell: nsIDocShell): nsITaskbarWindowPreview; + getTaskbarProgress(shell: nsIDocShell): nsITaskbarProgress; + getOverlayIconController(shell: nsIDocShell): nsITaskbarOverlayIconController; + createJumpListBuilder(aPrivateBrowsing: boolean): nsIJumpListBuilder; + getGroupIdForWindow(aParent: mozIDOMWindow): string; + setGroupIdForWindow(aParent: mozIDOMWindow, aIdentifier: string): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIWindowsUIUtils.idl + +interface nsIWindowsUIUtils extends nsISupports { + readonly systemSmallIconSize: i32; + readonly systemLargeIconSize: i32; + setWindowIcon(aWindow: mozIDOMWindowProxy, aSmallIcon: imgIContainer, aLargeIcon: imgIContainer): void; + setWindowIconFromExe(aWindow: mozIDOMWindowProxy, aExe: string, aIndex: u16): void; + setWindowIconNoData(aWindow: mozIDOMWindowProxy): void; + readonly inWin10TabletMode: boolean; + readonly inWin11TabletMode: boolean; + shareUrl(shareTitle: string, urlToShare: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/system/windowsPackageManager/nsIWindowsPackageManager.idl + +interface nsIWindowsPackageManager extends nsISupports { + findUserInstalledPackages(prefix: string[]): string[]; + getInstalledDate(): u64; + campaignId(): Promise; +} + +// https://searchfox.org/mozilla-central/source/xpcom/ds/nsIWindowsRegKey.idl + +interface nsIWindowsRegKey extends nsISupports { + readonly ROOT_KEY_CLASSES_ROOT: 2147483648; + readonly ROOT_KEY_CURRENT_USER: 2147483649; + readonly ROOT_KEY_LOCAL_MACHINE: 2147483650; + readonly ACCESS_BASIC: 131072; + readonly ACCESS_QUERY_VALUE: 1; + readonly ACCESS_SET_VALUE: 2; + readonly ACCESS_CREATE_SUB_KEY: 4; + readonly ACCESS_ENUMERATE_SUB_KEYS: 8; + readonly ACCESS_NOTIFY: 16; + readonly ACCESS_READ: 131097; + readonly ACCESS_WRITE: 131078; + readonly ACCESS_ALL: 131103; + readonly WOW64_32: 512; + readonly WOW64_64: 256; + readonly TYPE_NONE: 0; + readonly TYPE_STRING: 1; + readonly TYPE_BINARY: 3; + readonly TYPE_INT: 4; + readonly TYPE_INT64: 11; + + close(): void; + open(rootKey: u32, relPath: string, mode: u32): void; + create(rootKey: u32, relPath: string, mode: u32): void; + openChild(relPath: string, mode: u32): nsIWindowsRegKey; + createChild(relPath: string, mode: u32): nsIWindowsRegKey; + readonly childCount: u32; + getChildName(index: u32): string; + hasChild(name: string): boolean; + readonly valueCount: u32; + getValueName(index: u32): string; + hasValue(name: string): boolean; + removeChild(relPath: string): void; + removeValue(name: string): void; + getValueType(name: string): u32; + readStringValue(name: string): string; + readIntValue(name: string): u32; + readInt64Value(name: string): u64; + readBinaryValue(name: string): string; + writeStringValue(name: string, data: string): void; + writeIntValue(name: string, data: u32): void; + writeInt64Value(name: string, data: u64): void; + writeBinaryValue(name: string, data: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/xre/nsIWinAppHelper.idl + +interface nsIWinAppHelper extends nsISupports { + readonly userCanElevate: boolean; +} + +interface nsIXPCComponents_Interfaces { + nsIInstalledApplication: nsJSIID; + nsIAboutThirdParty: nsJSIID; + nsIAboutWindowsMessages: nsJSIID; + nsIWindowsAlertNotification: nsJSIID; + nsIWindowsAlertsService: nsJSIID; + nsIDefaultAgent: nsJSIID; + nsIWindowsMutex: nsJSIID; + nsIWindowsMutexFactory: nsJSIID; + nsIGeolocationUIUtilsWin: nsJSIID; + nsIWindowsShellService: nsJSIID; + nsIWinTaskSchedulerService: nsJSIID; + nsIJumpListBuilder: nsJSIID; + nsITaskbarOverlayIconController: nsJSIID; + nsITaskbarPreview: nsJSIID; + nsITaskbarPreviewButton: nsJSIID; + nsITaskbarPreviewCallback: nsJSIID; + nsITaskbarPreviewController: nsJSIID; + nsITaskbarProgress: nsJSIID; + nsITaskbarTabPreview: nsJSIID; + nsITaskbarWindowPreview: nsJSIID; + nsIWinTaskbar: nsJSIID; + nsIWindowsUIUtils: nsJSIID; + nsIWindowsPackageManager: nsJSIID; + nsIWindowsRegKey: nsJSIID; + nsIWinAppHelper: nsJSIID; +} + +} // global + +// Typedefs from xpidl. +type PRTime = i64; +type nsTaskbarProgressState = i32; + +// XPCOM internal utility types. + +/** XPCOM inout param is passed in as a js object with a value property. */ +type InOutParam = { value: T }; + +/** XPCOM out param is written to the passed in object's value property. */ +type OutParam = { value?: T }; + +/** A named type to enable interfaces to inherit from enums. */ +type Enums = enums; + +/** Callable accepts either form of a [function] interface. */ +type Callable = iface | Extract + +export {}; diff --git a/tools/@types/lib.gecko.xpcom.d.ts b/tools/@types/lib.gecko.xpcom.d.ts index 6cfdff88ce15..d6976a6fb5bd 100644 --- a/tools/@types/lib.gecko.xpcom.d.ts +++ b/tools/@types/lib.gecko.xpcom.d.ts @@ -6,4439 +6,786 @@ declare global { -// https://searchfox.org/mozilla-central/source/storage/mozIStorageAsyncConnection.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/bitsdownload/nsIBits.idl -interface mozIStorageAsyncConnection extends nsISupports { - readonly TRANSACTION_DEFAULT: -1; - readonly TRANSACTION_DEFERRED: 0; - readonly TRANSACTION_IMMEDIATE: 1; - readonly TRANSACTION_EXCLUSIVE: 2; +interface nsIBits extends nsISupports { + readonly ERROR_TYPE_SUCCESS: 0; + readonly ERROR_TYPE_UNKNOWN: 1; + readonly ERROR_TYPE_METHOD_THREW: 2; + readonly ERROR_TYPE_METHOD_TIMEOUT: 3; + readonly ERROR_TYPE_NULL_ARGUMENT: 4; + readonly ERROR_TYPE_INVALID_ARGUMENT: 5; + readonly ERROR_TYPE_NOT_INITIALIZED: 6; + readonly ERROR_TYPE_NO_UTF8_CONVERSION: 7; + readonly ERROR_TYPE_INVALID_GUID: 8; + readonly ERROR_TYPE_PIPE_NOT_CONNECTED: 9; + readonly ERROR_TYPE_PIPE_TIMEOUT: 10; + readonly ERROR_TYPE_PIPE_BAD_WRITE_COUNT: 11; + readonly ERROR_TYPE_PIPE_API_ERROR: 12; + readonly ERROR_TYPE_FAILED_TO_CREATE_BITS_JOB: 13; + readonly ERROR_TYPE_FAILED_TO_ADD_FILE_TO_JOB: 14; + readonly ERROR_TYPE_FAILED_TO_APPLY_BITS_JOB_SETTINGS: 15; + readonly ERROR_TYPE_FAILED_TO_RESUME_BITS_JOB: 16; + readonly ERROR_TYPE_OTHER_BITS_ERROR: 17; + readonly ERROR_TYPE_OTHER_BITS_CLIENT_ERROR: 18; + readonly ERROR_TYPE_BITS_JOB_NOT_FOUND: 19; + readonly ERROR_TYPE_FAILED_TO_GET_BITS_JOB: 20; + readonly ERROR_TYPE_FAILED_TO_SUSPEND_BITS_JOB: 21; + readonly ERROR_TYPE_FAILED_TO_COMPLETE_BITS_JOB: 22; + readonly ERROR_TYPE_PARTIALLY_COMPLETED_BITS_JOB: 23; + readonly ERROR_TYPE_FAILED_TO_CANCEL_BITS_JOB: 24; + readonly ERROR_TYPE_MISSING_RESULT_DATA: 25; + readonly ERROR_TYPE_MISSING_CALLBACK: 26; + readonly ERROR_TYPE_CALLBACK_ON_WRONG_THREAD: 27; + readonly ERROR_TYPE_MISSING_BITS_SERVICE: 28; + readonly ERROR_TYPE_BITS_SERVICE_ON_WRONG_THREAD: 29; + readonly ERROR_TYPE_MISSING_BITS_REQUEST: 30; + readonly ERROR_TYPE_BITS_REQUEST_ON_WRONG_THREAD: 31; + readonly ERROR_TYPE_MISSING_OBSERVER: 32; + readonly ERROR_TYPE_OBSERVER_ON_WRONG_THREAD: 33; + readonly ERROR_TYPE_MISSING_CONTEXT: 34; + readonly ERROR_TYPE_CONTEXT_ON_WRONG_THREAD: 35; + readonly ERROR_TYPE_FAILED_TO_START_THREAD: 36; + readonly ERROR_TYPE_FAILED_TO_CONSTRUCT_TASK_RUNNABLE: 37; + readonly ERROR_TYPE_FAILED_TO_DISPATCH_RUNNABLE: 38; + readonly ERROR_TYPE_TRANSFER_ALREADY_COMPLETE: 39; + readonly ERROR_TYPE_OPERATION_ALREADY_IN_PROGRESS: 40; + readonly ERROR_TYPE_MISSING_BITS_CLIENT: 41; + readonly ERROR_TYPE_FAILED_TO_GET_JOB_STATUS: 42; + readonly ERROR_TYPE_BITS_STATE_ERROR: 43; + readonly ERROR_TYPE_BITS_STATE_TRANSIENT_ERROR: 44; + readonly ERROR_TYPE_BITS_STATE_CANCELLED: 45; + readonly ERROR_TYPE_BITS_STATE_UNEXPECTED: 46; + readonly ERROR_TYPE_VERIFICATION_FAILURE: 47; + readonly ERROR_TYPE_ACCESS_DENIED_EXPECTED: 48; + readonly ERROR_TYPE_FAILED_TO_CONNECT_TO_BCM: 49; + readonly ERROR_TYPE_USE_AFTER_REQUEST_SHUTDOWN: 50; + readonly ERROR_TYPE_BROWSER_SHUTTING_DOWN: 51; + readonly ERROR_ACTION_UNKNOWN: 1; + readonly ERROR_ACTION_NONE: 2; + readonly ERROR_ACTION_START_DOWNLOAD: 3; + readonly ERROR_ACTION_MONITOR_DOWNLOAD: 4; + readonly ERROR_ACTION_CHANGE_MONITOR_INTERVAL: 5; + readonly ERROR_ACTION_CANCEL: 6; + readonly ERROR_ACTION_SET_PRIORITY: 7; + readonly ERROR_ACTION_COMPLETE: 8; + readonly ERROR_ACTION_SUSPEND: 9; + readonly ERROR_ACTION_RESUME: 10; + readonly ERROR_ACTION_SET_NO_PROGRESS_TIMEOUT: 11; + readonly ERROR_STAGE_UNKNOWN: 1; + readonly ERROR_STAGE_PRETASK: 2; + readonly ERROR_STAGE_COMMAND_THREAD: 3; + readonly ERROR_STAGE_AGENT_COMMUNICATION: 4; + readonly ERROR_STAGE_BITS_CLIENT: 5; + readonly ERROR_STAGE_MAIN_THREAD: 6; + readonly ERROR_STAGE_MONITOR: 7; + readonly ERROR_STAGE_VERIFICATION: 8; + readonly ERROR_CODE_TYPE_NONE: 1; + readonly ERROR_CODE_TYPE_NSRESULT: 2; + readonly ERROR_CODE_TYPE_HRESULT: 3; + readonly ERROR_CODE_TYPE_STRING: 4; + readonly ERROR_CODE_TYPE_EXCEPTION: 5; + readonly PROXY_NONE: 1; + readonly PROXY_PRECONFIG: 2; + readonly PROXY_AUTODETECT: 3; - defaultTransactionType: i32; - variableLimit: i32; - readonly transactionInProgress: boolean; - asyncClose(aCallback?: mozIStorageCompletionCallback): void; - asyncClone(aReadOnly: boolean, aCallback: mozIStorageCompletionCallback): void; - readonly databaseFile: nsIFile; - interrupt(): void; - asyncVacuum(aCallback?: mozIStorageCompletionCallback, aUseIncremental?: boolean, aSetPageSize?: i32): void; - createAsyncStatement(aSQLStatement: string): mozIStorageAsyncStatement; - executeAsync(aStatements: mozIStorageBaseStatement[], aCallback?: mozIStorageStatementCallback): mozIStoragePendingStatement; - executeSimpleSQLAsync(aSQLStatement: string, aCallback?: mozIStorageStatementCallback): mozIStoragePendingStatement; - loadExtension(aExtensionName: string, aCallback?: mozIStorageCompletionCallback): void; - createFunction(aFunctionName: string, aNumArguments: i32, aFunction: mozIStorageFunction): void; - removeFunction(aFunctionName: string): void; - setProgressHandler(aGranularity: i32, aHandler: mozIStorageProgressHandler): mozIStorageProgressHandler; - removeProgressHandler(): mozIStorageProgressHandler; - backupToFileAsync(aDestinationFile: nsIFile, aCallback: mozIStorageCompletionCallback, aPagesPerStep?: u32, aStepDelayMs?: u32): void; + readonly initialized: boolean; + init(jobName: string, savePathPrefix: string, monitorTimeoutMs: u32): void; + startDownload(downloadURL: string, saveRelativePath: string, proxy: nsProxyUsage, noProgressTimeoutSecs: u32, monitorIntervalMs: u32, customHeaders: string, observer: nsIRequestObserver, context: nsISupports, callback: nsIBitsNewRequestCallback): void; + monitorDownload(id: string, monitorIntervalMs: u32, observer: nsIRequestObserver, context: nsISupports, callback: nsIBitsNewRequestCallback): void; } -// https://searchfox.org/mozilla-central/source/storage/mozIStorageAsyncStatement.idl - -interface mozIStorageAsyncStatement extends mozIStorageBaseStatement { +interface nsIBitsNewRequestCallback extends nsISupports { + success(request: nsIBitsRequest): void; + failure(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage): void; + failureNsresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: nsresult): void; + failureHresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: i32): void; + failureString(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorMessage: string): void; } -// https://searchfox.org/mozilla-central/source/storage/mozIStorageBaseStatement.idl - -interface mozIStorageBaseStatement extends mozIStorageBindingParams { - readonly MOZ_STORAGE_STATEMENT_INVALID: 0; - readonly MOZ_STORAGE_STATEMENT_READY: 1; - readonly MOZ_STORAGE_STATEMENT_EXECUTING: 2; - - finalize(): void; - bindParameters(aParameters: mozIStorageBindingParamsArray): void; - newBindingParamsArray(): mozIStorageBindingParamsArray; - executeAsync(aCallback?: mozIStorageStatementCallback): mozIStoragePendingStatement; - readonly state: i32; - escapeStringForLIKE(aValue: string, aEscapeChar: string): string; - escapeUTF8StringForLIKE(aValue: string, aEscapeChar: string): string; +interface nsIBitsRequest extends nsIRequest { + readonly bitsId: string; + readonly transferError: nsBitsErrorType; + changeMonitorInterval(monitorIntervalMs: u32, callback: nsIBitsCallback): void; + cancelAsync(status: nsresult, callback: nsIBitsCallback): void; + setPriorityHigh(callback: nsIBitsCallback): void; + setPriorityLow(callback: nsIBitsCallback): void; + setNoProgressTimeout(timeoutSecs: u32, callback: nsIBitsCallback): void; + complete(callback: nsIBitsCallback): void; + suspendAsync(callback: nsIBitsCallback): void; + resumeAsync(callback: nsIBitsCallback): void; } -// https://searchfox.org/mozilla-central/source/storage/mozIStorageBindingParams.idl - -interface mozIStorageBindingParams extends nsISupports { - bindByName(aName: string, aValue: nsIVariant): void; - bindBlobByName(aName: string, aValue: u8[]): void; - bindStringAsBlobByName(aName: string, aValue: string): void; - bindUTF8StringAsBlobByName(aName: string, aValue: string): void; - bindArrayOfIntegersByName(aName: string, aValue: i64[]): void; - bindArrayOfDoublesByName(aName: string, aValue: double[]): void; - bindArrayOfStringsByName(aName: string, aValue: string[]): void; - bindArrayOfUTF8StringsByName(aName: string, aValue: string[]): void; - bindByIndex(aIndex: u32, aValue: nsIVariant): void; - bindBlobByIndex(aIndex: u32, aValue: u8[]): void; - bindStringAsBlobByIndex(aIndex: u32, aValue: string): void; - bindUTF8StringAsBlobByIndex(aIndex: u32, aValue: string): void; - bindArrayOfIntegersByIndex(aIndex: u32, aValue: i64[]): void; - bindArrayOfDoublesByIndex(aIndex: u32, aValue: double[]): void; - bindArrayOfStringsByIndex(aIndex: u32, aValue: string[]): void; - bindArrayOfUTF8StringsByIndex(aIndex: u32, aValue: string[]): void; +interface nsIBitsCallback extends nsISupports { + success(): void; + failure(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage): void; + failureNsresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: nsresult): void; + failureHresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: i32): void; + failureString(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorMessage: string): void; } -// https://searchfox.org/mozilla-central/source/storage/mozIStorageBindingParamsArray.idl +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibilityService.idl -interface mozIStorageBindingParamsArray extends nsISupports { - newBindingParams(): mozIStorageBindingParams; - addParams(aParameters: mozIStorageBindingParams): void; - readonly length: u32; +interface nsIAccessibilityService extends nsISupports { + getApplicationAccessible(): nsIAccessible; + getAccessibleFor(aNode: Node): nsIAccessible; + getAccessibleDescendantFor(aNode: Node): nsIAccessible; + getStringRole(aRole: u32): string; + getStringStates(aStates: u32, aExtraStates: u32): nsISupports; + getStringEventType(aEventType: u32): string; + getStringRelationType(aRelationType: u32): string; + getAccessibleFromCache(aNode: Node): nsIAccessible; + setCacheDomains(aCacheDomains: u64): void; + createAccessiblePivot(aRoot: nsIAccessible): nsIAccessiblePivot; + createTextLeafPoint(aAccessible: nsIAccessible, aOffset: i32): nsIAccessibleTextLeafPoint; + setLogging(aModules: string): void; + isLogged(aModule: string): boolean; + getConsumers(): string; } -// https://searchfox.org/mozilla-central/source/storage/mozIStorageCompletionCallback.idl - -type mozIStorageCompletionCallback = Callable<{ - complete(status: nsresult, value?: nsISupports): void; -}> - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageConnection.idl - -interface mozIStorageConnection extends mozIStorageAsyncConnection { - close(): void; - clone(aReadOnly?: boolean): mozIStorageConnection; - readonly defaultPageSize: i32; - readonly connectionReady: boolean; - readonly lastInsertRowID: i64; - readonly affectedRows: i32; - readonly lastError: i32; - readonly lastErrorString: string; - schemaVersion: i32; - createStatement(aSQLStatement: string): mozIStorageStatement; - executeSimpleSQL(aSQLStatement: string): void; - tableExists(aTableName: string): boolean; - indexExists(aIndexName: string): boolean; - beginTransaction(): void; - commitTransaction(): void; - rollbackTransaction(): void; - createTable(aTableName: string, aTableSchema: string): void; - setGrowthIncrement(aIncrement: i32, aDatabaseName: string): void; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageError.idl - -interface mozIStorageError extends nsISupports { - readonly ERROR: 1; - readonly INTERNAL: 2; - readonly PERM: 3; - readonly ABORT: 4; - readonly BUSY: 5; - readonly LOCKED: 6; - readonly NOMEM: 7; - readonly READONLY: 8; - readonly INTERRUPT: 9; - readonly IOERR: 10; - readonly CORRUPT: 11; - readonly FULL: 13; - readonly CANTOPEN: 14; - readonly EMPTY: 16; - readonly SCHEMA: 17; - readonly TOOBIG: 18; - readonly CONSTRAINT: 19; - readonly MISMATCH: 20; - readonly MISUSE: 21; - readonly NOLFS: 22; - readonly AUTH: 23; - readonly FORMAT: 24; - readonly RANGE: 25; - readonly NOTADB: 26; - - readonly result: i32; - readonly message: string; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageFunction.idl - -type mozIStorageFunction = Callable<{ - onFunctionCall(aFunctionArguments: mozIStorageValueArray): nsIVariant; -}> - -// https://searchfox.org/mozilla-central/source/storage/mozIStoragePendingStatement.idl - -interface mozIStoragePendingStatement extends nsISupports { - cancel(): void; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageProgressHandler.idl - -interface mozIStorageProgressHandler extends nsISupports { - onProgress(aConnection: mozIStorageConnection): boolean; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageResultSet.idl - -interface mozIStorageResultSet extends nsISupports { - getNextRow(): mozIStorageRow; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageRow.idl - -interface mozIStorageRow extends mozIStorageValueArray { - getResultByIndex(aIndex: u32): nsIVariant; - getResultByName(aName: string): nsIVariant; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageService.idl - -interface mozIStorageService extends nsISupports { - readonly OPEN_DEFAULT: 0; - readonly OPEN_SHARED: 1; - readonly OPEN_READONLY: 2; - readonly OPEN_IGNORE_LOCKING_MODE: 4; - readonly OPEN_NOT_EXCLUSIVE: 8; - readonly CONNECTION_DEFAULT: 0; - readonly CONNECTION_INTERRUPTIBLE: 1; - - openAsyncDatabase(aDatabaseStore: nsIVariant, aOpenFlags: u32, aConnectionFlags: u32, aCallback: mozIStorageCompletionCallback): void; - openSpecialDatabase(aStorageKey: string, aName?: string, aConnectionFlags?: u32): mozIStorageConnection; - openDatabase(aDatabaseFile: nsIFile, aConnectionFlags?: u32): mozIStorageConnection; - openUnsharedDatabase(aDatabaseFile: nsIFile, aConnectionFlags?: u32): mozIStorageConnection; - openDatabaseWithFileURL(aFileURL: nsIFileURL, aTelemetryFilename?: string, aConnectionFlags?: u32): mozIStorageConnection; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageStatement.idl - -interface mozIStorageStatement extends mozIStorageBaseStatement { - readonly VALUE_TYPE_NULL: 0; - readonly VALUE_TYPE_INTEGER: 1; - readonly VALUE_TYPE_FLOAT: 2; - readonly VALUE_TYPE_TEXT: 3; - readonly VALUE_TYPE_BLOB: 4; - - clone(): mozIStorageStatement; - readonly parameterCount: u32; - getParameterName(aParamIndex: u32): string; - getParameterIndex(aName: string): u32; - readonly columnCount: u32; - getColumnName(aColumnIndex: u32): string; - getColumnIndex(aName: string): u32; - reset(): void; - execute(): void; - executeStep(): boolean; - readonly numEntries: u32; - getTypeOfIndex(aIndex: u32): i32; - getVariant(aIndex: u32): nsIVariant; - getInt32(aIndex: u32): i32; - getInt64(aIndex: u32): i64; - getDouble(aIndex: u32): double; - getUTF8String(aIndex: u32): string; - getString(aIndex: u32): string; - getBlob(aIndex: u32, aDataSize: OutParam, aData: OutParam): void; - getBlobAsString(aIndex: u32): string; - getBlobAsUTF8String(aIndex: u32): string; - getIsNull(aIndex: u32): boolean; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageStatementCallback.idl - -interface mozIStorageStatementCallback extends nsISupports { - readonly REASON_FINISHED: 0; - readonly REASON_CANCELED: 1; - readonly REASON_ERROR: 2; - - handleResult(aResultSet: mozIStorageResultSet): void; - handleError(aError: mozIStorageError): void; - handleCompletion(aReason: u16): void; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageVacuumParticipant.idl - -interface mozIStorageVacuumParticipant extends nsISupports { - readonly expectedDatabasePageSize: i32; - readonly useIncrementalVacuum: boolean; - readonly databaseConnection: mozIStorageAsyncConnection; - onBeginVacuum(): boolean; - onEndVacuum(aSucceeded: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/storage/mozIStorageValueArray.idl - -interface mozIStorageValueArray extends nsISupports { - readonly VALUE_TYPE_NULL: 0; - readonly VALUE_TYPE_INTEGER: 1; - readonly VALUE_TYPE_FLOAT: 2; - readonly VALUE_TYPE_TEXT: 3; - readonly VALUE_TYPE_BLOB: 4; - - readonly numEntries: u32; - getTypeOfIndex(aIndex: u32): i32; - getInt32(aIndex: u32): i32; - getInt64(aIndex: u32): i64; - getDouble(aIndex: u32): double; - getUTF8String(aIndex: u32): string; - getString(aIndex: u32): string; - getBlob(aIndex: u32, aDataSize: OutParam, aData: OutParam): void; - getBlobAsString(aIndex: u32): string; - getBlobAsUTF8String(aIndex: u32): string; - getIsNull(aIndex: u32): boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/remote/nsIRemoteService.idl - -interface nsIRemoteService extends nsISupports { - sendCommandLine(aProfile: string, aArgs: string[], aRaise?: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsCURILoader.idl - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsIContentHandler.idl - -interface nsIContentHandler extends nsISupports { - handleContent(aContentType: string, aWindowContext: nsIInterfaceRequestor, aRequest: nsIRequest): void; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsIDocumentLoader.idl - -interface nsIDocumentLoader extends nsISupports { - stop(): void; - readonly container: nsISupports; - readonly loadGroup: nsILoadGroup; - readonly documentChannel: nsIChannel; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsITransfer.idl - -interface nsITransfer extends nsIWebProgressListener2 { - readonly DOWNLOAD_ACCEPTABLE: 0; - readonly DOWNLOAD_FORBIDDEN: 1; - readonly DOWNLOAD_POTENTIALLY_UNSAFE: 2; - - init(aSource: nsIURI, aSourceOriginalURI: nsIURI, aTarget: nsIURI, aDisplayName: string, aMIMEInfo: nsIMIMEInfo, startTime: PRTime, aTempFile: nsIFile, aCancelable: nsICancelable, aIsPrivate: boolean, aDownloadClassification: i32, aReferrerInfo: nsIReferrerInfo, aOpenDownloadsListOnStart?: boolean): void; - initWithBrowsingContext(aSource: nsIURI, aTarget: nsIURI, aDisplayName: string, aMIMEInfo: nsIMIMEInfo, startTime: PRTime, aTempFile: nsIFile, aCancelable: nsICancelable, aIsPrivate: boolean, aDownloadClassification: i32, aReferrerInfo: nsIReferrerInfo, aOpenDownloadsListOnStart: boolean, aBrowsingContext: BrowsingContext, aHandleInternally: boolean, aHttpChannel: nsIHttpChannel): void; - setSha256Hash(aHash: string): void; - setSignatureInfo(aSignatureInfo: u8[][][]): void; - setRedirects(aRedirects: nsIArray): void; - readonly downloadPromise: Promise; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsIURIContentListener.idl - -interface nsIURIContentListener extends nsISupports { - doContent(aContentType: string, aIsContentPreferred: boolean, aRequest: nsIRequest, aContentHandler: OutParam): boolean; - isPreferred(aContentType: string, aDesiredContentType: OutParam): boolean; - canHandleContent(aContentType: string, aIsContentPreferred: boolean, aDesiredContentType: OutParam): boolean; - loadCookie: nsISupports; - parentContentListener: nsIURIContentListener; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsIURILoader.idl - -interface nsIURILoader extends nsISupports { - readonly IS_CONTENT_PREFERRED: 1; - readonly DONT_RETARGET: 2; - - registerContentListener(aContentListener: nsIURIContentListener): void; - unRegisterContentListener(aContentListener: nsIURIContentListener): void; - openURI(aChannel: nsIChannel, aFlags: u32, aWindowContext: nsIInterfaceRequestor): void; - openChannel(aChannel: nsIChannel, aFlags: u32, aWindowContext: nsIInterfaceRequestor): nsIStreamListener; - stop(aLoadCookie: nsISupports): void; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgress.idl - -interface nsIWebProgress extends nsISupports { - readonly NOTIFY_STATE_REQUEST: 1; - readonly NOTIFY_STATE_DOCUMENT: 2; - readonly NOTIFY_STATE_NETWORK: 4; - readonly NOTIFY_STATE_WINDOW: 8; - readonly NOTIFY_STATE_ALL: 15; - readonly NOTIFY_PROGRESS: 16; - readonly NOTIFY_STATUS: 32; - readonly NOTIFY_SECURITY: 64; - readonly NOTIFY_LOCATION: 128; - readonly NOTIFY_REFRESH: 256; - readonly NOTIFY_CONTENT_BLOCKING: 512; - readonly NOTIFY_ALL: 1023; - - addProgressListener(aListener: nsIWebProgressListener, aNotifyMask: u32): void; - removeProgressListener(aListener: nsIWebProgressListener): void; - readonly browsingContext: BrowsingContext; - readonly DOMWindow: mozIDOMWindowProxy; - readonly isTopLevel: boolean; - readonly isLoadingDocument: boolean; - readonly loadType: u32; - target: nsIEventTarget; - readonly documentRequest: nsIRequest; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgressListener.idl - -interface nsIWebProgressListener extends nsISupports { - readonly STATE_START: 1; - readonly STATE_REDIRECTING: 2; - readonly STATE_TRANSFERRING: 4; - readonly STATE_NEGOTIATING: 8; - readonly STATE_STOP: 16; - readonly STATE_IS_REQUEST: 65536; - readonly STATE_IS_DOCUMENT: 131072; - readonly STATE_IS_NETWORK: 262144; - readonly STATE_IS_WINDOW: 524288; - readonly STATE_IS_REDIRECTED_DOCUMENT: 1048576; - readonly STATE_RESTORING: 16777216; - readonly STATE_IS_INSECURE: 4; - readonly STATE_IS_BROKEN: 1; - readonly STATE_IS_SECURE: 2; - readonly STATE_BLOCKED_MIXED_ACTIVE_CONTENT: 16; - readonly STATE_LOADED_MIXED_ACTIVE_CONTENT: 32; - readonly STATE_BLOCKED_MIXED_DISPLAY_CONTENT: 256; - readonly STATE_LOADED_MIXED_DISPLAY_CONTENT: 512; - readonly STATE_IDENTITY_EV_TOPLEVEL: 1048576; - readonly STATE_IDENTITY_ASSOCIATED: 2097152; - readonly STATE_USES_SSL_3: 16777216; - readonly STATE_USES_WEAK_CRYPTO: 33554432; - readonly STATE_CERT_USER_OVERRIDDEN: 67108864; - readonly STATE_BLOCKED_TRACKING_CONTENT: 4096; - readonly STATE_LOADED_LEVEL_1_TRACKING_CONTENT: 8192; - readonly STATE_LOADED_LEVEL_2_TRACKING_CONTENT: 1048576; - readonly STATE_BLOCKED_FINGERPRINTING_CONTENT: 64; - readonly STATE_LOADED_FINGERPRINTING_CONTENT: 1024; - readonly STATE_REPLACED_FINGERPRINTING_CONTENT: 134217728; - readonly STATE_ALLOWED_FINGERPRINTING_CONTENT: 512; - readonly STATE_BLOCKED_CRYPTOMINING_CONTENT: 2048; - readonly STATE_LOADED_CRYPTOMINING_CONTENT: 2097152; - readonly STATE_BLOCKED_UNSAFE_CONTENT: 16384; - readonly STATE_COOKIES_LOADED: 32768; - readonly STATE_COOKIES_LOADED_TRACKER: 262144; - readonly STATE_COOKIES_LOADED_SOCIALTRACKER: 524288; - readonly STATE_COOKIES_BLOCKED_BY_PERMISSION: 268435456; - readonly STATE_COOKIES_BLOCKED_TRACKER: 536870912; - readonly STATE_COOKIES_BLOCKED_SOCIALTRACKER: 16777216; - readonly STATE_COOKIES_BLOCKED_ALL: 1073741824; - readonly STATE_COOKIES_PARTITIONED_TRACKER: 2; - readonly STATE_COOKIES_PARTITIONED_FOREIGN: 2147483648; - readonly STATE_COOKIES_BLOCKED_FOREIGN: 128; - readonly STATE_BLOCKED_SOCIALTRACKING_CONTENT: 65536; - readonly STATE_LOADED_SOCIALTRACKING_CONTENT: 131072; - readonly STATE_REPLACED_TRACKING_CONTENT: 16; - readonly STATE_ALLOWED_TRACKING_CONTENT: 32; - readonly STATE_BLOCKED_EMAILTRACKING_CONTENT: 4194304; - readonly STATE_LOADED_EMAILTRACKING_LEVEL_1_CONTENT: 8388608; - readonly STATE_LOADED_EMAILTRACKING_LEVEL_2_CONTENT: 256; - readonly STATE_ALLOWED_CANVAS_FINGERPRINTING: 33554432; - readonly STATE_ALLOWED_FONT_FINGERPRINTING: 67108864; - readonly STATE_BLOCKED_SUSPICIOUS_FINGERPRINTING: 4; - readonly STATE_PURGED_BOUNCETRACKER: 8; - readonly STATE_HTTPS_ONLY_MODE_UPGRADED: 4194304; - readonly STATE_HTTPS_ONLY_MODE_UPGRADE_FAILED: 8388608; - readonly STATE_HTTPS_ONLY_MODE_UPGRADED_FIRST: 134217728; - readonly LOCATION_CHANGE_SAME_DOCUMENT: 1; - readonly LOCATION_CHANGE_ERROR_PAGE: 2; - readonly LOCATION_CHANGE_RELOAD: 4; - readonly LOCATION_CHANGE_HASHCHANGE: 8; - readonly LOCATION_CHANGE_SESSION_STORE: 16; - - onStateChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aStateFlags: u32, aStatus: nsresult): void; - onProgressChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aCurSelfProgress: i32, aMaxSelfProgress: i32, aCurTotalProgress: i32, aMaxTotalProgress: i32): void; - onLocationChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aLocation: nsIURI, aFlags?: u32): void; - onStatusChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aStatus: nsresult, aMessage: string): void; - onSecurityChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aState: u32): void; - onContentBlockingEvent(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aEvent: u32): void; -} - -// https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgressListener2.idl - -interface nsIWebProgressListener2 extends nsIWebProgressListener { - onProgressChange64(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aCurSelfProgress: i64, aMaxSelfProgress: i64, aCurTotalProgress: i64, aMaxTotalProgress: i64): void; - onRefreshAttempted(aWebProgress: nsIWebProgress, aRefreshURI: nsIURI, aMillis: u32, aSameURI: boolean): boolean; -} - -// https://searchfox.org/mozilla-central/source/netwerk/mime/nsIMIMEHeaderParam.idl - -interface nsIMIMEHeaderParam extends nsISupports { - getParameter(aHeaderVal: string, aParamName: string, aFallbackCharset: string, aTryLocaleCharset: boolean, aLang: OutParam): string; - getParameterHTTP(aHeaderVal: string, aParamName: string, aFallbackCharset: string, aTryLocaleCharset: boolean, aLang: OutParam): string; - decodeRFC5987Param(aParamVal: string, aLang: OutParam): string; -} - -// https://searchfox.org/mozilla-central/source/netwerk/mime/nsIMIMEInfo.idl - -interface nsIHandlerInfo extends nsISupports { - readonly saveToDisk: 0; - readonly alwaysAsk: 1; - readonly useHelperApp: 2; - readonly handleInternally: 3; - readonly useSystemDefault: 4; - - readonly type: string; - description: string; - preferredApplicationHandler: nsIHandlerApp; - readonly possibleApplicationHandlers: nsIMutableArray; - readonly hasDefaultHandler: boolean; - readonly defaultDescription: string; - readonly defaultExecutable: nsIFile; - launchWithURI(aURI: nsIURI, aBrowsingContext?: BrowsingContext): void; - preferredAction: nsHandlerInfoAction; - alwaysAskBeforeHandling: boolean; -} - -interface nsIMIMEInfo extends nsIHandlerInfo { - getFileExtensions(): nsIUTF8StringEnumerator; - setFileExtensions(aExtensions: string): void; - extensionExists(aExtension: string): boolean; - appendExtension(aExtension: string): void; - primaryExtension: string; - readonly MIMEType: string; - equals(aMIMEInfo: nsIMIMEInfo): boolean; - readonly possibleLocalHandlers: nsIArray; - launchWithFile(aFile: nsIFile): void; - isCurrentAppOSDefault(): boolean; -} - -interface nsIHandlerApp extends nsISupports { - name: string; - detailedDescription: string; - equals(aHandlerApp: nsIHandlerApp): boolean; - launchWithURI(aURI: nsIURI, aBrowsingContext?: BrowsingContext): void; -} - -interface nsILocalHandlerApp extends nsIHandlerApp { - executable: nsIFile; - readonly parameterCount: u32; - prettyNameAsync(): Promise; - clearParameters(): void; - appendParameter(param: string): void; - getParameter(parameterIndex: u32): string; - parameterExists(param: string): boolean; -} - -interface nsIWebHandlerApp extends nsIHandlerApp { - uriTemplate: string; -} - -interface nsIDBusHandlerApp extends nsIHandlerApp { - service: string; - objectPath: string; - dBusInterface: string; - method: string; -} - -// https://searchfox.org/mozilla-central/source/netwerk/mime/nsIMIMEService.idl - -interface nsIMIMEService extends nsISupports { - readonly VALIDATE_DEFAULT: 0; - readonly VALIDATE_SANITIZE_ONLY: 1; - readonly VALIDATE_DONT_COLLAPSE_WHITESPACE: 2; - readonly VALIDATE_DONT_TRUNCATE: 4; - readonly VALIDATE_GUESS_FROM_EXTENSION: 8; - readonly VALIDATE_ALLOW_EMPTY: 16; - readonly VALIDATE_NO_DEFAULT_FILENAME: 32; - readonly VALIDATE_FORCE_APPEND_EXTENSION: 64; - readonly VALIDATE_ALLOW_INVALID_FILENAMES: 128; - readonly VALIDATE_ALLOW_DIRECTORY_NAMES: 256; - - getFromTypeAndExtension(aMIMEType: string, aFileExt: string): nsIMIMEInfo; - getTypeFromExtension(aFileExt: string): string; - getTypeFromURI(aURI: nsIURI): string; - getDefaultTypeFromURI(aURI: nsIURI): string; - getTypeFromFile(aFile: nsIFile): string; - getPrimaryExtension(aMIMEType: string, aFileExt: string): string; - getMIMEInfoFromOS(aType: string, aFileExtension: string, aFound: OutParam): nsIMIMEInfo; - updateDefaultAppInfo(aMIMEInfo: nsIMIMEInfo): void; - getValidFileName(aChannel: nsIChannel, aType: string, aOriginalURI: nsIURI, aFlags: u32): string; - validateFileNameForSaving(aFileName: string, aType: string, aFlags: u32): string; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookie.idl - -} // global - -declare namespace nsICookie { - -enum schemeType { - SCHEME_UNSET = 0, - SCHEME_HTTP = 1, - SCHEME_HTTPS = 2, - SCHEME_FILE = 4, -} - -} - -declare global { - -interface nsICookie extends nsISupports, Enums { - readonly SAMESITE_NONE: 0; - readonly SAMESITE_LAX: 1; - readonly SAMESITE_STRICT: 2; - +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessible.idl + +interface nsIAccessible extends nsISupports { + readonly parent: nsIAccessible; + readonly nextSibling: nsIAccessible; + readonly previousSibling: nsIAccessible; + readonly firstChild: nsIAccessible; + readonly lastChild: nsIAccessible; + readonly children: nsIArray; + readonly childCount: i32; + readonly indexInParent: i32; + readonly uniqueID: i64; + readonly DOMNode: Node; + readonly id: string; + readonly document: nsIAccessibleDocument; + readonly rootDocument: nsIAccessibleDocument; + readonly language: string; readonly name: string; readonly value: string; - readonly isDomain: boolean; - readonly host: string; - readonly rawHost: string; - readonly path: string; - readonly isSecure: boolean; - readonly expires: u64; - readonly expiry: i64; - readonly originAttributes: any; - readonly isSession: boolean; - readonly isHttpOnly: boolean; - readonly creationTime: i64; - readonly lastAccessed: i64; - readonly sameSite: i32; - readonly schemeMap: nsICookie.schemeType; - readonly isPartitioned: boolean; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieJarSettings.idl - -interface nsICookieJarSettings extends nsISerializable { - readonly cookieBehavior: u32; - readonly isFirstPartyIsolated: boolean; - readonly shouldResistFingerprinting: boolean; - readonly rejectThirdPartyContexts: boolean; - readonly limitForeignContexts: boolean; - readonly blockingAllThirdPartyContexts: boolean; - readonly blockingAllContexts: boolean; - partitionForeign: boolean; - readonly isOnContentBlockingAllowList: boolean; - readonly partitionKey: string; - readonly fingerprintingRandomizationKey: u8[]; - cookiePermission(aPrincipal: nsIPrincipal): u32; - initWithURI(aURI: nsIURI, aIsPrivate: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieManager.idl - -interface nsICookieManager extends nsISupports { - removeAll(): void; - readonly cookies: nsICookie[]; - readonly sessionCookies: nsICookie[]; - getCookieBehavior(aIsPrivate: boolean): u32; - remove(aHost: string, aName: string, aPath: string, aOriginAttributes: any): void; - add(aHost: string, aPath: string, aName: string, aValue: string, aIsSecure: boolean, aIsHttpOnly: boolean, aIsSession: boolean, aExpiry: i64, aOriginAttributes: any, aSameSite: i32, aSchemeMap: nsICookie.schemeType, aIsPartitioned?: boolean): void; - cookieExists(aHost: string, aPath: string, aName: string, aOriginAttributes: any): boolean; - countCookiesFromHost(aHost: string): u32; - getCookiesFromHost(aHost: string, aOriginAttributes: any, aSorted?: boolean): nsICookie[]; - getCookiesWithOriginAttributes(aPattern: string, aHost?: string, aSorted?: boolean): nsICookie[]; - removeCookiesWithOriginAttributes(aPattern: string, aHost?: string): void; - removeCookiesFromExactHost(aHost: string, aPattern: string): void; - removeAllSince(aSinceWhen: i64): Promise; - getCookiesSince(aSinceWhen: i64): nsICookie[]; - addThirdPartyCookieBlockingExceptions(aExcpetions: nsIThirdPartyCookieExceptionEntry[]): void; - removeThirdPartyCookieBlockingExceptions(aExceptions: nsIThirdPartyCookieExceptionEntry[]): void; - testGet3PCBExceptions(): string[]; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieNotification.idl - -} // global - -declare namespace nsICookieNotification { - -enum Action { - COOKIE_DELETED = 0, - COOKIE_ADDED = 1, - COOKIE_CHANGED = 2, - ALL_COOKIES_CLEARED = 3, - COOKIES_BATCH_DELETED = 4, -} - -} - -declare global { - -interface nsICookieNotification extends nsISupports, Enums { - readonly action: nsICookieNotification.Action; - readonly cookie: nsICookie; - readonly baseDomain: string; - readonly isThirdParty: boolean; - readonly batchDeletedCookies: nsIArray; - readonly browsingContextId: u64; - readonly browsingContext: BrowsingContext; - readonly operationID: nsID; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookiePermission.idl - -interface nsICookiePermission extends nsISupports { - readonly ACCESS_DEFAULT: 0; - readonly ACCESS_ALLOW: 1; - readonly ACCESS_DENY: 2; - readonly ACCESS_SESSION: 8; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieService.idl - -type nsICookieTransactionCallback = Callable<{ - callback(): void; -}> - -interface nsICookieService extends nsISupports { - readonly BEHAVIOR_ACCEPT: 0; - readonly BEHAVIOR_REJECT_FOREIGN: 1; - readonly BEHAVIOR_REJECT: 2; - readonly BEHAVIOR_LIMIT_FOREIGN: 3; - readonly BEHAVIOR_REJECT_TRACKER: 4; - readonly BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN: 5; - readonly BEHAVIOR_LAST: 5; - - getCookieStringFromHttp(aURI: nsIURI, aChannel: nsIChannel): string; - setCookieStringFromHttp(aURI: nsIURI, aCookie: string, aChannel: nsIChannel): void; - runInTransaction(aCallback: nsICookieTransactionCallback): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsIThirdPartyCookieBlockingExceptionListService.idl - -interface nsIThirdPartyCookieBlockingExceptionListService extends nsISupports { - init(): Promise; - shutdown(): void; -} - -interface nsIThirdPartyCookieExceptionEntry extends nsISupports { - readonly firstPartySite: string; - readonly thirdPartySite: string; - serialize(): string; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/asyncshutdown/nsIAsyncShutdown.idl - -interface nsIAsyncShutdownBlocker extends nsISupports { - readonly name: string; - blockShutdown(aBarrierClient: nsIAsyncShutdownClient): void; - readonly state: nsIPropertyBag; -} - -interface nsIAsyncShutdownClient extends nsISupports { - readonly name: string; - readonly isClosed: boolean; - addBlocker(aBlocker: nsIAsyncShutdownBlocker, aFileName: string, aLineNumber: i32, aStack: string): void; - removeBlocker(aBlocker: nsIAsyncShutdownBlocker): void; - readonly jsclient: any; -} - -type nsIAsyncShutdownCompletionCallback = Callable<{ - done(): void; -}> - -interface nsIAsyncShutdownBarrier extends nsISupports { - readonly client: nsIAsyncShutdownClient; - readonly state: nsIPropertyBag; - wait(aOnReady: nsIAsyncShutdownCompletionCallback): void; -} - -interface nsIAsyncShutdownService extends nsISupports { - makeBarrier(aName: string): nsIAsyncShutdownBarrier; - readonly profileBeforeChange: nsIAsyncShutdownClient; - readonly profileChangeTeardown: nsIAsyncShutdownClient; - readonly quitApplicationGranted: nsIAsyncShutdownClient; - readonly sendTelemetry: nsIAsyncShutdownClient; - readonly webWorkersShutdown: nsIAsyncShutdownClient; - readonly xpcomWillShutdown: nsIAsyncShutdownClient; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/terminator/nsITerminatorTest.idl - -interface nsITerminatorTest extends nsISupports { - getTicksForShutdownPhases(): any; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/browser/nsIWebBrowser.idl - -interface nsIWebBrowser extends nsISupports { - containerWindow: nsIWebBrowserChrome; - readonly contentDOMWindow: mozIDOMWindowProxy; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/browser/nsIWebBrowserChrome.idl - -interface nsIWebBrowserChrome extends nsISupports { - readonly CHROME_DEFAULT: 1; - readonly CHROME_WINDOW_BORDERS: 2; - readonly CHROME_WINDOW_CLOSE: 4; - readonly CHROME_WINDOW_RESIZE: 8; - readonly CHROME_MENUBAR: 16; - readonly CHROME_TOOLBAR: 32; - readonly CHROME_LOCATIONBAR: 64; - readonly CHROME_STATUSBAR: 128; - readonly CHROME_PERSONAL_TOOLBAR: 256; - readonly CHROME_SCROLLBARS: 512; - readonly CHROME_TITLEBAR: 1024; - readonly CHROME_EXTRA: 2048; - readonly CHROME_ALL: 4094; - readonly CHROME_WINDOW_MINIMIZE: 16384; - readonly CHROME_ALERT: 32768; - readonly CHROME_PRIVATE_WINDOW: 65536; - readonly CHROME_NON_PRIVATE_WINDOW: 131072; - readonly CHROME_PRIVATE_LIFETIME: 262144; - readonly CHROME_ALWAYS_ON_TOP: 524288; - readonly CHROME_REMOTE_WINDOW: 1048576; - readonly CHROME_FISSION_WINDOW: 2097152; - readonly CHROME_SUPPRESS_ANIMATION: 16777216; - readonly CHROME_CENTER_SCREEN: 134217728; - readonly CHROME_DEPENDENT: 268435456; - readonly CHROME_MODAL: 536870912; - readonly CHROME_OPENAS_DIALOG: 1073741824; - readonly CHROME_OPENAS_CHROME: 2147483648; - readonly CHROME_MINIMAL_POPUP: 18126; - - setLinkStatus(status: string): void; - chromeFlags: u32; - showAsModal(): void; - isWindowModal(): boolean; - blur(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/browser/nsIWebBrowserPrint.idl - -interface nsIWebBrowserPrint extends nsISupports { - readonly PRINTPREVIEW_GOTO_PAGENUM: 0; - readonly PRINTPREVIEW_PREV_PAGE: 1; - readonly PRINTPREVIEW_NEXT_PAGE: 2; - readonly PRINTPREVIEW_HOME: 3; - readonly PRINTPREVIEW_END: 4; - - readonly doingPrint: boolean; - readonly doingPrintPreview: boolean; - readonly rawNumPages: i32; - readonly printPreviewNumPages: i32; - readonly printPreviewCurrentPageNumber: i32; - closeWindowAfterPrint: boolean; - printPreviewScrollToPage(aNavType: i16, aPageNum: i32): void; - exitPrintPreview(): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIAppShell.idl - -// https://searchfox.org/mozilla-central/source/widget/nsIBaseWindow.idl - -interface nsIBaseWindow extends nsISupports { - readonly eRepaint: 1; - readonly eDelayResize: 2; - - destroy(): void; - setPosition(x: i32, y: i32): void; - setPositionDesktopPix(x: i32, y: i32): void; - getPosition(x: OutParam, y: OutParam): void; - setSize(cx: i32, cy: i32, fRepaint: boolean): void; - getSize(cx: OutParam, cy: OutParam): void; - setPositionAndSize(x: i32, y: i32, cx: i32, cy: i32, flags: u32): void; - getPositionAndSize(x: OutParam, y: OutParam, cx: OutParam, cy: OutParam): void; - repaint(force: boolean): void; - readonly nativeHandle: string; - visibility: boolean; - enabled: boolean; - readonly devicePixelsPerDesktopPixel: double; - title: string; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIBidiKeyboard.idl - -interface nsIBidiKeyboard extends nsISupports { - reset(): void; - isLangRTL(): boolean; - readonly haveBidiKeyboards: boolean; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIClipboard.idl - -interface nsIAsyncSetClipboardData extends nsISupports { - setData(aTransferable: nsITransferable, aOwner?: nsIClipboardOwner): void; - abort(aReason: nsresult): void; -} - -type nsIAsyncClipboardRequestCallback = Callable<{ - onComplete(aResult: nsresult): void; -}> - -interface nsIClipboardDataSnapshot extends nsISupports { - readonly valid: boolean; - readonly flavorList: string[]; - getData(aTransferable: nsITransferable, aCallback: nsIAsyncClipboardRequestCallback): void; - getDataSync(aTransferable: nsITransferable): void; -} - -interface nsIClipboardGetDataSnapshotCallback extends nsISupports { - onSuccess(aClipboardDataSnapshot: nsIClipboardDataSnapshot): void; - onError(aResult: nsresult): void; -} - -} // global - -declare namespace nsIClipboard { - -enum ClipboardType { - kSelectionClipboard = 0, - kGlobalClipboard = 1, - kFindClipboard = 2, - kSelectionCache = 3, -} - -} - -declare global { - -interface nsIClipboard extends nsISupports, Enums { - setData(aTransferable: nsITransferable, anOwner: nsIClipboardOwner, aWhichClipboard: nsIClipboard.ClipboardType, aSettingWindowContext?: WindowContext): void; - asyncSetData(aWhichClipboard: nsIClipboard.ClipboardType, aSettingWindowContext?: WindowContext, aCallback?: nsIAsyncClipboardRequestCallback): nsIAsyncSetClipboardData; - getData(aTransferable: nsITransferable, aWhichClipboard: nsIClipboard.ClipboardType, aRequestingWindowContext?: WindowContext): void; - getDataSnapshot(aFlavorList: string[], aWhichClipboard: nsIClipboard.ClipboardType, aRequestingWindowContext: WindowContext, aRequestingPrincipal: nsIPrincipal, aCallback: nsIClipboardGetDataSnapshotCallback): void; - getDataSnapshotSync(aFlavorList: string[], aWhichClipboard: nsIClipboard.ClipboardType, aRequestingWindowContext?: WindowContext): nsIClipboardDataSnapshot; - emptyClipboard(aWhichClipboard: nsIClipboard.ClipboardType): void; - hasDataMatchingFlavors(aFlavorList: string[], aWhichClipboard: nsIClipboard.ClipboardType): boolean; - isClipboardTypeSupported(aWhichClipboard: nsIClipboard.ClipboardType): boolean; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIClipboardHelper.idl - -} // global - -declare namespace nsIClipboardHelper { - -enum SensitiveData { - NotSensitive = 0, - Sensitive = 1, -} - -} - -declare global { - -interface nsIClipboardHelper extends nsISupports, Enums { - copyStringToClipboard(aString: string, aClipboardID: nsIClipboard.ClipboardType, aSettingWindowContext?: WindowContext, aSensitive?: nsIClipboardHelper.SensitiveData): void; - copyString(aString: string, aSettingWindowContext?: WindowContext, aSensitive?: nsIClipboardHelper.SensitiveData): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIClipboardOwner.idl - -interface nsIClipboardOwner extends nsISupports { - LosingOwnership(aTransferable: nsITransferable): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIColorPicker.idl - -interface nsIColorPickerShownCallback extends nsISupports { - update(color: string): void; - done(color: string): void; -} - -interface nsIColorPicker extends nsISupports { - init(browsingContext: BrowsingContext, title: string, initialColor: string, defaultColors: string[]): void; - open(aColorPickerShownCallback: nsIColorPickerShownCallback): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIDisplayInfo.idl - -interface nsIDisplayInfo extends nsISupports { - readonly id: i32; - readonly connected: boolean; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIDragService.idl - -interface nsIDragService extends nsISupports { - readonly DRAGDROP_ACTION_NONE: 0; - readonly DRAGDROP_ACTION_COPY: 1; - readonly DRAGDROP_ACTION_MOVE: 2; - readonly DRAGDROP_ACTION_LINK: 4; - readonly DRAGDROP_ACTION_UNINITIALIZED: 64; - - getCurrentSession(aWidgetProvider?: nsISupports): nsIDragSession; - startDragSessionForTests(aWidgetProvider: nsISupports, aAllowedEffect: u32): void; - suppress(): void; - unsuppress(): void; - getMockDragController(): nsIMockDragServiceController; - readonly isMockService: boolean; - neverAllowSessionIsSynthesizedForTests: boolean; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIDragSession.idl - -interface nsIDragSession extends nsISupports { - canDrop: boolean; - onlyChromeDrop: boolean; - dragAction: u32; - readonly numDropItems: u32; - sourceWindowContext: WindowContext; - sourceTopWindowContext: WindowContext; - readonly sourceNode: Node; - triggeringPrincipal: nsIPrincipal; - csp: nsIContentSecurityPolicy; - dataTransfer: DataTransfer; - getData(aTransferable: nsITransferable, aItemIndex: u32): void; - isDataFlavorSupported(aDataFlavor: string): boolean; - userCancelled(): void; - dragEventDispatchedToChildProcess(): void; - updateDragEffect(): void; - updateDragImage(aImage: Node, aImageX: i32, aImageY: i32): void; - setDragEndPoint(aScreenX: i32, aScreenY: i32): void; - setDragEndPointForTests(aScreenX: i32, aScreenY: i32): void; - endDragSession(aDoneDrag: boolean, aKeyModifiers?: u32): void; - sendStoreDropTargetAndDelayEndDragSession(aEvent: DragEvent): void; - sendDispatchToDropTargetAndResumeEndDragSession(aShouldDrop: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIFilePicker.idl - -} // global - -declare namespace nsIFilePicker { - -enum Mode { - modeOpen = 0, - modeSave = 1, - modeGetFolder = 2, - modeOpenMultiple = 3, -} - -enum ResultCode { - returnOK = 0, - returnCancel = 1, - returnReplace = 2, -} - -enum CaptureTarget { - captureNone = 0, - captureDefault = 1, - captureUser = 2, - captureEnv = 3, -} - -} - -declare global { - -interface nsIFilePicker extends nsISupports, Enums { - readonly filterAll: 1; - readonly filterHTML: 2; - readonly filterText: 4; - readonly filterImages: 8; - readonly filterXML: 16; - readonly filterXUL: 32; - readonly filterApps: 64; - readonly filterAllowURLs: 128; - readonly filterAudio: 256; - readonly filterVideo: 512; - readonly filterPDF: 1024; - - init(browsingContext: BrowsingContext, title: string, mode: nsIFilePicker.Mode): void; - isModeSupported(mode: nsIFilePicker.Mode): Promise; - appendFilters(filterMask: i32): void; - appendFilter(title: string, filter: string): void; - appendRawFilter(filter: string): void; - defaultString: string; - defaultExtension: string; - filterIndex: i32; - displayDirectory: nsIFile; - displaySpecialDirectory: string; - readonly file: nsIFile; - readonly fileURL: nsIURI; - readonly files: nsISimpleEnumerator; - readonly domFileOrDirectory: nsISupports; - readonly domFileOrDirectoryEnumerator: nsISimpleEnumerator; - addToRecentDocs: boolean; - open(aFilePickerShownCallback: nsIFilePickerShownCallback): void; - readonly mode: nsIFilePicker.Mode; - okButtonLabel: string; - capture: nsIFilePicker.CaptureTarget; -} - -type nsIFilePickerShownCallback = Callable<{ - done(aResult: nsIFilePicker.ResultCode): void; -}> - -// https://searchfox.org/mozilla-central/source/widget/nsIFormatConverter.idl - -interface nsIFormatConverter extends nsISupports { - getInputDataFlavors(): string[]; - getOutputDataFlavors(): string[]; - canConvert(aFromDataFlavor: string, aToDataFlavor: string): boolean; - convert(aFromDataFlavor: string, aFromData: nsISupports, aToDataFlavor: string, aToData: OutParam): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIGfxInfo.idl - -} // global - -declare namespace nsIGfxInfo { - -enum FontVisibilityDeviceDetermination { - Unassigned = 0, - Unknown_Platform = 1, - Windows_Platform = 2, - MacOS_Unknown = 3, - Android_Unknown_Release_Version = 4, - Android_Unknown_Peloton = 5, - Android_Unknown_vbox = 6, - Android_Unknown_mitv = 7, - Android_Chromebook = 8, - Android_Amazon = 9, - Android_sub_9 = 10, - Android_9_11 = 11, - Android_12_plus = 12, - Linux_Unknown = 13, - Linux_Ubuntu_any = 14, - Linux_Ubuntu_20 = 15, - Linux_Ubuntu_22 = 16, - Linux_Fedora_any = 17, - Linux_Fedora_38 = 18, - Linux_Fedora_39 = 19, - MacOS_13_plus = 20, - MacOS_sub_13 = 21, -} - -} - -declare global { - -interface nsIGfxInfo extends nsISupports, Enums { - readonly D2DEnabled: boolean; - readonly DWriteEnabled: boolean; - readonly EmbeddedInFirefoxReality: boolean; - readonly AzureCanvasBackend: string; - readonly AzureContentBackend: string; - readonly usingGPUProcess: boolean; - readonly usingRemoteCanvas: boolean; - readonly usingAcceleratedCanvas: boolean; - readonly hasBattery: boolean; - readonly DWriteVersion: string; - readonly cleartypeParameters: string; - readonly textScaleFactor: float; - readonly windowProtocol: string; - readonly testType: string; - readonly ContentBackend: string; - readonly isHeadless: boolean; - readonly TargetFrameRate: u32; - readonly CodecSupportInfo: string; - readonly fontVisibilityDetermination: nsIGfxInfo.FontVisibilityDeviceDetermination; - readonly fontVisibilityDeterminationStr: string; - readonly adapterDescription: string; - readonly adapterDescription2: string; - readonly adapterDriver: string; - readonly adapterDriver2: string; - readonly adapterVendorID: string; - readonly adapterVendorID2: string; - readonly adapterDeviceID: string; - readonly adapterDeviceID2: string; - readonly adapterSubsysID: string; - readonly adapterSubsysID2: string; - readonly adapterRAM: u32; - readonly adapterRAM2: u32; - readonly adapterDriverVendor: string; - readonly adapterDriverVendor2: string; - readonly adapterDriverVersion: string; - readonly adapterDriverVersion2: string; - readonly adapterDriverDate: string; - readonly adapterDriverDate2: string; - readonly isGPU2Active: boolean; - readonly drmRenderDevice: string; - getMonitors(): any; - getFailures(indices: OutParam): string[]; - getFeatureStatus(aFeature: i32, aFailureId?: OutParam): i32; - getFeatureStatusStr(aFeature: string, aFailureId?: OutParam): string; - getFeatureSuggestedDriverVersion(aFeature: i32): string; - getFeatureSuggestedDriverVersionStr(aFeature: string): string; - getInfo(): any; - getFeatureLog(): any; - getFeatures(): any; - getActiveCrashGuards(): any; - controlGPUProcessForXPCShell(aEnable: boolean): boolean; - killGPUProcessForTests(): void; - crashGPUProcessForTests(): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIGfxInfoDebug.idl - -interface nsIGfxInfoDebug extends nsISupports { - spoofVendorID(aVendorID: string): void; - spoofDeviceID(aDeviceID: string): void; - spoofDriverVersion(aDriverVersion: string): void; - spoofOSVersion(aVersion: u32): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIMacDockSupport.idl - -interface nsIMacDockSupport extends nsISupports { - dockMenu: nsIStandaloneNativeMenu; - activateApplication(aIgnoreOtherApplications: boolean): void; - badgeText: string; - setBadgeImage(aBadgeImage: imgIContainer, aPaintContext?: nsISVGPaintContext): void; - readonly isAppInDock: boolean; - ensureAppIsPinnedToDock(aAppPath?: string, aAppToReplacePath?: string): boolean; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIMacFinderProgress.idl - -type nsIMacFinderProgressCanceledCallback = Callable<{ - canceled(): void; -}> - -interface nsIMacFinderProgress extends nsISupports { - init(path: string, canceledCallback: nsIMacFinderProgressCanceledCallback): void; - updateProgress(currentProgress: u64, totalProgress: u64): void; - end(): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIMacSharingService.idl - -interface nsIMacSharingService extends nsISupports { - getSharingProviders(pageUrl: string): any; - shareUrl(serviceName: string, pageUrl: string, pageTitle: string): void; - openSharingPreferences(): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIMacUserActivityUpdater.idl - -interface nsIMacUserActivityUpdater extends nsISupports { - updateLocation(pageUrl: string, pageTitle: string, window: nsIBaseWindow): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIMacWebAppUtils.idl - -type nsITrashAppCallback = Callable<{ - trashAppFinished(rv: nsresult): void; -}> - -interface nsIMacWebAppUtils extends nsISupports { - pathForAppWithIdentifier(bundleIdentifier: string): string; - launchAppWithIdentifier(bundleIdentifier: string): void; - trashApp(path: string, callback: nsITrashAppCallback): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIMockDragServiceController.idl - -} // global - -declare namespace nsIMockDragServiceController { - -enum EventType { - eDragEnter = 0, - eDragOver = 1, - eDragExit = 2, - eDrop = 3, - eMouseDown = 4, - eMouseMove = 5, - eMouseUp = 6, -} - -} - -declare global { - -interface nsIMockDragServiceController extends nsISupports, Enums { - readonly mockDragService: nsIDragService; - sendEvent(aBC: BrowsingContext, aEventType: nsIMockDragServiceController.EventType, aScreenX: i32, aScreenY: i32, aKeyModifiers?: u32): void; - cancelDrag(aKeyModifiers?: u32): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIPaper.idl - -interface nsIPaper extends nsISupports { - readonly id: string; - readonly name: string; - readonly width: double; - readonly height: double; - readonly unwriteableMargin: Promise; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIPaperMargin.idl - -interface nsIPaperMargin extends nsISupports { - readonly top: double; - readonly right: double; - readonly bottom: double; - readonly left: double; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIPrintDialogService.idl - -interface nsIPrintDialogService extends nsISupports { - init(): void; - showPrintDialog(aParent: mozIDOMWindowProxy, aHaveSelection: boolean, aPrintSettings: nsIPrintSettings): void; - showPageSetupDialog(aParent: mozIDOMWindowProxy, aPrintSettings: nsIPrintSettings): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIPrintSettings.idl - -} // global - -declare namespace nsIPrintSettings { - -enum OutputDestinationType { - kOutputDestinationPrinter = 0, - kOutputDestinationFile = 1, - kOutputDestinationStream = 2, -} - -} - -declare global { - -interface nsIPrintSettings extends nsISupports, Enums { - readonly kInitSaveHeaderLeft: 2; - readonly kInitSaveHeaderCenter: 4; - readonly kInitSaveHeaderRight: 8; - readonly kInitSaveFooterLeft: 16; - readonly kInitSaveFooterCenter: 32; - readonly kInitSaveFooterRight: 64; - readonly kInitSaveBGColors: 128; - readonly kInitSaveBGImages: 256; - readonly kInitSavePaperSize: 512; - readonly kInitSaveDuplex: 2048; - readonly kInitSaveUnwriteableMargins: 16384; - readonly kInitSaveEdges: 32768; - readonly kInitSaveReversed: 65536; - readonly kInitSaveInColor: 131072; - readonly kInitSaveOrientation: 262144; - readonly kInitSavePrinterName: 1048576; - readonly kInitSavePrintToFile: 2097152; - readonly kInitSaveToFileName: 4194304; - readonly kInitSavePageDelay: 8388608; - readonly kInitSaveMargins: 16777216; - readonly kInitSaveShrinkToFit: 134217728; - readonly kInitSaveScaling: 268435456; - readonly kInitSaveAll: 4294967295; - readonly kGlobalSettings: 134447614; - readonly kPrintDialogPersistSettings: 428313598; - readonly kJustLeft: 0; - readonly kJustCenter: 1; - readonly kJustRight: 2; - readonly kPaperSizeInches: 0; - readonly kPaperSizeMillimeters: 1; - readonly kPortraitOrientation: 0; - readonly kLandscapeOrientation: 1; - readonly kOutputFormatNative: 0; - readonly kOutputFormatPDF: 2; - readonly kDuplexNone: 0; - readonly kDuplexFlipOnLongEdge: 1; - readonly kDuplexFlipOnShortEdge: 2; - - GetEffectivePageSize(aWidth: OutParam, aHeight: OutParam): void; - clone(): nsIPrintSettings; - assign(aPS: nsIPrintSettings): void; - equivalentTo(aPrintSettings: nsIPrintSettings): boolean; - edgeTop: double; - edgeLeft: double; - edgeBottom: double; - edgeRight: double; - marginTop: double; - marginLeft: double; - marginBottom: double; - marginRight: double; - unwriteableMarginTop: double; - unwriteableMarginLeft: double; - unwriteableMarginBottom: double; - unwriteableMarginRight: double; - scaling: double; - printBGColors: boolean; - printBGImages: boolean; - honorPageRuleMargins: boolean; - usePageRuleSizeAsPaperSize: boolean; - ignoreUnwriteableMargins: boolean; - showMarginGuides: boolean; - printSelectionOnly: boolean; - title: string; - docURL: string; - headerStrLeft: string; - headerStrCenter: string; - headerStrRight: string; - footerStrLeft: string; - footerStrCenter: string; - footerStrRight: string; - printSilent: boolean; - shrinkToFit: boolean; - paperId: string; - paperWidth: double; - paperHeight: double; - paperSizeUnit: i16; - printReversed: boolean; - printInColor: boolean; - orientation: i32; - numCopies: i32; - numPagesPerSheet: i32; - outputDestination: nsIPrintSettings.OutputDestinationType; - outputFormat: i16; - printerName: string; - toFileName: string; - outputStream: nsIOutputStream; - printPageDelay: i32; - resolution: i32; - duplex: i32; - isInitializedFromPrinter: boolean; - isInitializedFromPrefs: boolean; - pageRanges: i32[]; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIPrintSettingsService.idl - -interface nsIPrintSettingsService extends nsISupports { - createNewPrintSettings(): nsIPrintSettings; - readonly lastUsedPrinterName: string; - initPrintSettingsFromPrinter(aPrinterName: string, aPrintSettings: nsIPrintSettings): void; - initPrintSettingsFromPrefs(aPrintSettings: nsIPrintSettings, aUsePrinterNamePrefix: boolean, aFlags: u32): void; - maybeSavePrintSettingsToPrefs(aPrintSettings: nsIPrintSettings, aFlags: u32): void; - maybeSaveLastUsedPrinterNameToPrefs(aPrinterName: string): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIPrinter.idl - -interface nsIPrinterInfo extends nsISupports { - readonly paperList: nsIPaper[]; - readonly defaultSettings: nsIPrintSettings; -} - -interface nsIPrinter extends nsISupports { - readonly name: string; - readonly systemName: string; - readonly printerInfo: Promise; - copyFromWithValidation(aSettingsToCopyFrom: nsIPrintSettings): Promise; - readonly supportsDuplex: Promise; - readonly supportsColor: Promise; - readonly supportsMonochrome: Promise; - readonly supportsCollation: Promise; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIPrinterList.idl - -interface nsIPrinterList extends nsISupports { - initPrintSettingsFromPrinter(aPrinterName: string, aPrintSettings: nsIPrintSettings): void; - readonly systemDefaultPrinterName: string; - getPrinterByName(aPrinterName: string): Promise; - getPrinterBySystemName(aPrinterName: string): Promise; - getNamedOrDefaultPrinter(aPrinterName: string): Promise; - readonly printers: Promise; - readonly fallbackPaperList: Promise; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIScreen.idl - -interface nsIScreen extends nsISupports { - GetRect(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; - GetAvailRect(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; - GetRectDisplayPix(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; - GetAvailRectDisplayPix(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; - readonly pixelDepth: i32; - readonly colorDepth: i32; - readonly contentsScaleFactor: double; - readonly defaultCSSScaleFactor: double; - readonly dpi: float; - readonly refreshRate: i32; - readonly isPseudoDisplay: boolean; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIScreenManager.idl - -interface nsIScreenManager extends nsISupports { - screenForRect(left: i32, top: i32, width: i32, height: i32): nsIScreen; - readonly primaryScreen: nsIScreen; - readonly totalScreenPixels: i64; -} - -// https://searchfox.org/mozilla-central/source/widget/nsISharePicker.idl - -interface nsISharePicker extends nsISupports { - init(openerWindow: mozIDOMWindowProxy): void; - readonly openerWindow: mozIDOMWindowProxy; - share(title: string, text: string, url: nsIURI): Promise; -} - -// https://searchfox.org/mozilla-central/source/widget/nsISound.idl - -interface nsISound extends nsISupports { - readonly EVENT_NEW_MAIL_RECEIVED: 0; - readonly EVENT_ALERT_DIALOG_OPEN: 1; - readonly EVENT_CONFIRM_DIALOG_OPEN: 2; - readonly EVENT_PROMPT_DIALOG_OPEN: 3; - readonly EVENT_SELECT_DIALOG_OPEN: 4; - readonly EVENT_MENU_EXECUTE: 5; - readonly EVENT_MENU_POPUP: 6; - readonly EVENT_EDITOR_MAX_LEN: 7; - - play(aURL: nsIURL): void; - beep(): void; - init(): void; - playEventSound(aEventId: u32): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIStandaloneNativeMenu.idl - -interface nsIStandaloneNativeMenu extends nsISupports { - init(aElement: Element): void; - menuWillOpen(): boolean; - activateNativeMenuItemAt(anIndexString: string): void; - forceUpdateNativeMenuAt(anIndexString: string): void; - dump(): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsISystemStatusBar.idl - -interface nsISystemStatusBar extends nsISupports { - addItem(aMenuElement: Element): void; - removeItem(aMenuElement: Element): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsITaskbarProgress.idl - -interface nsITaskbarProgress extends nsISupports { - readonly STATE_NO_PROGRESS: 0; - readonly STATE_INDETERMINATE: 1; - readonly STATE_NORMAL: 2; - readonly STATE_ERROR: 3; - readonly STATE_PAUSED: 4; - - setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsITouchBarHelper.idl - -interface nsITouchBarHelper extends nsISupports { - readonly activeUrl: string; - readonly activeTitle: string; - readonly isUrlbarFocused: boolean; - toggleFocusUrlbar(): void; - unfocusUrlbar(): void; - allItems: nsIArray; - readonly document: Document; - getTouchBarInput(aInputName: string): nsITouchBarInput; - insertRestrictionInUrlbar(aToken: string): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsITouchBarInput.idl - -type nsITouchBarInputCallback = Callable<{ - onCommand(): void; -}> - -interface nsITouchBarInput extends nsISupports { - readonly key: string; - title: string; - image: nsIURI; - type: string; - callback: nsITouchBarInputCallback; - color: u32; - disabled: boolean; - children: nsIArray; -} - -// https://searchfox.org/mozilla-central/source/widget/nsITouchBarUpdater.idl - -interface nsITouchBarUpdater extends nsISupports { - updateTouchBarInputs(aWindow: nsIBaseWindow, aInputs: nsITouchBarInput[]): void; - enterCustomizeMode(): void; - isTouchBarInitialized(): boolean; - setTouchBarInitialized(aIsInitialized: boolean): void; - showPopover(aWindow: nsIBaseWindow, aPopover: nsITouchBarInput, aShowing: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/widget/nsITransferable.idl - -interface nsIFlavorDataProvider extends nsISupports { - getFlavorData(aTransferable: nsITransferable, aFlavor: string, aData: OutParam): void; -} - -interface nsITransferable extends nsISupports { - init(aContext: nsILoadContext): void; - flavorsTransferableCanExport(): string[]; - getTransferData(aFlavor: string, aData: OutParam): void; - getAnyTransferData(aFlavor: OutParam, aData: OutParam): void; - flavorsTransferableCanImport(): string[]; - setTransferData(aFlavor: string, aData: nsISupports): void; - clearAllData(): void; - addDataFlavor(aDataFlavor: string): void; - removeDataFlavor(aDataFlavor: string): void; - converter: nsIFormatConverter; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIUserIdleService.idl - -interface nsIUserIdleService extends nsISupports { - readonly idleTime: u32; - addIdleObserver(observer: nsIObserver, time: u32): void; - removeIdleObserver(observer: nsIObserver, time: u32): void; - disabled: boolean; -} - -// https://searchfox.org/mozilla-central/source/widget/nsIUserIdleServiceInternal.idl - -interface nsIUserIdleServiceInternal extends nsIUserIdleService { - resetIdleTimeOut(idleDeltaInMS: u32): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/about/nsIAboutModule.idl - -interface nsIAboutModule extends nsISupports { - readonly URI_SAFE_FOR_UNTRUSTED_CONTENT: 1; - readonly ALLOW_SCRIPT: 2; - readonly HIDE_FROM_ABOUTABOUT: 4; - readonly ENABLE_INDEXED_DB: 8; - readonly URI_CAN_LOAD_IN_CHILD: 16; - readonly URI_MUST_LOAD_IN_CHILD: 32; - readonly MAKE_UNLINKABLE: 64; - readonly MAKE_LINKABLE: 128; - readonly URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS: 256; - readonly URI_MUST_LOAD_IN_EXTENSION_PROCESS: 512; - readonly IS_SECURE_CHROME_UI: 1024; - - newChannel(aURI: nsIURI, aLoadInfo: nsILoadInfo): nsIChannel; - getURIFlags(aURI: nsIURI): u32; - getChromeURI(aURI: nsIURI): nsIURI; -} - -// https://searchfox.org/mozilla-central/source/dom/xslt/xslt/txIEXSLTFunctions.idl - -interface txIEXSLTFunctions extends nsISupports { - match(str: string, regex: string, flags: string, doc: Document): DocumentFragment; - replace(str: string, regex: string, flags: string, replace: string): string; - test(str: string, regex: string, flags: string): boolean; -} - -// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnArgs.idl - -// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnAttObj.idl - -// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnPromise.idl - -// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnResult.idl - -// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnService.idl - -interface nsICredentialParameters extends nsISupports { - readonly credentialId: string; - readonly isResidentCredential: boolean; - readonly rpId: string; - readonly privateKey: string; - readonly userHandle: string; - readonly signCount: u32; -} - -interface nsIWebAuthnAutoFillEntry extends nsISupports { - readonly PROVIDER_UNKNOWN: 0; - readonly PROVIDER_TEST_TOKEN: 1; - readonly PROVIDER_PLATFORM_WINDOWS: 2; - readonly PROVIDER_PLATFORM_MACOS: 3; - readonly PROVIDER_PLATFORM_ANDROID: 4; - - readonly provider: u8; - readonly userName: string; - readonly rpId: string; - readonly credentialId: u8[]; -} - -interface nsIWebAuthnService extends nsISupports { - readonly isUVPAA: boolean; - cancel(aTransactionId: u64): void; - hasPendingConditionalGet(aBrowsingContextId: u64, aOrigin: string): u64; - getAutoFillEntries(aTransactionId: u64): nsIWebAuthnAutoFillEntry[]; - selectAutoFillEntry(aTransactionId: u64, aCredentialId: u8[]): void; - resumeConditionalGet(aTransactionId: u64): void; - pinCallback(aTransactionId: u64, aPin: string): void; - setHasAttestationConsent(aTransactionId: u64, aHasConsent: boolean): void; - selectionCallback(aTransactionId: u64, aIndex: u64): void; - addVirtualAuthenticator(protocol: string, transport: string, hasResidentKey: boolean, hasUserVerification: boolean, isUserConsenting: boolean, isUserVerified: boolean): u64; - removeVirtualAuthenticator(authenticatorId: u64): void; - addCredential(authenticatorId: u64, credentialId: string, isResidentCredential: boolean, rpId: string, privateKey: string, userHandle: string, signCount: u32): void; - getCredentials(authenticatorId: u64): nsICredentialParameters[]; - removeCredential(authenticatorId: u64, credentialId: string): void; - removeAllCredentials(authenticatorId: u64): void; - setUserVerified(authenticatorId: u64, isUserVerified: boolean): void; - listen(): void; - runCommand(aCommand: string): void; -} - -// https://searchfox.org/mozilla-central/source/image/imgICache.idl - -interface imgICache extends nsISupports { - clearCache(chrome: boolean): void; - removeEntriesFromPrincipalInAllProcesses(aPrincipal: nsIPrincipal): void; - removeEntriesFromSiteInAllProcesses(aBaseDomain: string, OriginAttributesPattern: any): void; - findEntryProperties(uri: nsIURI, doc?: Document): nsIProperties; - respectPrivacyNotifications(): void; -} - -// https://searchfox.org/mozilla-central/source/image/imgIContainer.idl - -} // global - -declare namespace imgIContainer { - -enum DecodeResult { - DECODE_SURFACE_AVAILABLE = 0, - DECODE_REQUESTED = 1, - DECODE_REQUEST_FAILED = 2, -} - -} - -declare global { - -interface imgIContainer extends nsISupports, Enums { - readonly TYPE_RASTER: 0; - readonly TYPE_VECTOR: 1; - readonly TYPE_REQUEST: 2; - readonly FLAG_NONE: 0; - readonly FLAG_SYNC_DECODE: 1; - readonly FLAG_SYNC_DECODE_IF_FAST: 2; - readonly FLAG_ASYNC_NOTIFY: 4; - readonly FLAG_DECODE_NO_PREMULTIPLY_ALPHA: 8; - readonly FLAG_DECODE_NO_COLORSPACE_CONVERSION: 16; - readonly FLAG_CLAMP: 32; - readonly FLAG_HIGH_QUALITY_SCALING: 64; - readonly FLAG_BYPASS_SURFACE_CACHE: 128; - readonly FLAG_FORCE_PRESERVEASPECTRATIO_NONE: 256; - readonly FLAG_FORCE_UNIFORM_SCALING: 512; - readonly FLAG_AVOID_REDECODE_FOR_SIZE: 1024; - readonly FLAG_DECODE_TO_SRGB_COLORSPACE: 2048; - readonly FLAG_RECORD_BLOB: 4096; - readonly DECODE_FLAGS_DEFAULT: 0; - readonly DECODE_FLAGS_FOR_REENCODE: 2056; - readonly FRAME_FIRST: 0; - readonly FRAME_CURRENT: 1; - readonly FRAME_MAX_VALUE: 1; - readonly kNormalAnimMode: 0; - readonly kDontAnimMode: 1; - readonly kLoopOnceAnimMode: 2; - - readonly width: i32; - readonly height: i32; - readonly hotspotX: i32; - readonly hotspotY: i32; - readonly type: u16; - readonly animated: boolean; - readonly providerId: u32; - lockImage(): void; - unlockImage(): void; - requestDiscard(): void; - animationMode: u16; - resetAnimation(): void; -} - -// https://searchfox.org/mozilla-central/source/image/imgIContainerDebug.idl - -interface imgIContainerDebug extends nsISupports { - readonly framesNotified: u32; -} - -// https://searchfox.org/mozilla-central/source/image/imgIEncoder.idl - -interface imgIEncoder extends nsIAsyncInputStream { - readonly INPUT_FORMAT_RGB: 0; - readonly INPUT_FORMAT_RGBA: 1; - readonly INPUT_FORMAT_HOSTARGB: 2; - - initFromData(data: u8[], length: u32, width: u32, height: u32, stride: u32, inputFormat: u32, outputOptions: string): void; - startImageEncode(width: u32, height: u32, inputFormat: u32, outputOptions: string): void; - addImageFrame(data: u8[], length: u32, width: u32, height: u32, stride: u32, frameFormat: u32, frameOptions: string): void; - endImageEncode(): void; -} - -// https://searchfox.org/mozilla-central/source/image/imgILoader.idl - -interface imgILoader extends nsISupports { - readonly LOAD_CORS_ANONYMOUS: 65536; - readonly LOAD_CORS_USE_CREDENTIALS: 131072; - - loadImageXPCOM(aURI: nsIURI, aInitialDocumentURL: nsIURI, aReferrerInfo: nsIReferrerInfo, aLoadingPrincipal: nsIPrincipal, aLoadGroup: nsILoadGroup, aObserver: imgINotificationObserver, aLoadingDocument: Document, aLoadFlags: nsLoadFlags, cacheKey: nsISupports, aContentPolicyType?: nsContentPolicyType): imgIRequest; - loadImageWithChannelXPCOM(aChannel: nsIChannel, aObserver: imgINotificationObserver, aLoadingDocument: Document, aListener: OutParam): imgIRequest; -} - -// https://searchfox.org/mozilla-central/source/image/imgINotificationObserver.idl - -interface imgINotificationObserver extends nsISupports { - readonly SIZE_AVAILABLE: 1; - readonly FRAME_UPDATE: 2; - readonly FRAME_COMPLETE: 3; - readonly LOAD_COMPLETE: 4; - readonly DECODE_COMPLETE: 5; - readonly DISCARD: 6; - readonly UNLOCKED_DRAW: 7; - readonly IS_ANIMATED: 8; - readonly HAS_TRANSPARENCY: 9; -} - -// https://searchfox.org/mozilla-central/source/image/imgIRequest.idl - -interface imgIRequest extends nsIRequest { - readonly STATUS_NONE: 0; - readonly STATUS_SIZE_AVAILABLE: 1; - readonly STATUS_LOAD_COMPLETE: 2; - readonly STATUS_ERROR: 4; - readonly STATUS_FRAME_COMPLETE: 8; - readonly STATUS_DECODE_COMPLETE: 16; - readonly STATUS_IS_ANIMATED: 32; - readonly STATUS_HAS_TRANSPARENCY: 64; - readonly CATEGORY_FRAME_INIT: 1; - readonly CATEGORY_FRAME_STYLE: 2; - readonly CATEGORY_SIZE_QUERY: 4; - readonly CATEGORY_DISPLAY: 8; - - readonly image: imgIContainer; - readonly providerId: u32; - readonly triggeringPrincipal: nsIPrincipal; - readonly imageStatus: u32; - readonly URI: nsIURI; - readonly finalURI: nsIURI; - readonly notificationObserver: imgINotificationObserver; - readonly mimeType: string; - readonly fileName: string; - clone(aObserver: imgINotificationObserver): imgIRequest; - readonly imagePrincipal: nsIPrincipal; - readonly hadCrossOriginRedirects: boolean; - readonly multipart: boolean; - readonly CORSMode: i32; - readonly referrerInfo: nsIReferrerInfo; - cancelAndForgetObserver(aStatus: nsresult): void; - startDecoding(aFlags: u32): void; - lockImage(): void; - unlockImage(): void; - requestDiscard(): void; - getStaticRequest(): imgIRequest; - incrementAnimationConsumers(): void; - decrementAnimationConsumers(): void; - boostPriority(aCategory: u32): void; -} - -// https://searchfox.org/mozilla-central/source/image/imgIScriptedNotificationObserver.idl - -interface imgIScriptedNotificationObserver extends nsISupports { - sizeAvailable(aRequest: imgIRequest): void; - frameUpdate(aRequest: imgIRequest): void; - frameComplete(aRequest: imgIRequest): void; - loadComplete(aRequest: imgIRequest): void; - decodeComplete(aRequest: imgIRequest): void; - discard(aRequest: imgIRequest): void; - isAnimated(aRequest: imgIRequest): void; - hasTransparency(aRequest: imgIRequest): void; -} - -// https://searchfox.org/mozilla-central/source/image/imgITools.idl - -interface imgITools extends nsISupports { - decodeImageFromBuffer(aBuffer: string, aSize: u32, aMimeType: string): imgIContainer; - decodeImageFromArrayBuffer(aArrayBuffer: any, aMimeType: string): imgIContainer; - decodeImageFromChannelAsync(aURI: nsIURI, aChannel: nsIChannel, aCallback: imgIContainerCallback, aObserver: imgINotificationObserver): void; - decodeImageAsync(aStream: nsIInputStream, aMimeType: string, aCallback: imgIContainerCallback, aEventTarget: nsIEventTarget): void; - encodeImage(aContainer: imgIContainer, aMimeType: string, outputOptions?: string): nsIInputStream; - encodeScaledImage(aContainer: imgIContainer, aMimeType: string, aWidth: i32, aHeight: i32, outputOptions?: string): nsIInputStream; - getImgLoaderForDocument(doc: Document): imgILoader; - getImgCacheForDocument(doc: Document): imgICache; - encodeCroppedImage(aContainer: imgIContainer, aMimeType: string, aOffsetX: i32, aOffsetY: i32, aWidth: i32, aHeight: i32, outputOptions?: string): nsIInputStream; - createScriptedObserver(aObserver: imgIScriptedNotificationObserver): imgINotificationObserver; -} - -type imgIContainerCallback = Callable<{ - onImageReady(aImage: imgIContainer, aStatus: nsresult): void; -}> - -// https://searchfox.org/mozilla-central/source/image/nsIIconURI.idl - -interface nsIMozIconURI extends nsIURI { - readonly iconURL: nsIURL; - readonly imageSize: u32; - readonly stockIcon: string; - readonly iconSize: string; - readonly iconState: string; - readonly contentType: string; - readonly fileExtension: string; -} - -// https://searchfox.org/mozilla-central/source/netwerk/socket/nsISocketProvider.idl - -interface nsISocketProvider extends nsISupports { - readonly PROXY_RESOLVES_HOST: 1; - readonly ANONYMOUS_CONNECT: 2; - readonly NO_PERMANENT_STORAGE: 4; - readonly BE_CONSERVATIVE: 8; - readonly ANONYMOUS_CONNECT_ALLOW_CLIENT_CERT: 16; - readonly IS_SPECULATIVE_CONNECTION: 32; - readonly DONT_TRY_ECH: 1024; - readonly IS_RETRY: 2048; - readonly USED_PRIVATE_DNS: 4096; -} - -// https://searchfox.org/mozilla-central/source/netwerk/socket/nsISocketProviderService.idl - -interface nsISocketProviderService extends nsISupports { - getSocketProvider(socketType: string): nsISocketProvider; -} - -// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBCallbacks.idl - -type nsISDBCallback = Callable<{ - onComplete(aRequest: nsISDBRequest): void; -}> - -type nsISDBCloseCallback = Callable<{ - onClose(aConnection: nsISDBConnection): void; -}> - -// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBConnection.idl - -interface nsISDBConnection extends nsISupports { - init(aPrincipal: nsIPrincipal, aPersistenceType?: string): void; - open(aName: string): nsISDBRequest; - seek(offset: u64): nsISDBRequest; - read(size: u64): nsISDBRequest; - write(value: any): nsISDBRequest; - close(): nsISDBRequest; - closeCallback: nsISDBCloseCallback; -} - -// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBRequest.idl - -interface nsISDBRequest extends nsISupports { - readonly result: nsIVariant; - readonly resultCode: nsresult; - readonly resultName: string; - callback: nsISDBCallback; -} - -// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBResults.idl - -interface nsISDBResult extends nsISupports { - getAsArray(): u8[]; - getAsArrayBuffer(): any; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/captivedetect/nsICaptivePortalDetector.idl - -interface nsICaptivePortalCallback extends nsISupports { - prepare(): void; - complete(success: boolean): void; -} - -interface nsICaptivePortalDetector extends nsISupports { - checkCaptivePortal(ifname: string, callback: nsICaptivePortalCallback): void; - abort(ifname: string): void; - cancelLogin(eventId: string): void; - finishPreparation(ifname: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/media/bridge/IPeerConnection.idl - -interface IPeerConnectionObserver extends nsISupports { -} - -interface IPeerConnection extends nsISupports { - readonly kHintAudio: 1; - readonly kHintVideo: 2; - readonly kActionNone: -1; - readonly kActionOffer: 0; - readonly kActionAnswer: 1; - readonly kActionPRAnswer: 2; - readonly kActionRollback: 3; - readonly kIceGathering: 0; - readonly kIceWaiting: 1; - readonly kIceChecking: 2; - readonly kIceConnected: 3; - readonly kIceFailed: 4; - readonly kNew: 0; - readonly kNegotiating: 1; - readonly kActive: 2; - readonly kClosing: 3; - readonly kClosed: 4; - readonly kDataChannelReliable: 0; - readonly kDataChannelPartialReliableRexmit: 1; - readonly kDataChannelPartialReliableTimed: 2; - readonly kNoError: 0; - readonly kInvalidCandidate: 2; - readonly kInvalidMediastreamTrack: 3; - readonly kInvalidState: 4; - readonly kInvalidSessionDescription: 5; - readonly kIncompatibleSessionDescription: 6; - readonly kIncompatibleMediaStreamTrack: 8; - readonly kInternalError: 9; - readonly kTypeError: 10; - readonly kOperationError: 11; - readonly kMaxErrorType: 11; -} - -// https://searchfox.org/mozilla-central/source/dom/events/nsIEventListenerService.idl - -interface nsIEventListenerChange extends nsISupports { - readonly target: EventTarget; -} - -type nsIListenerChangeListener = Callable<{ - listenersChanged(aEventListenerChanges: nsIArray): void; -}> - -interface nsIEventListenerInfo extends nsISupports { - readonly type: string; - readonly capturing: boolean; - readonly allowsUntrusted: boolean; - readonly inSystemEventGroup: boolean; - enabled: boolean; - readonly listenerObject: any; - toSource(): string; -} - -interface nsIEventListenerService extends nsISupports { - getListenerInfoFor(aEventTarget: EventTarget): nsIEventListenerInfo[]; - hasListenersFor(aEventTarget: EventTarget, aType: string): boolean; - addListenerForAllEvents(target: EventTarget, listener: any, aUseCapture?: boolean, aWantsUntrusted?: boolean, aSystemEventGroup?: boolean): void; - removeListenerForAllEvents(target: EventTarget, listener: any, aUseCapture?: boolean, aSystemEventGroup?: boolean): void; - addListenerChangeListener(aListener: nsIListenerChangeListener): void; - removeListenerChangeListener(aListener: nsIListenerChangeListener): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/webtransport/nsIWebTransport.idl - -} // global - -declare namespace nsIWebTransport { - -enum WebTransportError { - UNKNOWN_ERROR = 0, - INVALID_STATE_ERROR = 1, -} - -} - -declare global { - -interface nsIWebTransport extends nsISupports, Enums { - asyncConnect(aURI: nsIURI, aDedicated: boolean, aServerCertHashes: nsIWebTransportHash[], aLoadingPrincipal: nsIPrincipal, aSecurityFlags: u32, aListener: WebTransportSessionEventListener): void; - getStats(): void; - closeSession(aErrorCode: u32, aReason: string): void; - createOutgoingBidirectionalStream(aListener: nsIWebTransportStreamCallback): void; - createOutgoingUnidirectionalStream(aListener: nsIWebTransportStreamCallback): void; - sendDatagram(aData: u8[], aTrackingId: u64): void; - getMaxDatagramSize(): void; -} - -} // global - -declare namespace WebTransportSessionEventListener { - -enum DatagramOutcome { - UNKNOWN = 0, - DROPPED_TOO_MUCH_DATA = 1, - SENT = 2, -} - -} - -declare global { - -interface WebTransportSessionEventListener extends nsISupports, Enums { - onSessionReady(aSessionId: u64): void; - onSessionClosed(aCleanly: boolean, aErrorCode: u32, aReason: string): void; - onIncomingBidirectionalStreamAvailable(aStream: nsIWebTransportBidirectionalStream): void; - onIncomingUnidirectionalStreamAvailable(aStream: nsIWebTransportReceiveStream): void; - onStopSending(aStreamId: u64, aError: nsresult): void; - onResetReceived(aStreamId: u64, aError: nsresult): void; - onDatagramReceived(aData: u8[]): void; - onMaxDatagramSize(aSize: u64): void; - onOutgoingDatagramOutCome(aId: u64, aOutCome: WebTransportSessionEventListener.DatagramOutcome): void; -} - -interface nsIWebTransportStreamCallback extends nsISupports { - onBidirectionalStreamReady(aStream: nsIWebTransportBidirectionalStream): void; - onUnidirectionalStreamReady(aStream: nsIWebTransportSendStream): void; - onError(aError: u8): void; -} - -interface nsIWebTransportHash extends nsISupports { - readonly algorithm: string; - readonly value: u8[]; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/webtransport/nsIWebTransportStream.idl - -interface nsIWebTransportSendStreamStats extends nsISupports { - readonly bytesSent: u64; - readonly bytesAcknowledged: u64; -} - -interface nsIWebTransportReceiveStreamStats extends nsISupports { - readonly bytesReceived: u64; -} - -interface nsIWebTransportStreamStatsCallback extends nsISupports { - onSendStatsAvailable(aStats: nsIWebTransportSendStreamStats): void; - onReceiveStatsAvailable(aStats: nsIWebTransportReceiveStreamStats): void; -} - -interface nsIWebTransportReceiveStream extends nsISupports { - sendStopSending(aError: u8): void; - getReceiveStreamStats(aCallback: nsIWebTransportStreamStatsCallback): void; - readonly hasReceivedFIN: boolean; - readonly inputStream: nsIAsyncInputStream; - readonly streamId: u64; -} - -interface nsIWebTransportSendStream extends nsISupports { - sendFin(): void; - reset(aErrorCode: u8): void; - getSendStreamStats(aCallback: nsIWebTransportStreamStatsCallback): void; - readonly outputStream: nsIAsyncOutputStream; - readonly streamId: u64; -} - -interface nsIWebTransportBidirectionalStream extends nsISupports { - sendStopSending(aError: u8): void; - sendFin(): void; - reset(aErrorCode: u8): void; - readonly hasReceivedFIN: boolean; - readonly inputStream: nsIAsyncInputStream; - readonly outputStream: nsIAsyncOutputStream; - readonly streamId: u64; -} - -// https://searchfox.org/mozilla-central/source/ipc/glue/test/utility_process_xpcom/nsIUtilityProcessTest.idl - -interface nsIUtilityProcessTest extends nsISupports { - startProcess(actorsToAdd?: string[]): Promise; - untilChildProcessDead(pid: u32): Promise; - noteIntentionalCrash(pid: u32): void; - stopProcess(utilityActorName?: string): void; - testTelemetryProbes(): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheEntry.idl - -interface nsICacheEntry extends nsISupports { - readonly CONTENT_TYPE_UNKNOWN: 0; - readonly CONTENT_TYPE_OTHER: 1; - readonly CONTENT_TYPE_JAVASCRIPT: 2; - readonly CONTENT_TYPE_IMAGE: 3; - readonly CONTENT_TYPE_MEDIA: 4; - readonly CONTENT_TYPE_STYLESHEET: 5; - readonly CONTENT_TYPE_WASM: 6; - readonly CONTENT_TYPE_LAST: 7; - readonly NO_EXPIRATION_TIME: 4294967295; - - readonly key: string; - readonly cacheEntryId: u64; - readonly persistent: boolean; - readonly fetchCount: u32; - readonly lastFetched: u32; - readonly lastModified: u32; - readonly expirationTime: u32; - setExpirationTime(expirationTime: u32): void; - readonly onStartTime: u64; - readonly onStopTime: u64; - setNetworkTimes(onStartTime: u64, onStopTime: u64): void; - setContentType(contentType: u8): void; - forceValidFor(aSecondsToTheFuture: u32): void; - readonly isForcedValid: boolean; - markForcedValidUse(): void; - openInputStream(offset: i64): nsIInputStream; - openOutputStream(offset: i64, predictedSize: i64): nsIOutputStream; - securityInfo: nsITransportSecurityInfo; - readonly storageDataSize: u32; - asyncDoom(listener: nsICacheEntryDoomCallback): void; - getMetaDataElement(key: string): string; - setMetaDataElement(key: string, value: string): void; - visitMetaData(visitor: nsICacheEntryMetaDataVisitor): void; - metaDataReady(): void; - setValid(): void; - dismiss(): void; - readonly diskStorageSizeInKB: u32; - recreate(aMemoryOnly?: boolean): nsICacheEntry; - readonly dataSize: i64; - readonly altDataSize: i64; - readonly altDataType: string; - openAlternativeOutputStream(type: string, predictedSize: i64): nsIAsyncOutputStream; - openAlternativeInputStream(type: string): nsIInputStream; - readonly loadContextInfo: nsILoadContextInfo; -} - -interface nsICacheEntryMetaDataVisitor extends nsISupports { - onMetaDataElement(key: string, value: string): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheEntryDoomCallback.idl - -interface nsICacheEntryDoomCallback extends nsISupports { - onCacheEntryDoomed(aResult: nsresult): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheEntryOpenCallback.idl - -interface nsICacheEntryOpenCallback extends nsISupports { - readonly ENTRY_WANTED: 0; - readonly RECHECK_AFTER_WRITE_FINISHED: 1; - readonly ENTRY_NEEDS_REVALIDATION: 2; - readonly ENTRY_NOT_WANTED: 3; - - onCacheEntryCheck(aEntry: nsICacheEntry): u32; - onCacheEntryAvailable(aEntry: nsICacheEntry, aNew: boolean, aResult: nsresult): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICachePurgeLock.idl - -interface nsICachePurgeLock extends nsISupports { - lock(profileName: string): void; - isOtherInstanceRunning(): boolean; - unlock(): void; - getLockFile(profileName: string): nsIFile; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheStorage.idl - -interface nsICacheStorage extends nsISupports { - readonly OPEN_NORMALLY: 0; - readonly OPEN_TRUNCATE: 1; - readonly OPEN_READONLY: 2; - readonly OPEN_PRIORITY: 4; - readonly OPEN_BYPASS_IF_BUSY: 8; - readonly CHECK_MULTITHREADED: 16; - readonly OPEN_SECRETLY: 32; - readonly OPEN_INTERCEPTED: 64; - - asyncOpenURI(aURI: nsIURI, aIdExtension: string, aFlags: u32, aCallback: nsICacheEntryOpenCallback): void; - openTruncate(aURI: nsIURI, aIdExtension: string): nsICacheEntry; - exists(aURI: nsIURI, aIdExtension: string): boolean; - getCacheIndexEntryAttrs(aURI: nsIURI, aIdExtension: string, aHasAltData: OutParam, aSizeInKB: OutParam): void; - asyncDoomURI(aURI: nsIURI, aIdExtension: string, aCallback: nsICacheEntryDoomCallback): void; - asyncEvictStorage(aCallback: nsICacheEntryDoomCallback): void; - asyncVisitStorage(aVisitor: nsICacheStorageVisitor, aVisitEntries: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheStorageService.idl - -interface nsICacheStorageService extends nsISupports { - readonly PURGE_DISK_DATA_ONLY: 1; - readonly PURGE_DISK_ALL: 2; - readonly PURGE_EVERYTHING: 3; - - memoryCacheStorage(aLoadContextInfo: nsILoadContextInfo): nsICacheStorage; - diskCacheStorage(aLoadContextInfo: nsILoadContextInfo): nsICacheStorage; - pinningCacheStorage(aLoadContextInfo: nsILoadContextInfo): nsICacheStorage; - clearOrigin(aPrincipal: nsIPrincipal): void; - clearBaseDomain(aBaseDomain: string): void; - clearOriginAttributes(aOriginAttributes: string): void; - clear(): void; - purgeFromMemory(aWhat: u32): void; - readonly ioTarget: nsIEventTarget; - asyncGetDiskConsumption(aObserver: nsICacheStorageConsumptionObserver): void; - asyncVisitAllStorages(aVisitor: nsICacheStorageVisitor, aVisitEntries: boolean): void; -} - -interface nsICacheStorageConsumptionObserver extends nsISupports { - onNetworkCacheDiskConsumption(aDiskSize: i64): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheStorageVisitor.idl - -interface nsICacheStorageVisitor extends nsISupports { - onCacheStorageInfo(aEntryCount: u32, aConsumption: u64, aCapacity: u64, aDiskDirectory: nsIFile): void; - onCacheEntryInfo(aURI: nsIURI, aIdEnhance: string, aDataSize: i64, aAltDataSize: i64, aFetchCount: u32, aLastModifiedTime: u32, aExpirationTime: u32, aPinned: boolean, aInfo: nsILoadContextInfo): void; - onCacheEntryVisitCompleted(): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheTesting.idl - -interface nsICacheTesting extends nsISupports { - suspendCacheIOThread(aLevel: u32): void; - resumeCacheIOThread(): void; - flush(aObserver: nsIObserver): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/find/nsIFind.idl - -interface nsIFind extends nsISupports { - findBackwards: boolean; - caseSensitive: boolean; - entireWord: boolean; - matchDiacritics: boolean; - Find(aPatText: string, aSearchRange: Range, aStartPoint: Range, aEndPoint: Range): Range; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/find/nsIFindService.idl - -interface nsIFindService extends nsISupports { - searchString: string; - replaceString: string; - findBackwards: boolean; - wrapFind: boolean; - entireWord: boolean; - matchCase: boolean; - matchDiacritics: boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/find/nsIWebBrowserFind.idl - -interface nsIWebBrowserFind extends nsISupports { - findNext(): boolean; - searchString: string; - findBackwards: boolean; - wrapFind: boolean; - entireWord: boolean; - matchCase: boolean; - matchDiacritics: boolean; - searchFrames: boolean; -} - -interface nsIWebBrowserFindInFrames extends nsISupports { - currentSearchFrame: mozIDOMWindowProxy; - rootSearchFrame: mozIDOMWindowProxy; - searchSubframes: boolean; - searchParentFrames: boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIAvailableMemoryWatcherBase.idl - -interface nsITabUnloader extends nsISupports { - unloadTabAsync(): void; -} - -interface nsIAvailableMemoryWatcherBase extends nsISupports { - registerTabUnloader(aTabUnloader: nsITabUnloader): void; - onUnloadAttemptCompleted(aResult: nsresult): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIConsoleListener.idl - -type nsIConsoleListener = Callable<{ - observe(aMessage: nsIConsoleMessage): void; -}> - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIConsoleMessage.idl - -interface nsIConsoleMessage extends nsISupports { - readonly debug: 0; - readonly info: 1; - readonly warn: 2; - readonly error: 3; - - readonly logLevel: u32; - readonly timeStamp: i64; - readonly microSecondTimeStamp: i64; - readonly message: string; - isForwardedFromContentProcess: boolean; - toString(): string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIConsoleService.idl - -} // global - -declare namespace nsIConsoleService { - -enum OutputMode { - SuppressLog = 0, - OutputToLog = 1, -} - -} - -declare global { - -interface nsIConsoleService extends nsISupports, Enums { - logMessage(message: nsIConsoleMessage): void; - callFunctionAndLogException(targetGlobal: any, func: any): any; - logMessageWithMode(message: nsIConsoleMessage, mode: nsIConsoleService.OutputMode): void; - logStringMessage(message: string): void; - getMessageArray(): nsIConsoleMessage[]; - registerListener(listener: nsIConsoleListener): void; - unregisterListener(listener: nsIConsoleListener): void; - reset(): void; - resetWindow(windowInnerId: u64): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsICycleCollectorListener.idl - -interface nsICycleCollectorHandler extends nsISupports { - noteRefCountedObject(aAddress: string, aRefCount: u32, aObjectDescription: string): void; - noteGCedObject(aAddress: string, aMarked: boolean, aObjectDescription: string, aCompartmentAddress: string): void; - noteEdge(aFromAddress: string, aToAddress: string, aEdgeName: string): void; - describeRoot(aAddress: string, aKnownEdges: u32): void; - describeGarbage(aAddress: string): void; -} - -interface nsICycleCollectorLogSink extends nsISupports { - closeGCLog(): void; - closeCCLog(): void; - filenameIdentifier: string; - processIdentifier: i32; - readonly gcLog: nsIFile; - readonly ccLog: nsIFile; -} - -interface nsICycleCollectorListener extends nsISupports { - allTraces(): nsICycleCollectorListener; - readonly wantAllTraces: boolean; - disableLog: boolean; - logSink: nsICycleCollectorLogSink; - wantAfterProcessing: boolean; - processNext(aHandler: nsICycleCollectorHandler): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIDebug2.idl - -interface nsIDebug2 extends nsISupports { - readonly isDebugBuild: boolean; - readonly assertionCount: i32; - readonly isDebuggerAttached: boolean; - assertion(aStr: string, aExpr: string, aFile: string, aLine: i32): void; - warning(aStr: string, aFile: string, aLine: i32): void; - break(aFile: string, aLine: i32): void; - abort(aFile: string, aLine: i32): void; - rustPanic(aMessage: string): void; - rustLog(aTarget: string, aMessage: string): void; - crashWithOOM(): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIException.idl - -interface nsIStackFrame extends nsISupports { - readonly filename: string; - readonly name: string; - readonly sourceId: i32; - readonly lineNumber: i32; - readonly columnNumber: i32; - readonly asyncCause: string; - readonly asyncCaller: nsIStackFrame; - readonly caller: nsIStackFrame; - readonly formattedStack: string; - readonly nativeSavedFrame: any; - toString(): string; -} - -interface nsIException extends nsISupports { -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIInterfaceRequestor.idl - -interface nsIInterfaceRequestor extends nsISupports { - getInterface(uuid: T): nsQIResult; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIMacPreferencesReader.idl - -interface nsIMacPreferencesReader extends nsISupports { - policiesEnabled(): boolean; - readPreferences(): any; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIMemoryInfoDumper.idl - -type nsIFinishDumpingCallback = Callable<{ - callback(data: nsISupports): void; -}> - -interface nsIDumpGCAndCCLogsCallback extends nsISupports { - onDump(aGCLog: nsIFile, aCCLog: nsIFile, aIsParent: boolean): void; - onFinish(): void; -} - -interface nsIMemoryInfoDumper extends nsISupports { - dumpMemoryReportsToNamedFile(aFilename: string, aFinishDumping: nsIFinishDumpingCallback, aFinishDumpingData: nsISupports, aAnonymize: boolean, aMinimizeMemoryUsage: boolean): void; - dumpMemoryInfoToTempDir(aIdentifier: string, aAnonymize: boolean, aMinimizeMemoryUsage: boolean): void; - dumpGCAndCCLogsToFile(aIdentifier: string, aDumpAllTraces: boolean, aDumpChildProcesses: boolean, aCallback: nsIDumpGCAndCCLogsCallback): void; - dumpGCAndCCLogsToSink(aDumpAllTraces: boolean, aSink: nsICycleCollectorLogSink): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIMemoryReporter.idl - -type nsIHandleReportCallback = Callable<{ - callback(process: string, path: string, kind: i32, units: i32, amount: i64, description: string, data: nsISupports): void; -}> - -interface nsIMemoryReporter extends nsISupports { - readonly KIND_NONHEAP: 0; - readonly KIND_HEAP: 1; - readonly KIND_OTHER: 2; - readonly UNITS_BYTES: 0; - readonly UNITS_COUNT: 1; - readonly UNITS_COUNT_CUMULATIVE: 2; - readonly UNITS_PERCENTAGE: 3; - - collectReports(callback: nsIHandleReportCallback, data: nsISupports, anonymize: boolean): void; -} - -type nsIFinishReportingCallback = Callable<{ - callback(data: nsISupports): void; -}> - -type nsIHeapAllocatedCallback = Callable<{ - callback(bytesAllocated: i64): void; -}> - -interface nsIMemoryReporterManager extends nsISupports { - init(): void; - registerStrongReporter(reporter: nsIMemoryReporter): void; - registerStrongAsyncReporter(reporter: nsIMemoryReporter): void; - registerWeakReporter(reporter: nsIMemoryReporter): void; - registerWeakAsyncReporter(reporter: nsIMemoryReporter): void; - unregisterStrongReporter(reporter: nsIMemoryReporter): void; - unregisterWeakReporter(reporter: nsIMemoryReporter): void; - blockRegistrationAndHideExistingReporters(): void; - unblockRegistrationAndRestoreOriginalReporters(): void; - registerStrongReporterEvenIfBlocked(aReporter: nsIMemoryReporter): void; - getReports(handleReport: nsIHandleReportCallback, handleReportData: nsISupports, finishReporting: nsIFinishReportingCallback, finishReportingData: nsISupports, anonymize: boolean): void; - getReportsExtended(handleReport: nsIHandleReportCallback, handleReportData: nsISupports, finishReporting: nsIFinishReportingCallback, finishReportingData: nsISupports, anonymize: boolean, minimizeMemoryUsage: boolean, DMDDumpIdent: string): void; - readonly vsize: i64; - readonly vsizeMaxContiguous: i64; - readonly resident: i64; - readonly residentFast: i64; - readonly residentPeak: i64; - readonly residentUnique: i64; - readonly heapAllocated: i64; - readonly heapOverheadFraction: i64; - readonly JSMainRuntimeGCHeap: i64; - readonly JSMainRuntimeTemporaryPeak: i64; - readonly JSMainRuntimeCompartmentsSystem: i64; - readonly JSMainRuntimeCompartmentsUser: i64; - readonly JSMainRuntimeRealmsSystem: i64; - readonly JSMainRuntimeRealmsUser: i64; - readonly imagesContentUsedUncompressed: i64; - readonly storageSQLite: i64; - readonly lowMemoryEventsPhysical: i64; - readonly ghostWindows: i64; - readonly pageFaultsHard: i64; - readonly hasMozMallocUsableSize: boolean; - readonly isDMDEnabled: boolean; - readonly isDMDRunning: boolean; - minimizeMemoryUsage(callback: nsIRunnable): void; - sizeOfTab(window: mozIDOMWindowProxy, jsObjectsSize: OutParam, jsStringsSize: OutParam, jsOtherSize: OutParam, domSize: OutParam, styleSize: OutParam, otherSize: OutParam, totalSize: OutParam, jsMilliseconds: OutParam, nonJSMilliseconds: OutParam): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsISecurityConsoleMessage.idl - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsISupports.idl - -interface nsISupports { - QueryInterface?(aIID: T): nsQIResult; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIUUIDGenerator.idl - -interface nsIUUIDGenerator extends nsISupports { - generateUUID(): nsID; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIVersionComparator.idl - -interface nsIVersionComparator extends nsISupports { - compare(A: string, B: string): i32; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsIWeakReference.idl - -interface nsIWeakReference extends nsISupports { - QueryReferent(uuid: T): nsQIResult; -} - -interface nsISupportsWeakReference extends nsISupports { - GetWeakReference(): nsIWeakReference; -} - -// https://searchfox.org/mozilla-central/source/xpcom/base/nsrootidl.idl - -// https://searchfox.org/mozilla-central/source/toolkit/components/xulstore/nsIXULStore.idl - -interface nsIXULStore extends nsISupports { - persist(aNode: Node, attr: string): void; - setValue(doc: string, id: string, attr: string, value: string): void; - hasValue(doc: string, id: string, attr: string): boolean; - getValue(doc: string, id: string, attr: string): string; - removeValue(doc: string, id: string, attr: string): void; - removeDocument(doc: string): void; - getIDsEnumerator(doc: string): nsIStringEnumerator; - getAttributeEnumerator(doc: string, id: string): nsIStringEnumerator; -} - -// https://searchfox.org/mozilla-central/source/editor/txmgr/nsITransaction.idl - -interface nsITransaction extends nsISupports { - doTransaction(): void; - undoTransaction(): void; - redoTransaction(): void; - readonly isTransient: boolean; - merge(aTransaction: nsITransaction): boolean; -} - -// https://searchfox.org/mozilla-central/source/editor/txmgr/nsITransactionManager.idl - -interface nsITransactionManager extends nsISupports { - doTransaction(aTransaction: nsITransaction): void; - undoTransaction(): void; - redoTransaction(): void; - clear(): void; - clearUndoStack(): void; - clearRedoStack(): void; - beginBatch(aData: nsISupports): void; - endBatch(aAllowEmpty: boolean): void; - readonly numberOfUndoItems: i32; - readonly numberOfRedoItems: i32; - maxTransactionCount: i32; - batchTopUndo(): void; - removeTopUndo(): void; - peekUndoStack(): nsITransaction; - peekRedoStack(): nsITransaction; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/data/nsIDataChannel.idl - -interface nsIDataChannel extends nsISupports { -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIBackgroundChannelRegistrar.idl - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIBinaryHttp.idl - -interface nsIBinaryHttpRequest extends nsISupports { - readonly method: string; - readonly scheme: string; - readonly authority: string; - readonly path: string; - readonly headerNames: string[]; - readonly headerValues: string[]; - readonly content: u8[]; -} - -interface nsIBinaryHttpResponse extends nsISupports { - readonly status: u16; - readonly headerNames: string[]; - readonly headerValues: string[]; - readonly content: u8[]; -} - -interface nsIBinaryHttp extends nsISupports { - encodeRequest(request: nsIBinaryHttpRequest): u8[]; - decodeRequest(request: u8[]): nsIBinaryHttpRequest; - decodeResponse(response: u8[]): nsIBinaryHttpResponse; - encodeResponse(response: nsIBinaryHttpResponse): u8[]; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIEarlyHintObserver.idl - -interface nsIEarlyHintObserver extends nsISupports { - earlyHint(linkHeader: string, referrerPolicy: string, cspHeader: string): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpActivityObserver.idl - -interface nsIHttpActivityObserver extends nsISupports { - readonly ACTIVITY_TYPE_SOCKET_TRANSPORT: 1; - readonly ACTIVITY_TYPE_HTTP_TRANSACTION: 2; - readonly ACTIVITY_TYPE_HTTP_CONNECTION: 3; - readonly ACTIVITY_SUBTYPE_REQUEST_HEADER: 20481; - readonly ACTIVITY_SUBTYPE_REQUEST_BODY_SENT: 20482; - readonly ACTIVITY_SUBTYPE_RESPONSE_START: 20483; - readonly ACTIVITY_SUBTYPE_RESPONSE_HEADER: 20484; - readonly ACTIVITY_SUBTYPE_RESPONSE_COMPLETE: 20485; - readonly ACTIVITY_SUBTYPE_TRANSACTION_CLOSE: 20486; - readonly ACTIVITY_SUBTYPE_PROXY_RESPONSE_HEADER: 20487; - readonly ACTIVITY_SUBTYPE_DNSANDSOCKET_CREATED: 20488; - readonly ACTIVITY_SUBTYPE_SPECULATIVE_DNSANDSOCKET_CREATED: 20489; - readonly ACTIVITY_SUBTYPE_ECH_SET: 20490; - readonly ACTIVITY_SUBTYPE_CONNECTION_CREATED: 20491; - readonly ACTIVITY_SUBTYPE_EARLYHINT_RESPONSE_HEADER: 20492; - - observeActivity(aHttpChannel: nsISupports, aActivityType: u32, aActivitySubtype: u32, aTimestamp: PRTime, aExtraSizeData: u64, aExtraStringData: string): void; - readonly isActive: boolean; - observeConnectionActivity(aHost: string, aPort: i32, aSSL: boolean, aHasECH: boolean, aIsHttp3: boolean, aActivityType: u32, aActivitySubtype: u32, aTimestamp: PRTime, aExtraStringData: string): void; -} - -interface nsIHttpActivityDistributor extends nsIHttpActivityObserver { - addObserver(aObserver: nsIHttpActivityObserver): void; - removeObserver(aObserver: nsIHttpActivityObserver): void; - observeProxyResponse: boolean; - observeConnection: boolean; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpAuthManager.idl - -interface nsIHttpAuthManager extends nsISupports { - getAuthIdentity(aScheme: string, aHost: string, aPort: i32, aAuthType: string, aRealm: string, aPath: string, aUserDomain: OutParam, aUserName: OutParam, aUserPassword: OutParam, aIsPrivate?: boolean, aPrincipal?: nsIPrincipal): void; - setAuthIdentity(aScheme: string, aHost: string, aPort: i32, aAuthType: string, aRealm: string, aPath: string, aUserDomain: string, aUserName: string, aUserPassword: string, aIsPrivate?: boolean, aPrincipal?: nsIPrincipal): void; - clearAll(): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpAuthenticableChannel.idl - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpAuthenticator.idl - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannel.idl - -interface nsIHttpChannel extends nsIIdentChannel { - requestMethod: string; - referrerInfo: nsIReferrerInfo; - readonly protocolVersion: string; - readonly transferSize: u64; - readonly requestSize: u64; - readonly decodedBodySize: u64; - readonly encodedBodySize: u64; - getRequestHeader(aHeader: string): string; - setRequestHeader(aHeader: string, aValue: string, aMerge: boolean): void; - setNewReferrerInfo(aUrl: string, aPolicy: nsIReferrerInfo.ReferrerPolicyIDL, aSendReferrer: boolean): void; - setEmptyRequestHeader(aHeader: string): void; - visitRequestHeaders(aVisitor: nsIHttpHeaderVisitor): void; - visitNonDefaultRequestHeaders(aVisitor: nsIHttpHeaderVisitor): void; - ShouldStripRequestBodyHeader(aMethod: string): boolean; - allowSTS: boolean; - redirectionLimit: u32; - readonly responseStatus: u32; - readonly responseStatusText: string; - readonly requestSucceeded: boolean; - isMainDocumentChannel: boolean; - getResponseHeader(header: string): string; - setResponseHeader(header: string, value: string, merge: boolean): void; - visitResponseHeaders(aVisitor: nsIHttpHeaderVisitor): void; - getOriginalResponseHeader(aHeader: string, aVisitor: nsIHttpHeaderVisitor): void; - visitOriginalResponseHeaders(aVisitor: nsIHttpHeaderVisitor): void; - isNoStoreResponse(): boolean; - isNoCacheResponse(): boolean; - isPrivateResponse(): boolean; - redirectTo(aTargetURI: nsIURI): void; - upgradeToSecure(): void; - topLevelContentWindowId: u64; - browserId: u64; - logBlockedCORSRequest(aMessage: string, aCategory: string, aIsWarning: boolean): void; - logMimeTypeMismatch(aMessageName: string, aWarning: boolean, aURL: string, aContentType: string): void; - classicScriptHintCharset: string; - documentCharacterSet: string; - requestObserversCalled: boolean; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannelAuthProvider.idl - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannelChild.idl - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannelInternal.idl - -interface nsIHttpUpgradeListener extends nsISupports { - onTransportAvailable(aTransport: nsISocketTransport, aSocketIn: nsIAsyncInputStream, aSocketOut: nsIAsyncOutputStream): void; - onUpgradeFailed(aErrorCode: nsresult): void; -} - -interface nsIHttpChannelInternal extends nsISupports { - readonly THIRD_PARTY_FORCE_ALLOW: 1; - readonly TLS_FLAG_CONFIGURE_AS_RETRY: 65536; - readonly REDIRECT_MODE_FOLLOW: 0; - readonly REDIRECT_MODE_ERROR: 1; - readonly REDIRECT_MODE_MANUAL: 2; - readonly FETCH_CACHE_MODE_DEFAULT: 0; - readonly FETCH_CACHE_MODE_NO_STORE: 1; - readonly FETCH_CACHE_MODE_RELOAD: 2; - readonly FETCH_CACHE_MODE_NO_CACHE: 3; - readonly FETCH_CACHE_MODE_FORCE_CACHE: 4; - readonly FETCH_CACHE_MODE_ONLY_IF_CACHED: 5; - - documentURI: nsIURI; - getRequestVersion(major: OutParam, minor: OutParam): void; - getResponseVersion(major: OutParam, minor: OutParam): void; - setCookieHeaders(aCookieHeaders: string[]): void; - thirdPartyFlags: u32; - forceAllowThirdPartyCookie: boolean; - channelIsForDownload: boolean; - readonly localAddress: string; - readonly localPort: i32; - readonly remoteAddress: string; - readonly remotePort: i32; - HTTPUpgrade(aProtocolName: string, aListener: nsIHttpUpgradeListener): void; - setConnectOnly(tlsTunnel: boolean): void; - readonly onlyConnect: boolean; - allowSpdy: boolean; - allowHttp3: boolean; - responseTimeoutEnabled: boolean; - initialRwin: u32; - readonly apiRedirectToURI: nsIURI; - allowAltSvc: boolean; - beConservative: boolean; - bypassProxy: boolean; - readonly isResolvedByTRR: boolean; - readonly effectiveTRRMode: nsIRequest.TRRMode; - readonly trrSkipReason: nsITRRSkipReason.value; - readonly isLoadedBySocketProcess: boolean; - isOCSP: boolean; - tlsFlags: u32; - readonly lastModifiedTime: PRTime; - corsIncludeCredentials: boolean; - redirectMode: u32; - fetchCacheMode: u32; - readonly topWindowURI: nsIURI; - setTopWindowURIIfUnknown(topWindowURI: nsIURI): void; - readonly proxyURI: nsIURI; - blockAuthPrompt: boolean; - integrityMetadata: string; - readonly connectionInfoHashKey: string; - setIPv4Disabled(): void; - setIPv6Disabled(): void; - readonly crossOriginOpenerPolicy: nsILoadInfo.CrossOriginOpenerPolicy; - readonly supportsHTTP3: boolean; - readonly hasHTTPSRR: boolean; - setEarlyHintObserver(aObserver: nsIEarlyHintObserver): void; - earlyHintPreloaderId: u64; - readonly isProxyUsed: boolean; - setWebTransportSessionEventListener(aListener: WebTransportSessionEventListener): void; - earlyHintLinkType: u32; - isUserAgentHeaderModified: boolean; - setResponseOverride(aReplacedHttpResponse: nsIReplacedHttpResponse): void; - setResponseStatus(aStatus: u32, aStatusText: string): void; - readonly lastTransportStatus: nsresult; - transparentRedirectTo(aTargetURI: nsIURI): void; - readonly caps: u32; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpHeaderVisitor.idl - -type nsIHttpHeaderVisitor = Callable<{ - visitHeader(aHeader: string, aValue: string): void; -}> - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpProtocolHandler.idl - -interface nsIHttpProtocolHandler extends nsIProxiedProtocolHandler { - readonly userAgent: string; - readonly rfpUserAgent: string; + readonly description: string; + readonly accessKey: string; + readonly keyboardShortcut: string; + readonly role: u32; + getState(aState: OutParam, aExtraState: OutParam): void; + readonly focusedChild: nsIAccessible; + readonly attributes: nsIPersistentProperties; + readonly cache: nsIPersistentProperties; + readonly nativeInterface: nsISupports; + groupPosition(aGroupLevel: OutParam, aSimilarItemsInGroup: OutParam, aPositionInGroup: OutParam): void; + getChildAtPoint(x: i32, y: i32): nsIAccessible; + getDeepestChildAtPoint(x: i32, y: i32): nsIAccessible; + getDeepestChildAtPointInProcess(x: i32, y: i32): nsIAccessible; + getChildAt(aChildIndex: i32): nsIAccessible; + getRelationByType(aRelationType: u32): nsIAccessibleRelation; + getRelations(): nsIArray; + getBounds(x: OutParam, y: OutParam, width: OutParam, height: OutParam): void; + getBoundsInCSSPixels(aX: OutParam, aY: OutParam, aWidth: OutParam, aHeight: OutParam): void; + setSelected(isSelected: boolean): void; + takeSelection(): void; + takeFocus(): void; + readonly actionCount: u8; + getActionName(index: u8): string; + getActionDescription(aIndex: u8): string; + doAction(index: u8): void; + scrollTo(aScrollType: u32): void; + scrollToPoint(coordinateType: u32, x: i32, y: i32): void; + announce(announcement: string, priority: u16): void; + readonly computedARIARole: string; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleAnnouncementEvent.idl + +interface nsIAccessibleAnnouncementEvent extends nsIAccessibleEvent { + readonly POLITE: 0; + readonly ASSERTIVE: 1; + + readonly announcement: string; + readonly priority: u16; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleApplication.idl + +interface nsIAccessibleApplication extends nsISupports { readonly appName: string; readonly appVersion: string; - readonly platform: string; - readonly oscpu: string; - readonly misc: string; - readonly altSvcCacheKeys: string[]; - readonly authCacheKeys: string[]; - EnsureHSTSDataReady(): Promise; - clearCORSPreflightCache(): void; + readonly platformName: string; + readonly platformVersion: string; } -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsINetworkErrorLogging.idl +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleCaretMoveEvent.idl -interface nsINetworkErrorLogging extends nsISupports { - registerPolicy(aChannel: nsIHttpChannel): void; - generateNELReport(aChannel: nsIHttpChannel): void; +interface nsIAccessibleCaretMoveEvent extends nsIAccessibleEvent { + readonly caretOffset: i32; + readonly isSelectionCollapsed: boolean; + readonly isAtEndOfLine: boolean; + readonly granularity: i32; } -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIObliviousHttp.idl +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleDocument.idl -interface nsIObliviousHttpClientResponse extends nsISupports { - decapsulate(encResponse: u8[]): u8[]; +interface nsIAccessibleDocument extends nsISupports { + readonly URL: string; + readonly title: string; + readonly mimeType: string; + readonly docType: string; + readonly DOMDocument: Document; + readonly window: mozIDOMWindowProxy; + readonly parentDocument: nsIAccessibleDocument; + readonly childDocumentCount: u32; + getChildDocumentAt(index: u32): nsIAccessibleDocument; } -interface nsIObliviousHttpClientRequest extends nsISupports { - readonly encRequest: u8[]; - readonly response: nsIObliviousHttpClientResponse; +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleEditableText.idl + +interface nsIAccessibleEditableText extends nsISupports { + setTextContents(text: string): void; + insertText(text: string, position: i32): void; + copyText(startPos: i32, endPos: i32): void; + cutText(startPos: i32, endPos: i32): void; + deleteText(startPos: i32, endPos: i32): void; + pasteText(position: i32): void; } -interface nsIObliviousHttpServerResponse extends nsISupports { - readonly request: u8[]; - encapsulate(response: u8[]): u8[]; +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleEvent.idl + +interface nsIAccessibleEvent extends nsISupports { + readonly EVENT_SHOW: 1; + readonly EVENT_HIDE: 2; + readonly EVENT_REORDER: 3; + readonly EVENT_FOCUS: 4; + readonly EVENT_STATE_CHANGE: 5; + readonly EVENT_NAME_CHANGE: 6; + readonly EVENT_DESCRIPTION_CHANGE: 7; + readonly EVENT_VALUE_CHANGE: 8; + readonly EVENT_SELECTION: 9; + readonly EVENT_SELECTION_ADD: 10; + readonly EVENT_SELECTION_REMOVE: 11; + readonly EVENT_SELECTION_WITHIN: 12; + readonly EVENT_ALERT: 13; + readonly EVENT_MENU_START: 14; + readonly EVENT_MENU_END: 15; + readonly EVENT_MENUPOPUP_START: 16; + readonly EVENT_MENUPOPUP_END: 17; + readonly EVENT_DRAGDROP_START: 18; + readonly EVENT_SCROLLING_START: 19; + readonly EVENT_SCROLLING_END: 20; + readonly EVENT_DOCUMENT_LOAD_COMPLETE: 21; + readonly EVENT_DOCUMENT_RELOAD: 22; + readonly EVENT_DOCUMENT_LOAD_STOPPED: 23; + readonly EVENT_TEXT_ATTRIBUTE_CHANGED: 24; + readonly EVENT_TEXT_CARET_MOVED: 25; + readonly EVENT_TEXT_INSERTED: 26; + readonly EVENT_TEXT_REMOVED: 27; + readonly EVENT_TEXT_SELECTION_CHANGED: 28; + readonly EVENT_WINDOW_ACTIVATE: 29; + readonly EVENT_WINDOW_DEACTIVATE: 30; + readonly EVENT_WINDOW_MAXIMIZE: 31; + readonly EVENT_WINDOW_MINIMIZE: 32; + readonly EVENT_WINDOW_RESTORE: 33; + readonly EVENT_OBJECT_ATTRIBUTE_CHANGED: 34; + readonly EVENT_TEXT_VALUE_CHANGE: 35; + readonly EVENT_SCROLLING: 36; + readonly EVENT_ANNOUNCEMENT: 37; + readonly EVENT_LIVE_REGION_ADDED: 38; + readonly EVENT_LIVE_REGION_REMOVED: 39; + readonly EVENT_INNER_REORDER: 40; + readonly EVENT_LIVE_REGION_CHANGED: 41; + readonly EVENT_LAST_ENTRY: 42; + + readonly eventType: u32; + readonly accessible: nsIAccessible; + readonly accessibleDocument: nsIAccessibleDocument; + readonly DOMNode: Node; + readonly isFromUserInput: boolean; } -interface nsIObliviousHttpServer extends nsISupports { - readonly encodedConfig: u8[]; - decapsulate(encRequest: u8[]): nsIObliviousHttpServerResponse; +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleHideEvent.idl + +interface nsIAccessibleHideEvent extends nsIAccessibleEvent { + readonly targetParent: nsIAccessible; + readonly targetNextSibling: nsIAccessible; + readonly targetPrevSibling: nsIAccessible; } -interface nsIObliviousHttp extends nsISupports { - encapsulateRequest(encodedConfig: u8[], request: u8[]): nsIObliviousHttpClientRequest; - server(): nsIObliviousHttpServer; - decodeConfigList(encodedConfigList: u8[]): u8[][]; -} +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleHyperLink.idl -interface nsIObliviousHttpService extends nsISupports { - newChannel(relayURI: nsIURI, targetURI: nsIURI, encodedConfig: u8[]): nsIChannel; - getTRRSettings(relayURI: OutParam, encodedConfig: OutParam): void; - clearTRRConfig(): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIObliviousHttpChannel.idl - -interface nsIObliviousHttpChannel extends nsIHttpChannel { - readonly relayChannel: nsIHttpChannel; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIRaceCacheWithNetwork.idl - -interface nsIRaceCacheWithNetwork extends nsISupports { - allowRacing: boolean; - test_triggerNetwork(timeout: i32): void; - test_delayCacheEntryOpeningBy(timeout: i32): void; - test_triggerDelayedOpenCacheEntry(): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIReplacedHttpResponse.idl - -interface nsIReplacedHttpResponse extends nsISupports { - init(): void; - responseBody: string; - responseStatus: u32; - responseStatusText: string; - visitResponseHeaders(visitor: nsIHttpHeaderVisitor): void; - setResponseHeader(header: string, value: string, merge: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsITlsHandshakeListener.idl - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIWellKnownOpportunisticUtils.idl - -interface nsIWellKnownOpportunisticUtils extends nsISupports { - verify(aJSON: string, aOrigin: string): void; +interface nsIAccessibleHyperLink extends nsISupports { + readonly startIndex: i32; + readonly endIndex: i32; readonly valid: boolean; -} - -// https://searchfox.org/mozilla-central/source/netwerk/streamconv/converters/nsICompressConvStats.idl - -interface nsICompressConvStats extends nsISupports { - readonly decodedDataLength: u64; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/viewsource/nsIViewSourceChannel.idl - -// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentActionResponse.idl - -interface nsIPaymentResponseData extends nsISupports { - readonly GENERAL_RESPONSE: 0; - readonly BASICCARD_RESPONSE: 1; - - readonly type: u32; - init(aType: u32): void; -} - -interface nsIGeneralResponseData extends nsIPaymentResponseData { - readonly data: string; - initData(aData: any): void; -} - -interface nsIBasicCardResponseData extends nsIPaymentResponseData { - readonly cardholderName: string; - readonly cardNumber: string; - readonly expiryMonth: string; - readonly expiryYear: string; - readonly cardSecurityCode: string; - readonly billingAddress: nsIPaymentAddress; - initData(aCardholderName: string, aCardNumber: string, aExpiryMonth: string, aExpiryYear: string, aCardSecurityCode: string, billingAddress: nsIPaymentAddress): void; -} - -interface nsIPaymentActionResponse extends nsISupports { - readonly NO_TYPE: 0; - readonly CANMAKE_ACTION: 2; - readonly SHOW_ACTION: 3; - readonly ABORT_ACTION: 4; - readonly COMPLETE_ACTION: 5; - readonly ABORT_SUCCEEDED: 1; - readonly ABORT_FAILED: 0; - readonly PAYMENT_REJECTED: 0; - readonly PAYMENT_ACCEPTED: 1; - readonly PAYMENT_NOTSUPPORTED: 2; - readonly COMPLETE_SUCCEEDED: 1; - readonly COMPLETE_FAILED: 0; - - readonly requestId: string; - readonly type: u32; -} - -interface nsIPaymentCanMakeActionResponse extends nsIPaymentActionResponse { - readonly result: boolean; - init(aRequestId: string, aResult: boolean): void; -} - -interface nsIPaymentShowActionResponse extends nsIPaymentActionResponse { - readonly acceptStatus: u32; - readonly methodName: string; - readonly data: nsIPaymentResponseData; - readonly payerName: string; - readonly payerEmail: string; - readonly payerPhone: string; - init(aRequestId: string, aAcceptStatus: u32, aMethodName: string, aData: nsIPaymentResponseData, aPayerName: string, aPayerEmail: string, aPayerPhone: string): void; -} - -interface nsIPaymentAbortActionResponse extends nsIPaymentActionResponse { - readonly abortStatus: u32; - init(aRequestId: string, aAbortStatus: u32): void; - isSucceeded(): boolean; -} - -interface nsIPaymentCompleteActionResponse extends nsIPaymentActionResponse { - readonly completeStatus: u32; - init(aRequestId: string, aCompleteStatus: u32): void; - isCompleted(): boolean; -} - -interface nsIMethodChangeDetails extends nsISupports { - readonly GENERAL_DETAILS: 0; - readonly BASICCARD_DETAILS: 1; - - readonly type: u32; - init(aType: u32): void; -} - -interface nsIGeneralChangeDetails extends nsIMethodChangeDetails { - readonly details: string; - initData(aDetails: any): void; -} - -interface nsIBasicCardChangeDetails extends nsIMethodChangeDetails { - readonly billingAddress: nsIPaymentAddress; - initData(billingAddress: nsIPaymentAddress): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentAddress.idl - -interface nsIPaymentAddress extends nsISupports { - readonly country: string; - readonly addressLine: nsIArray; - readonly region: string; - readonly regionCode: string; - readonly city: string; - readonly dependentLocality: string; - readonly postalCode: string; - readonly sortingCode: string; - readonly organization: string; - readonly recipient: string; - readonly phone: string; - init(aCountry: string, aAddressLine: nsIArray, aRegion: string, aRegionCode: string, aCity: string, aDependentLocality: string, aPostalCode: string, aSortingCode: string, aOrganization: string, aRecipient: string, aPhone: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentRequest.idl - -interface nsIPaymentMethodData extends nsISupports { - readonly supportedMethods: string; - readonly data: any; -} - -interface nsIPaymentCurrencyAmount extends nsISupports { - readonly currency: string; - readonly value: string; -} - -interface nsIPaymentItem extends nsISupports { - readonly label: string; - readonly amount: nsIPaymentCurrencyAmount; - readonly pending: boolean; -} - -interface nsIPaymentDetailsModifier extends nsISupports { - readonly supportedMethods: string; - readonly total: nsIPaymentItem; - readonly additionalDisplayItems: nsIArray; - readonly data: any; -} - -interface nsIPaymentShippingOption extends nsISupports { - readonly id: string; - readonly label: string; - readonly amount: nsIPaymentCurrencyAmount; - selected: boolean; -} - -interface nsIPaymentDetails extends nsISupports { - readonly id: string; - readonly totalItem: nsIPaymentItem; - readonly displayItems: nsIArray; - readonly shippingOptions: nsIArray; - readonly modifiers: nsIArray; - readonly error: string; - readonly shippingAddressErrors: any; - readonly payerErrors: any; - readonly paymentMethodErrors: any; -} - -interface nsIPaymentOptions extends nsISupports { - readonly requestPayerName: boolean; - readonly requestPayerEmail: boolean; - readonly requestPayerPhone: boolean; - readonly requestShipping: boolean; - readonly requestBillingAddress: boolean; - readonly shippingType: string; -} - -interface nsIPaymentRequest extends nsISupports { - readonly topOuterWindowId: u64; - readonly topLevelPrincipal: nsIPrincipal; - readonly requestId: string; - readonly completeStatus: string; - readonly paymentMethods: nsIArray; - readonly paymentDetails: nsIPaymentDetails; - readonly paymentOptions: nsIPaymentOptions; - readonly shippingOption: string; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentRequestService.idl - -interface nsIPaymentRequestService extends nsISupports { - getPaymentRequestById(aRequestId: string): nsIPaymentRequest; - enumerate(): nsISimpleEnumerator; - respondPayment(aResponse: nsIPaymentActionResponse): void; - changeShippingAddress(requestId: string, aAddress: nsIPaymentAddress): void; - changeShippingOption(requestId: string, option: string): void; - changePayerDetail(requestId: string, aPayerName: string, aPayerEmail: string, aPayerPhone: string): void; - changePaymentMethod(requestId: string, aMethodName: string, aMethodDetails: nsIMethodChangeDetails): void; - cleanup(): void; - setTestingUIService(aUIService: nsIPaymentUIService): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentUIService.idl - -interface nsIPaymentUIService extends nsISupports { - showPayment(requestId: string): void; - abortPayment(requestId: string): void; - completePayment(requestId: string): void; - updatePayment(requestId: string): void; - closePayment(requestId: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/media/webspeech/recognition/nsISpeechRecognitionService.idl - -// https://searchfox.org/mozilla-central/source/netwerk/test/httpserver/nsIHttpServer.idl - -interface nsIHttpServer extends nsISupports { - start(port: i32): void; - start_ipv6(port: i32): void; - start_dualStack(port: i32): void; - stop(callback: nsIHttpServerStoppedCallback): void; - registerFile(path: string, file: nsIFile, handler?: nsIHttpRequestHandler): void; - registerPathHandler(path: string, handler: nsIHttpRequestHandler): void; - registerPrefixHandler(prefix: string, handler: nsIHttpRequestHandler): void; - registerErrorHandler(code: u32, handler: nsIHttpRequestHandler): void; - registerDirectory(path: string, dir: nsIFile): void; - registerContentType(extension: string, type: string): void; - setIndexHandler(handler: nsIHttpRequestHandler): void; - readonly identity: nsIHttpServerIdentity; - getState(path: string, key: string): string; - setState(path: string, key: string, value: string): void; - getSharedState(key: string): string; - setSharedState(key: string, value: string): void; - getObjectState(key: string): nsISupports; - setObjectState(key: string, value: nsISupports): void; -} - -type nsIHttpServerStoppedCallback = Callable<{ - onStopped(): void; -}> - -interface nsIHttpServerIdentity extends nsISupports { - readonly primaryScheme: string; - readonly primaryHost: string; - readonly primaryPort: i32; - add(scheme: string, host: string, port: i32): void; - remove(scheme: string, host: string, port: i32): boolean; - has(scheme: string, host: string, port: i32): boolean; - getScheme(host: string, port: i32): string; - setPrimary(scheme: string, host: string, port: i32): void; -} - -type nsIHttpRequestHandler = Callable<{ - handle(request: nsIHttpRequest, response: nsIHttpResponse): void; -}> - -interface nsIHttpRequest extends nsISupports { - readonly method: string; - readonly scheme: string; - readonly host: string; - readonly port: u32; - readonly path: string; - readonly queryString: string; - readonly httpVersion: string; - getHeader(fieldName: string): string; - hasHeader(fieldName: string): boolean; - readonly headers: nsISimpleEnumerator; - readonly bodyInputStream: nsIInputStream; -} - -interface nsIHttpResponse extends nsISupports { - setStatusLine(httpVersion: string, statusCode: u16, description: string): void; - setHeader(name: string, value: string, merge?: boolean): void; - setHeaderNoCheck(name: string, value: string): void; - readonly bodyOutputStream: nsIOutputStream; - write(data: string): void; - processAsync(): void; - seizePower(): void; - finish(): void; -} - -// https://searchfox.org/mozilla-central/source/modules/libjar/zipwriter/nsIZipWriter.idl - -interface nsIZipWriter extends nsISupports { - readonly COMPRESSION_NONE: 0; - readonly COMPRESSION_FASTEST: 1; - readonly COMPRESSION_DEFAULT: 6; - readonly COMPRESSION_BEST: 9; - - comment: string; - readonly inQueue: boolean; - readonly file: nsIFile; - open(aFile: nsIFile, aIoFlags: i32): void; - getEntry(aZipEntry: string): nsIZipEntry; - hasEntry(aZipEntry: string): boolean; - addEntryDirectory(aZipEntry: string, aModTime: PRTime, aQueue: boolean): void; - addEntryFile(aZipEntry: string, aCompression: i32, aFile: nsIFile, aQueue: boolean): void; - addEntryChannel(aZipEntry: string, aModTime: PRTime, aCompression: i32, aChannel: nsIChannel, aQueue: boolean): void; - addEntryStream(aZipEntry: string, aModTime: PRTime, aCompression: i32, aStream: nsIInputStream, aQueue: boolean): void; - removeEntry(aZipEntry: string, aQueue: boolean): void; - processQueue(aObserver: nsIRequestObserver, aContext: nsISupports): void; - close(): void; - alignStoredFiles(aAlignSize: u16): void; -} - -// https://searchfox.org/mozilla-central/source/dom/privateattribution/nsIPrivateAttributionService.idl - -interface nsIPrivateAttributionService extends nsISupports { - onAttributionEvent(sourceHost: string, type: string, index: u32, ad: string, targetHost: string): void; - onAttributionConversion(targetHost: string, task: string, histogramSize: u32, lookbackDays: u32, impressionType: string, ads: string[], sourceHosts: string[]): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIDirectTaskDispatcher.idl - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIEnvironment.idl - -interface nsIEnvironment extends nsISupports { - set(aName: string, aValue: string): void; - get(aName: string): string; - exists(aName: string): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIEventTarget.idl - -interface nsIEventTarget extends nsISupports { - readonly DISPATCH_NORMAL: 0; - readonly DISPATCH_AT_END: 2; - readonly DISPATCH_EVENT_MAY_BLOCK: 4; - readonly DISPATCH_IGNORE_BLOCK_DISPATCH: 8; - - isOnCurrentThread(): boolean; - dispatch(event: nsIRunnable, flags: u32): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIIdlePeriod.idl - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsINamed.idl - -interface nsINamed extends nsISupports { - readonly name: string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIProcess.idl - -interface nsIProcess extends nsISupports { - init(executable: nsIFile): void; - kill(): void; - run(blocking: boolean, args: string[], count: u32): void; - runAsync(args: string[], count: u32, observer?: nsIObserver, holdWeak?: boolean): void; - runw(blocking: boolean, args: string[], count: u32): void; - runwAsync(args: string[], count: u32, observer?: nsIObserver, holdWeak?: boolean): void; - startHidden: boolean; - noShell: boolean; - readonly pid: u32; - readonly exitValue: i32; - readonly isRunning: boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIRunnable.idl - -type nsIRunnable = Callable<{ - run(): void; -}> - -interface nsIRunnablePriority extends nsISupports { - readonly PRIORITY_IDLE: 0; - readonly PRIORITY_DEFERRED_TIMERS: 1; - readonly PRIORITY_LOW: 2; - readonly PRIORITY_NORMAL: 4; - readonly PRIORITY_MEDIUMHIGH: 5; - readonly PRIORITY_INPUT_HIGH: 6; - readonly PRIORITY_VSYNC: 7; - readonly PRIORITY_RENDER_BLOCKING: 9; - readonly PRIORITY_CONTROL: 10; - - readonly priority: u32; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsISerialEventTarget.idl - -interface nsISerialEventTarget extends nsIEventTarget { -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsISupportsPriority.idl - -interface nsISupportsPriority extends nsISupports { - readonly PRIORITY_HIGHEST: -20; - readonly PRIORITY_HIGH: -10; - readonly PRIORITY_NORMAL: 0; - readonly PRIORITY_LOW: 10; - readonly PRIORITY_LOWEST: 20; - - priority: i32; - adjustPriority(delta: i32): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThread.idl - -} // global - -declare namespace nsIThread { - -enum QoSPriority { - QOS_PRIORITY_NORMAL = 0, - QOS_PRIORITY_LOW = 1, -} - -} - -declare global { - -interface nsIThread extends nsISerialEventTarget, Enums { - shutdown(): void; - hasPendingEvents(): boolean; - hasPendingHighPriorityEvents(): boolean; - processNextEvent(mayWait: boolean): boolean; - asyncShutdown(): void; - beginShutdown(): nsIThreadShutdown; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadInternal.idl - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadManager.idl - -type nsINestedEventLoopCondition = Callable<{ - isDone(): boolean; -}> - -interface nsIThreadManager extends nsISupports { - readonly mainThread: nsIThread; - readonly currentThread: nsIThread; - dispatchToMainThread(event: nsIRunnable, priority?: u32): void; - dispatchToMainThreadWithMicroTask(event: nsIRunnable, priority?: u32): void; - idleDispatchToMainThread(event: nsIRunnable, timeout?: u32): void; - dispatchDirectTaskToCurrentThread(event: nsIRunnable): void; - spinEventLoopUntil(aVeryGoodReasonToDoThis: string, condition: nsINestedEventLoopCondition): void; - spinEventLoopUntilOrQuit(aVeryGoodReasonToDoThis: string, condition: nsINestedEventLoopCondition): void; - spinEventLoopUntilEmpty(): void; - readonly mainThreadEventTarget: nsIEventTarget; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadPool.idl - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadShutdown.idl - -interface nsIThreadShutdown extends nsISupports { - onCompletion(aEvent: nsIRunnable): void; - readonly completed: boolean; - stopWaitingAndLeakThread(): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/threads/nsITimer.idl - -type nsITimerCallback = Callable<{ - notify(timer: nsITimer): void; -}> - -interface nsITimer extends nsISupports { - readonly TYPE_ONE_SHOT: 0; - readonly TYPE_REPEATING_SLACK: 1; - readonly TYPE_REPEATING_PRECISE: 2; - readonly TYPE_REPEATING_PRECISE_CAN_SKIP: 3; - readonly TYPE_REPEATING_SLACK_LOW_PRIORITY: 4; - readonly TYPE_ONE_SHOT_LOW_PRIORITY: 5; - - init(aObserver: nsIObserver, aDelayInMs: u32, aType: u32): void; - initWithCallback(aCallback: nsITimerCallback, aDelayInMs: u32, aType: u32): void; - cancel(): void; - delay: u32; - type: u32; - readonly callback: nsITimerCallback; - target: nsIEventTarget; - readonly name: string; -} - -interface nsITimerManager extends nsISupports { - getTimers(): nsITimer[]; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/bouncetrackingprotection/nsIBTPRemoteExceptionList.idl - -interface nsIBTPRemoteExceptionList extends nsISupports { - init(aProtection: nsIBounceTrackingProtection): Promise; - shutdown(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/bouncetrackingprotection/nsIBounceTrackingMapEntry.idl - -interface nsIBounceTrackingMapEntry extends nsISupports { - readonly siteHost: string; - readonly timeStamp: PRTime; -} - -interface nsIBounceTrackingPurgeEntry extends nsIBounceTrackingMapEntry { - readonly purgeTime: PRTime; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/bouncetrackingprotection/nsIBounceTrackingProtection.idl - -} // global - -declare namespace nsIBounceTrackingProtection { - -enum Modes { - MODE_DISABLED = 0, - MODE_ENABLED = 1, - MODE_ENABLED_STANDBY = 2, - MODE_ENABLED_DRY_RUN = 3, - MAX_MODE_VALUE = 3, -} - -} - -declare global { - -interface nsIBounceTrackingProtection extends nsISupports, Enums { - clearAll(): void; - clearBySiteHostAndOriginAttributes(aSiteHost: string, originAttributes: any): void; - clearBySiteHostAndOriginAttributesPattern(aSiteHost: string, aOriginAttributesPattern: any): void; - clearByTimeRange(aFrom: PRTime, aTo: PRTime): void; - clearByOriginAttributesPattern(aPattern: string): void; - addSiteHostExceptions(aSiteHosts: string[]): void; - removeSiteHostExceptions(aSiteHosts: string[]): void; - hasRecentlyPurgedSite(aSiteHost: string): boolean; - testGetSiteHostExceptions(): string[]; - testRunPurgeBounceTrackers(): Promise; - testClearExpiredUserActivations(): void; - testGetBounceTrackerCandidateHosts(originAttributes: any): nsIBounceTrackingMapEntry[]; - testGetUserActivationHosts(originAttributes: any): nsIBounceTrackingMapEntry[]; - testAddBounceTrackerCandidate(originAttributes: any, aSiteHost: string, aBounceTime: PRTime): void; - testAddUserActivation(originAttributes: any, aSiteHost: string, aActivationTime: PRTime): void; - testGetRecentlyPurgedTrackers(originAttributes: any): nsIBounceTrackingPurgeEntry[]; - testMaybeMigrateUserInteractionPermissions(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIContentBlockingAllowList.idl - -interface nsIContentBlockingAllowList extends nsISupports { - computeContentBlockingAllowListPrincipal(aPrincipal: nsIPrincipal): nsIPrincipal; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIPartitioningExceptionListService.idl - -type nsIPartitioningExceptionListObserver = Callable<{ - onExceptionListUpdate(aList: string): void; -}> - -interface nsIPartitioningExceptionListService extends nsISupports { - registerAndRunExceptionListObserver(aObserver: nsIPartitioningExceptionListObserver): void; - unregisterExceptionListObserver(aObserver: nsIPartitioningExceptionListObserver): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIPurgeTrackerService.idl - -interface nsIPurgeTrackerService extends nsISupports { - purgeTrackingCookieJars(): Promise; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsITrackingDBService.idl - -interface nsITrackingDBService extends nsISupports { - readonly OTHER_COOKIES_BLOCKED_ID: 0; - readonly TRACKERS_ID: 1; - readonly TRACKING_COOKIES_ID: 2; - readonly CRYPTOMINERS_ID: 3; - readonly FINGERPRINTERS_ID: 4; - readonly SOCIAL_ID: 5; - readonly SUSPICIOUS_FINGERPRINTERS_ID: 6; - readonly BOUNCETRACKERS_ID: 7; - - recordContentBlockingLog(data: string): void; - saveEvents(data: string): Promise; - clearAll(): Promise; - clearSince(since: i64): Promise; - getEventsByDateRange(dateFrom: i64, dateTo: i64): Promise; - sumAllEvents(): Promise; - getEarliestRecordedDate(): Promise; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIURLDecorationAnnotationsService.idl - -interface nsIURLDecorationAnnotationsService extends nsISupports { - ensureUpdated(): Promise; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIURLQueryStringStripper.idl - -interface nsIURLQueryStringStripper extends nsISupports { - strip(aURI: nsIURI, aIsPBM: boolean, aOutput: OutParam): u32; - stripForCopyOrShare(aURI: nsIURI): nsIURI; - canStripForShare(aURI: nsIURI): boolean; - testGetStripList(): string; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIURLQueryStrippingListService.idl - -interface nsIURLQueryStrippingListObserver extends nsISupports { - onQueryStrippingListUpdate(aStripList: string, aAllowList: string): void; - onStripOnShareUpdate(aStripRules: string[]): void; -} - -interface nsIURLQueryStrippingListService extends nsISupports { - registerAndRunObserver(aObserver: nsIURLQueryStrippingListObserver): void; - registerAndRunObserverStripOnShare(aObserver: nsIURLQueryStrippingListObserver): void; - unregisterObserver(aObserver: nsIURLQueryStrippingListObserver): void; - unregisterStripOnShareObserver(aObserver: nsIURLQueryStrippingListObserver): void; - clearLists(): void; - testWaitForInit(): Promise; - testSetList(testFile: any): Promise; - testHasStripOnShareObservers(): boolean; - testHasQPSObservers(): boolean; -} - -// https://searchfox.org/mozilla-central/source/dom/media/gmp/mozIGeckoMediaPluginChromeService.idl - -interface mozIGeckoMediaPluginChromeService extends nsISupports { - addPluginDirectory(directory: string): void; - removePluginDirectory(directory: string): void; - removeAndDeletePluginDirectory(directory: string, defer?: boolean): void; - forgetThisSite(site: string, aPattern: string): void; - forgetThisBaseDomain(baseDomain: string): void; - isPersistentStorageAllowed(nodeId: string): boolean; - getStorageDir(): nsIFile; -} - -// https://searchfox.org/mozilla-central/source/dom/media/gmp/mozIGeckoMediaPluginService.idl - -interface mozIGeckoMediaPluginService extends nsISupports { - readonly thread: nsIThread; - RunPluginCrashCallbacks(pluginId: u32, pluginName: string): void; -} - -// https://searchfox.org/mozilla-central/source/modules/libpref/nsIPrefBranch.idl - -interface nsIPrefBranch extends nsISupports { - readonly PREF_INVALID: 0; - readonly PREF_STRING: 32; - readonly PREF_INT: 64; - readonly PREF_BOOL: 128; - - readonly root: string; - getPrefType(aPrefName: string): i32; - getBoolPref(aPrefName: string, aDefaultValue?: boolean): boolean; - setBoolPref(aPrefName: string, aValue: boolean): void; - getFloatPref(aPrefName: string, aDefaultValue?: float): float; - getCharPref(aPrefName: string, aDefaultValue?: string): string; - setCharPref(aPrefName: string, aValue: string): void; - getStringPref(aPrefName: string, aDefaultValue?: string): string; - setStringPref(aPrefName: string, aValue: string): void; - getIntPref(aPrefName: string, aDefaultValue?: i32): i32; - setIntPref(aPrefName: string, aValue: i32): void; - getComplexValue(aPrefName: string, aType: T): nsQIResult; - setComplexValue(aPrefName: string, aType: nsID, aValue: nsISupports): void; - clearUserPref(aPrefName: string): void; - lockPref(aPrefName: string): void; - prefHasUserValue(aPrefName: string): boolean; - prefHasDefaultValue(aPrefName: string): boolean; - prefIsLocked(aPrefName: string): boolean; - prefIsSanitized(aPrefName: string): boolean; - unlockPref(aPrefName: string): void; - deleteBranch(aStartingAt: string): void; - getChildList(aStartingAt: string): string[]; - addObserver(aDomain: string, aObserver: nsIObserver, aHoldWeak?: boolean): void; - removeObserver(aDomain: string, aObserver: nsIObserver): void; -} - -// https://searchfox.org/mozilla-central/source/modules/libpref/nsIPrefLocalizedString.idl - -interface nsIPrefLocalizedString extends nsISupportsString { -} - -// https://searchfox.org/mozilla-central/source/modules/libpref/nsIPrefService.idl - -type nsIPrefStatsCallback = Callable<{ - visit(prefName: string, accessCount: u32): void; -}> - -interface nsIPrefObserver extends nsISupports { - onStringPref(kind: string, name: string, value: string, isSticky: boolean, isLocked: boolean): void; - onIntPref(kind: string, name: string, value: i32, isSticky: boolean, isLocked: boolean): void; - onBoolPref(kind: string, name: string, value: boolean, isSticky: boolean, isLocked: boolean): void; - onError(message: string): void; -} - -interface nsIPrefService extends nsISupports { - resetPrefs(): void; - savePrefFile(aFile: nsIFile): void; - backupPrefFile(aFile: nsIFile): Promise; - getBranch(aPrefRoot: string): nsIPrefBranch; - getDefaultBranch(aPrefRoot: string): nsIPrefBranch; - readonly dirty: boolean; - readDefaultPrefsFromFile(aFile: nsIFile): void; - readUserPrefsFromFile(aFile: nsIFile): void; - readStats(callback: nsIPrefStatsCallback): void; - resetStats(): void; - parsePrefsFromBuffer(bytes: u8[], observer: nsIPrefObserver, pathLabel?: string): void; - readonly userPrefsFileLastModifiedAtStartup: PRTime; -} - -// https://searchfox.org/mozilla-central/source/modules/libpref/nsIRelativeFilePref.idl - -interface nsIRelativeFilePref extends nsISupports { - file: nsIFile; - relativeToKey: string; -} - -// https://searchfox.org/mozilla-central/source/startupcache/nsIStartupCacheInfo.idl - -interface nsIStartupCacheInfo extends nsISupports { - readonly IgnoreDiskCache: boolean; - readonly FoundDiskCacheOnInit: boolean; - readonly WroteToDiskCache: boolean; - readonly DiskCachePath: string; -} - -// https://searchfox.org/mozilla-central/source/layout/xul/tree/nsITreeSelection.idl - -interface nsITreeSelection extends nsISupports { - tree: XULTreeElement; - readonly single: boolean; - readonly count: i32; - isSelected(index: i32): boolean; - select(index: i32): void; - timedSelect(index: i32, delay: i32): void; - toggleSelect(index: i32): void; - rangedSelect(startIndex: i32, endIndex: i32, augment: boolean): void; - clearRange(startIndex: i32, endIndex: i32): void; - clearSelection(): void; - selectAll(): void; - getRangeCount(): i32; - getRangeAt(i: i32, min: OutParam, max: OutParam): void; - invalidateSelection(): void; - adjustSelection(index: i32, count: i32): void; - selectEventsSuppressed: boolean; - currentIndex: i32; - readonly shiftSelectPivot: i32; -} - -// https://searchfox.org/mozilla-central/source/layout/xul/tree/nsITreeView.idl - -interface nsITreeView extends nsISupports { - readonly DROP_BEFORE: -1; - readonly DROP_ON: 0; - readonly DROP_AFTER: 1; - + readonly anchorCount: i32; + getURI(index: i32): nsIURI; + getAnchor(index: i32): nsIAccessible; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleHyperText.idl + +interface nsIAccessibleHyperText extends nsISupports { + readonly linkCount: i32; + getLinkAt(index: i32): nsIAccessibleHyperLink; + getLinkIndex(link: nsIAccessibleHyperLink): i32; + getLinkIndexAtOffset(offset: i32): i32; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleImage.idl + +interface nsIAccessibleImage extends nsISupports { + getImagePosition(coordType: u32, x: OutParam, y: OutParam): void; + getImageSize(width: OutParam, height: OutParam): void; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleObjectAttributeChangedEvent.idl + +interface nsIAccessibleObjectAttributeChangedEvent extends nsIAccessibleEvent { + readonly changedAttribute: string; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessiblePivot.idl + +interface nsIAccessiblePivot extends nsISupports { + next(aAnchor: nsIAccessible, aRule: nsIAccessibleTraversalRule, aIncludeStart?: boolean): nsIAccessible; + prev(aAnchor: nsIAccessible, aRule: nsIAccessibleTraversalRule, aIncludeStart?: boolean): nsIAccessible; + first(aRule: nsIAccessibleTraversalRule): nsIAccessible; + last(aRule: nsIAccessibleTraversalRule): nsIAccessible; + atPoint(aX: i32, aY: i32, aRule: nsIAccessibleTraversalRule): nsIAccessible; +} + +interface nsIAccessibleTraversalRule extends nsISupports { + readonly FILTER_IGNORE: 0; + readonly FILTER_MATCH: 1; + readonly FILTER_IGNORE_SUBTREE: 2; + + match(aAccessible: nsIAccessible): u16; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleRelation.idl + +interface nsIAccessibleRelation extends nsISupports { + readonly RELATION_LABELLED_BY: 0; + readonly RELATION_LABEL_FOR: 1; + readonly RELATION_DESCRIBED_BY: 2; + readonly RELATION_DESCRIPTION_FOR: 3; + readonly RELATION_NODE_CHILD_OF: 4; + readonly RELATION_NODE_PARENT_OF: 5; + readonly RELATION_CONTROLLED_BY: 6; + readonly RELATION_CONTROLLER_FOR: 7; + readonly RELATION_FLOWS_TO: 8; + readonly RELATION_FLOWS_FROM: 9; + readonly RELATION_MEMBER_OF: 10; + readonly RELATION_SUBWINDOW_OF: 11; + readonly RELATION_EMBEDS: 12; + readonly RELATION_EMBEDDED_BY: 13; + readonly RELATION_POPUP_FOR: 14; + readonly RELATION_PARENT_WINDOW_OF: 15; + readonly RELATION_DEFAULT_BUTTON: 16; + readonly RELATION_CONTAINING_DOCUMENT: 17; + readonly RELATION_CONTAINING_TAB_PANE: 18; + readonly RELATION_CONTAINING_WINDOW: 19; + readonly RELATION_CONTAINING_APPLICATION: 20; + readonly RELATION_DETAILS: 21; + readonly RELATION_DETAILS_FOR: 22; + readonly RELATION_ERRORMSG: 23; + readonly RELATION_ERRORMSG_FOR: 24; + readonly RELATION_LINKS_TO: 25; + + readonly relationType: u32; + readonly targetsCount: u32; + getTarget(index: u32): nsIAccessible; + getTargets(): nsIArray; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleRole.idl + +interface nsIAccessibleRole extends nsISupports { + readonly ROLE_NOTHING: 0; + readonly ROLE_MENUBAR: 1; + readonly ROLE_SCROLLBAR: 2; + readonly ROLE_ALERT: 3; + readonly ROLE_INTERNAL_FRAME: 4; + readonly ROLE_MENUPOPUP: 5; + readonly ROLE_MENUITEM: 6; + readonly ROLE_TOOLTIP: 7; + readonly ROLE_APPLICATION: 8; + readonly ROLE_DOCUMENT: 9; + readonly ROLE_PANE: 10; + readonly ROLE_DIALOG: 11; + readonly ROLE_GROUPING: 12; + readonly ROLE_SEPARATOR: 13; + readonly ROLE_TOOLBAR: 14; + readonly ROLE_STATUSBAR: 15; + readonly ROLE_TABLE: 16; + readonly ROLE_COLUMNHEADER: 17; + readonly ROLE_ROWHEADER: 18; + readonly ROLE_ROW: 19; + readonly ROLE_CELL: 20; + readonly ROLE_LINK: 21; + readonly ROLE_LIST: 22; + readonly ROLE_LISTITEM: 23; + readonly ROLE_OUTLINE: 24; + readonly ROLE_OUTLINEITEM: 25; + readonly ROLE_PAGETAB: 26; + readonly ROLE_PROPERTYPAGE: 27; + readonly ROLE_GRAPHIC: 28; + readonly ROLE_STATICTEXT: 29; + readonly ROLE_TEXT_LEAF: 30; + readonly ROLE_PUSHBUTTON: 31; + readonly ROLE_CHECKBUTTON: 32; + readonly ROLE_RADIOBUTTON: 33; + readonly ROLE_COMBOBOX: 34; + readonly ROLE_PROGRESSBAR: 35; + readonly ROLE_SLIDER: 36; + readonly ROLE_SPINBUTTON: 37; + readonly ROLE_DIAGRAM: 38; + readonly ROLE_ANIMATION: 39; + readonly ROLE_BUTTONDROPDOWN: 40; + readonly ROLE_BUTTONMENU: 41; + readonly ROLE_WHITESPACE: 42; + readonly ROLE_PAGETABLIST: 43; + readonly ROLE_CANVAS: 44; + readonly ROLE_CHECK_MENU_ITEM: 45; + readonly ROLE_DATE_EDITOR: 46; + readonly ROLE_CHROME_WINDOW: 47; + readonly ROLE_LABEL: 48; + readonly ROLE_PASSWORD_TEXT: 49; + readonly ROLE_RADIO_MENU_ITEM: 50; + readonly ROLE_TEXT_CONTAINER: 51; + readonly ROLE_TOGGLE_BUTTON: 52; + readonly ROLE_TREE_TABLE: 53; + readonly ROLE_PARAGRAPH: 54; + readonly ROLE_ENTRY: 55; + readonly ROLE_CAPTION: 56; + readonly ROLE_NON_NATIVE_DOCUMENT: 57; + readonly ROLE_HEADING: 58; + readonly ROLE_SECTION: 59; + readonly ROLE_FORM: 60; + readonly ROLE_APP_ROOT: 61; + readonly ROLE_PARENT_MENUITEM: 62; + readonly ROLE_COMBOBOX_LIST: 63; + readonly ROLE_COMBOBOX_OPTION: 64; + readonly ROLE_IMAGE_MAP: 65; + readonly ROLE_OPTION: 66; + readonly ROLE_RICH_OPTION: 67; + readonly ROLE_LISTBOX: 68; + readonly ROLE_FLAT_EQUATION: 69; + readonly ROLE_GRID_CELL: 70; + readonly ROLE_NOTE: 71; + readonly ROLE_FIGURE: 72; + readonly ROLE_CHECK_RICH_OPTION: 73; + readonly ROLE_DEFINITION_LIST: 74; + readonly ROLE_TERM: 75; + readonly ROLE_DEFINITION: 76; + readonly ROLE_KEY: 77; + readonly ROLE_SWITCH: 78; + readonly ROLE_MATHML_MATH: 79; + readonly ROLE_MATHML_IDENTIFIER: 80; + readonly ROLE_MATHML_NUMBER: 81; + readonly ROLE_MATHML_OPERATOR: 82; + readonly ROLE_MATHML_TEXT: 83; + readonly ROLE_MATHML_STRING_LITERAL: 84; + readonly ROLE_MATHML_GLYPH: 85; + readonly ROLE_MATHML_ROW: 86; + readonly ROLE_MATHML_FRACTION: 87; + readonly ROLE_MATHML_SQUARE_ROOT: 88; + readonly ROLE_MATHML_ROOT: 89; + readonly ROLE_MATHML_ENCLOSED: 90; + readonly ROLE_MATHML_STYLE: 91; + readonly ROLE_MATHML_SUB: 92; + readonly ROLE_MATHML_SUP: 93; + readonly ROLE_MATHML_SUB_SUP: 94; + readonly ROLE_MATHML_UNDER: 95; + readonly ROLE_MATHML_OVER: 96; + readonly ROLE_MATHML_UNDER_OVER: 97; + readonly ROLE_MATHML_MULTISCRIPTS: 98; + readonly ROLE_MATHML_TABLE: 99; + readonly ROLE_MATHML_LABELED_ROW: 100; + readonly ROLE_MATHML_TABLE_ROW: 101; + readonly ROLE_MATHML_CELL: 102; + readonly ROLE_MATHML_ACTION: 103; + readonly ROLE_MATHML_ERROR: 104; + readonly ROLE_MATHML_STACK: 105; + readonly ROLE_MATHML_LONG_DIVISION: 106; + readonly ROLE_MATHML_STACK_GROUP: 107; + readonly ROLE_MATHML_STACK_ROW: 108; + readonly ROLE_MATHML_STACK_CARRIES: 109; + readonly ROLE_MATHML_STACK_CARRY: 110; + readonly ROLE_MATHML_STACK_LINE: 111; + readonly ROLE_RADIO_GROUP: 112; + readonly ROLE_TEXT: 113; + readonly ROLE_DETAILS: 114; + readonly ROLE_SUMMARY: 115; + readonly ROLE_LANDMARK: 116; + readonly ROLE_NAVIGATION: 117; + readonly ROLE_FOOTNOTE: 118; + readonly ROLE_ARTICLE: 119; + readonly ROLE_REGION: 120; + readonly ROLE_EDITCOMBOBOX: 121; + readonly ROLE_BLOCKQUOTE: 122; + readonly ROLE_CONTENT_DELETION: 123; + readonly ROLE_CONTENT_INSERTION: 124; + readonly ROLE_FORM_LANDMARK: 125; + readonly ROLE_MARK: 126; + readonly ROLE_SUGGESTION: 127; + readonly ROLE_COMMENT: 128; + readonly ROLE_CODE: 129; + readonly ROLE_TIME_EDITOR: 130; + readonly ROLE_LISTITEM_MARKER: 131; + readonly ROLE_METER: 132; + readonly ROLE_SUBSCRIPT: 133; + readonly ROLE_SUPERSCRIPT: 134; + readonly ROLE_EMPHASIS: 135; + readonly ROLE_STRONG: 136; + readonly ROLE_TIME: 137; + readonly ROLE_GRID: 138; + readonly ROLE_ROWGROUP: 139; + readonly ROLE_SEARCHBOX: 140; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleScrollingEvent.idl + +interface nsIAccessibleScrollingEvent extends nsIAccessibleEvent { + readonly scrollX: u32; + readonly scrollY: u32; + readonly maxScrollX: u32; + readonly maxScrollY: u32; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleSelectable.idl + +interface nsIAccessibleSelectable extends nsISupports { + readonly selectedItems: nsIArray; + readonly selectedItemCount: u32; + getSelectedItemAt(index: u32): nsIAccessible; + isItemSelected(index: u32): boolean; + addItemToSelection(index: u32): void; + removeItemFromSelection(index: u32): void; + selectAll(): boolean; + unselectAll(): void; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleStateChangeEvent.idl + +interface nsIAccessibleStateChangeEvent extends nsIAccessibleEvent { + readonly state: u32; + readonly isExtraState: boolean; + readonly isEnabled: boolean; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleStates.idl + +interface nsIAccessibleStates extends nsISupports { + readonly STATE_UNAVAILABLE: 1; + readonly STATE_SELECTED: 2; + readonly STATE_FOCUSED: 4; + readonly STATE_PRESSED: 8; + readonly STATE_CHECKED: 16; + readonly STATE_MIXED: 32; + readonly STATE_READONLY: 64; + readonly STATE_HOTTRACKED: 128; + readonly STATE_DEFAULT: 256; + readonly STATE_EXPANDED: 512; + readonly STATE_COLLAPSED: 1024; + readonly STATE_BUSY: 2048; + readonly STATE_FLOATING: 4096; + readonly STATE_MARQUEED: 8192; + readonly STATE_ANIMATED: 16384; + readonly STATE_INVISIBLE: 32768; + readonly STATE_OFFSCREEN: 65536; + readonly STATE_SIZEABLE: 131072; + readonly STATE_MOVEABLE: 262144; + readonly STATE_SELFVOICING: 524288; + readonly STATE_FOCUSABLE: 1048576; + readonly STATE_SELECTABLE: 2097152; + readonly STATE_LINKED: 4194304; + readonly STATE_TRAVERSED: 8388608; + readonly STATE_MULTISELECTABLE: 16777216; + readonly STATE_EXTSELECTABLE: 33554432; + readonly STATE_ALERT_LOW: 67108864; + readonly STATE_ALERT_MEDIUM: 134217728; + readonly STATE_ALERT_HIGH: 268435456; + readonly STATE_PROTECTED: 536870912; + readonly STATE_HASPOPUP: 1073741824; + readonly STATE_REQUIRED: 67108864; + readonly STATE_IMPORTANT: 134217728; + readonly STATE_INVALID: 268435456; + readonly STATE_CHECKABLE: 8192; + readonly EXT_STATE_SUPPORTS_AUTOCOMPLETION: 1; + readonly EXT_STATE_DEFUNCT: 2; + readonly EXT_STATE_SELECTABLE_TEXT: 4; + readonly EXT_STATE_EDITABLE: 8; + readonly EXT_STATE_ACTIVE: 16; + readonly EXT_STATE_MODAL: 32; + readonly EXT_STATE_MULTI_LINE: 64; + readonly EXT_STATE_HORIZONTAL: 128; + readonly EXT_STATE_OPAQUE: 256; + readonly EXT_STATE_SINGLE_LINE: 512; + readonly EXT_STATE_TRANSIENT: 1024; + readonly EXT_STATE_VERTICAL: 2048; + readonly EXT_STATE_STALE: 4096; + readonly EXT_STATE_ENABLED: 8192; + readonly EXT_STATE_SENSITIVE: 16384; + readonly EXT_STATE_EXPANDABLE: 32768; + readonly EXT_STATE_PINNED: 65536; + readonly EXT_STATE_CURRENT: 131072; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTable.idl + +interface nsIAccessibleTable extends nsISupports { + readonly caption: nsIAccessible; + readonly summary: string; + readonly columnCount: i32; readonly rowCount: i32; - selection: nsITreeSelection; - getRowProperties(index: i32): string; - getCellProperties(row: i32, col: TreeColumn): string; - getColumnProperties(col: TreeColumn): string; - isContainer(index: i32): boolean; - isContainerOpen(index: i32): boolean; - isContainerEmpty(index: i32): boolean; - isSeparator(index: i32): boolean; - isSorted(): boolean; - canDrop(index: i32, orientation: i32, dataTransfer: DataTransfer): boolean; - drop(row: i32, orientation: i32, dataTransfer: DataTransfer): void; - getParentIndex(rowIndex: i32): i32; - hasNextSibling(rowIndex: i32, afterIndex: i32): boolean; - getLevel(index: i32): i32; - getImageSrc(row: i32, col: TreeColumn): string; - getCellValue(row: i32, col: TreeColumn): string; - getCellText(row: i32, col: TreeColumn): string; - setTree(tree: XULTreeElement): void; - toggleOpenState(index: i32): void; - cycleHeader(col: TreeColumn): void; - selectionChanged(): void; - cycleCell(row: i32, col: TreeColumn): void; - isEditable(row: i32, col: TreeColumn): boolean; - setCellValue(row: i32, col: TreeColumn, value: string): void; - setCellText(row: i32, col: TreeColumn, value: string): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/components/nsICategoryManager.idl - -interface nsICategoryEntry extends nsISupportsCString { - readonly entry: string; - readonly value: string; -} - -interface nsICategoryManager extends nsISupports { - getCategoryEntry(aCategory: string, aEntry: string): string; - addCategoryEntry(aCategory: string, aEntry: string, aValue: string, aPersist: boolean, aReplace: boolean): string; - deleteCategoryEntry(aCategory: string, aEntry: string, aPersist: boolean): void; - deleteCategory(aCategory: string): void; - enumerateCategory(aCategory: string): nsISimpleEnumerator; - enumerateCategories(): nsISimpleEnumerator; -} - -// https://searchfox.org/mozilla-central/source/xpcom/components/nsIClassInfo.idl - -interface nsIClassInfo extends nsISupports { - readonly SINGLETON: 1; - readonly THREADSAFE: 2; - readonly SINGLETON_CLASSINFO: 32; - readonly RESERVED: 2147483648; - - readonly interfaces: nsID[]; - readonly contractID: string; - readonly classDescription: string; - readonly classID: nsID; - readonly flags: u32; -} - -// https://searchfox.org/mozilla-central/source/xpcom/components/nsIComponentManager.idl - -interface nsIComponentManager extends nsISupports { - getClassObject(aClass: nsID, aIID: T): nsQIResult; - getClassObjectByContractID(aContractID: string, aIID: T): nsQIResult; - addBootstrappedManifestLocation(aLocation: nsIFile): void; - removeBootstrappedManifestLocation(aLocation: nsIFile): void; - getManifestLocations(): nsIArray; - getComponentESModules(): nsIUTF8StringEnumerator; -} - -// https://searchfox.org/mozilla-central/source/xpcom/components/nsIComponentRegistrar.idl - -interface nsIComponentRegistrar extends nsISupports { - autoRegister(aSpec: nsIFile): void; - registerFactory(aClass: nsID, aClassName: string, aContractID: string, aFactory: nsIFactory): void; - unregisterFactory(aClass: nsID, aFactory: nsIFactory): void; - isCIDRegistered(aClass: nsID): boolean; - isContractIDRegistered(aContractID: string): boolean; - getContractIDs(): string[]; - contractIDToCID(aContractID: string): nsID; -} - -// https://searchfox.org/mozilla-central/source/xpcom/components/nsIFactory.idl - -interface nsIFactory extends nsISupports { - createInstance(iid: T): nsQIResult; -} - -// https://searchfox.org/mozilla-central/source/xpcom/components/nsIServiceManager.idl - -interface nsIServiceManager extends nsISupports { - getService(aClass: nsID, aIID: T): nsQIResult; - getServiceByContractID(aContractID: string, aIID: T): nsQIResult; - isServiceInstantiated(aClass: nsID, aIID: nsID): boolean; - isServiceInstantiatedByContractID(aContractID: string, aIID: nsID): boolean; -} - -// https://searchfox.org/mozilla-central/source/dom/system/nsIOSPermissionRequest.idl - -interface nsIOSPermissionRequest extends nsISupports { - readonly PERMISSION_STATE_NOTDETERMINED: 0; - readonly PERMISSION_STATE_RESTRICTED: 1; - readonly PERMISSION_STATE_DENIED: 2; - readonly PERMISSION_STATE_AUTHORIZED: 3; - - getMediaCapturePermissionState(aVideo: OutParam, aAudio: OutParam): void; - getAudioCapturePermissionState(aAudio: OutParam): void; - getVideoCapturePermissionState(aVideo: OutParam): void; - getScreenCapturePermissionState(aScreen: OutParam): void; - requestVideoCapturePermission(): Promise; - requestAudioCapturePermission(): Promise; - maybeRequestScreenCapturePermission(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIMozIntl.idl - -interface mozIMozIntl extends nsISupports { - getCalendarInfo(locales?: any): any; - getDisplayNamesDeprecated(locales?: any, options?: any): any; - getAvailableLocaleDisplayNames(type: any): any; - getLanguageDisplayNames(locales: any, langCodes: any): any; - getRegionDisplayNames(locales: any, regionCodes: any): any; - getLocaleDisplayNames(locales: any, localeCodes: any, options?: any): any; - getScriptDirection(locale: any): any; - stringHasRTLChars(str: any): boolean; - readonly Collator: any; - readonly DateTimeFormat: any; - readonly DisplayNames: any; - readonly ListFormat: any; - readonly Locale: any; - readonly NumberFormat: any; - readonly PluralRules: any; - readonly RelativeTimeFormat: any; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIMozIntlHelper.idl - -interface mozIMozIntlHelper extends nsISupports { - addGetCalendarInfo(intlObject: any): void; - addDateTimeFormatConstructor(intlObject: any): void; - addDisplayNamesConstructor(intlObject: any): void; - stringHasRTLChars(str: any): boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasks.idl - -interface nsIBackgroundTasks extends nsISupports { - readonly isBackgroundTaskMode: boolean; - backgroundTaskName(): string; - overrideBackgroundTaskNameForTesting(taskName: string): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasksManager.idl - -interface nsIBackgroundTasksManager extends nsICommandLineHandler { - runBackgroundTaskNamed(aTaskName: string, aCommandLine: nsICommandLine): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasksRunner.idl - -interface nsIBackgroundTasksRunner extends nsISupports { - runInDetachedProcess(aTaskName: string, aCommandLine: string[]): void; - removeDirectoryInDetachedProcess(aParentDirPath: string, aChildDirName: string, aSecondsToWait: string, aOtherFoldersSuffix: string, aMetricsId?: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPosition.idl - -interface nsIDOMGeoPosition extends nsISupports { - readonly timestamp: EpochTimeStamp; - readonly coords: nsIDOMGeoPositionCoords; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPositionCallback.idl - -type nsIDOMGeoPositionCallback = Callable<{ - handleEvent(position: nsIDOMGeoPosition): void; -}> - -// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPositionCoords.idl - -interface nsIDOMGeoPositionCoords extends nsISupports { - readonly latitude: double; - readonly longitude: double; - readonly altitude: double; - readonly accuracy: double; - readonly altitudeAccuracy: double; - readonly heading: double; - readonly speed: double; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPositionErrorCallback.idl - -type nsIDOMGeoPositionErrorCallback = Callable<{ - handleEvent(positionError: GeolocationPositionError): void; -}> - -// https://searchfox.org/mozilla-central/source/browser/components/nsIBrowserHandler.idl - -interface nsIBrowserHandler extends nsISupports { - startPage: string; - defaultArgs: string; - getFirstWindowArgs(): string; - kiosk: boolean; - majorUpgrade: boolean; - firstRunProfile: boolean; - getFeatures(aCmdLine: nsICommandLine): string; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIAsyncHistory.idl - -interface mozIVisitInfo extends nsISupports { - readonly visitId: i64; - readonly visitDate: PRTime; - readonly transitionType: u32; - readonly referrerURI: nsIURI; -} - -interface mozIPlaceInfo extends nsISupports { - readonly placeId: i64; - readonly guid: string; - readonly uri: nsIURI; - readonly title: string; - readonly frecency: i64; - readonly visits: any; -} - -interface mozIVisitInfoCallback extends nsISupports { - handleError(aResultCode: nsresult, aPlaceInfo: mozIPlaceInfo): void; - handleResult(aPlaceInfo: mozIPlaceInfo): void; - handleCompletion(aUpdatedItems: u32): void; - readonly ignoreResults: boolean; - readonly ignoreErrors: boolean; -} - -type mozIVisitedStatusCallback = Callable<{ - isVisited(aURI: nsIURI, aVisitedStatus: boolean): void; -}> - -interface mozIAsyncHistory extends nsISupports { - updatePlaces(aPlaceInfo: any, aCallback?: mozIVisitInfoCallback): void; - isURIVisited(aURI: nsIURI, aCallback: mozIVisitedStatusCallback): void; - clearCache(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIPlacesAutoComplete.idl - -interface mozIPlacesAutoComplete extends nsISupports { - readonly MATCH_ANYWHERE: 0; - readonly MATCH_BOUNDARY_ANYWHERE: 1; - readonly MATCH_BOUNDARY: 2; - readonly MATCH_BEGINNING: 3; - readonly MATCH_ANYWHERE_UNMODIFIED: 4; - readonly MATCH_BEGINNING_CASE_SENSITIVE: 5; - readonly BEHAVIOR_HISTORY: 1; - readonly BEHAVIOR_BOOKMARK: 2; - readonly BEHAVIOR_TAG: 4; - readonly BEHAVIOR_TITLE: 8; - readonly BEHAVIOR_URL: 16; - readonly BEHAVIOR_TYPED: 32; - readonly BEHAVIOR_JAVASCRIPT: 64; - readonly BEHAVIOR_OPENPAGE: 128; - readonly BEHAVIOR_RESTRICT: 256; - readonly BEHAVIOR_SEARCH: 512; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIPlacesPendingOperation.idl - -interface mozIPlacesPendingOperation extends nsISupports { - cancel(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozISyncedBookmarksMirror.idl - -interface mozISyncedBookmarksMirrorProgressListener extends nsISupports { - onFetchLocalTree(took: i64, itemCount: i64, deletedCount: i64, problems: nsIPropertyBag): void; - onFetchRemoteTree(took: i64, itemCount: i64, deletedCount: i64, problems: nsIPropertyBag): void; - onMerge(took: i64, counts: nsIPropertyBag): void; - onApply(took: i64): void; -} - -interface mozISyncedBookmarksMirrorCallback extends nsISupports { - handleSuccess(result: boolean): void; - handleError(code: nsresult, message: string): void; -} - -interface mozISyncedBookmarksMirrorLogger extends nsISupports { - readonly LEVEL_OFF: 0; - readonly LEVEL_ERROR: 1; - readonly LEVEL_WARN: 2; - readonly LEVEL_DEBUG: 3; - readonly LEVEL_TRACE: 4; - - maxLevel: i16; - error(message: string): void; - warn(message: string): void; - debug(message: string): void; - trace(message: string): void; -} - -interface mozISyncedBookmarksMerger extends nsISupports { - readonly KIND_BOOKMARK: 1; - readonly KIND_QUERY: 2; - readonly KIND_FOLDER: 3; - readonly KIND_LIVEMARK: 4; - readonly KIND_SEPARATOR: 5; - readonly VALIDITY_VALID: 1; - readonly VALIDITY_REUPLOAD: 2; - readonly VALIDITY_REPLACE: 3; - - db: mozIStorageConnection; - logger: mozIServicesLogSink; - merge(localTimeSeconds: i64, remoteTimeSeconds: i64, callback: mozISyncedBookmarksMirrorCallback): mozIPlacesPendingOperation; - reset(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsIFaviconService.idl - -interface nsIFaviconService extends nsISupports { - readonly FAVICON_LOAD_PRIVATE: 1; - readonly FAVICON_LOAD_NON_PRIVATE: 2; - readonly ICONDATA_FLAGS_RICH: 1; - readonly MAX_FAVICON_BUFFER_SIZE: 65536; - - getFaviconLinkForIcon(aFaviconURI: nsIURI): nsIURI; - expireAllFavicons(): void; - setDefaultIconURIPreferredSize(aDefaultSize: u16): void; - preferredSizeFromURI(aURI: nsIURI): u16; - readonly defaultFavicon: nsIURI; - readonly defaultFaviconMimeType: string; - setFaviconForPage(aPageURI: nsIURI, aFaviconURI: nsIURI, aDataURL: nsIURI, aExpiration?: PRTime, isRichIcon?: boolean): Promise; - getFaviconURLForPage(aPageURI: nsIURI, aCallback: nsIFaviconDataCallback, aPreferredWidth?: u16): void; - getFaviconDataForPage(aPageURI: nsIURI, aCallback: nsIFaviconDataCallback, aPreferredWidth?: u16): void; - copyFavicons(aFromPageURI: nsIURI, aToPageURI: nsIURI, aFaviconLoadType: u32, aCallback?: nsIFaviconDataCallback): void; -} - -type nsIFaviconDataCallback = Callable<{ - onComplete(aFaviconURI: nsIURI, aDataLen: u32, aData: u8[], aMimeType: string, aWidth: u16): void; -}> - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsINavBookmarksService.idl - -interface nsINavBookmarksService extends nsISupports { - readonly DEFAULT_INDEX: -1; - readonly TYPE_BOOKMARK: 1; - readonly TYPE_FOLDER: 2; - readonly TYPE_SEPARATOR: 3; - readonly TYPE_DYNAMIC_CONTAINER: 4; - readonly SOURCE_DEFAULT: 0; - readonly SOURCE_SYNC: 1; - readonly SOURCE_IMPORT: 2; - readonly SOURCE_SYNC_REPARENT_REMOVED_FOLDER_CHILDREN: 4; - readonly SOURCE_RESTORE: 5; - readonly SOURCE_RESTORE_ON_STARTUP: 6; - readonly SYNC_STATUS_UNKNOWN: 0; - readonly SYNC_STATUS_NEW: 1; - readonly SYNC_STATUS_NORMAL: 2; - - readonly tagsFolder: i64; - readonly totalSyncChanges: i64; - insertBookmark(aParentId: i64, aURI: nsIURI, aIndex: i32, aTitle: string, aGuid?: string, aSource?: u16): i64; - removeItem(aItemId: i64, aSource?: u16): void; - createFolder(aParentFolder: i64, name: string, index: i32, aGuid?: string, aSource?: u16): i64; - setItemTitle(aItemId: i64, aTitle: string, aSource?: u16): void; - getItemTitle(aItemId: i64): string; - setItemLastModified(aItemId: i64, aLastModified: PRTime, aSource?: u16): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsINavHistoryService.idl - -interface nsINavHistoryResultNode extends nsISupports { - readonly RESULT_TYPE_URI: 0; - readonly RESULT_TYPE_QUERY: 5; - readonly RESULT_TYPE_FOLDER: 6; - readonly RESULT_TYPE_SEPARATOR: 7; - readonly RESULT_TYPE_FOLDER_SHORTCUT: 9; - - readonly parent: nsINavHistoryContainerResultNode; - readonly parentResult: nsINavHistoryResult; - readonly uri: string; - readonly type: u32; - readonly title: string; - readonly accessCount: u32; - readonly time: PRTime; - readonly icon: string; - readonly indentLevel: i32; - readonly bookmarkIndex: i32; - readonly itemId: i64; - readonly dateAdded: PRTime; - readonly lastModified: PRTime; - readonly tags: string; - readonly pageGuid: string; - readonly bookmarkGuid: string; - readonly visitId: i64; - readonly visitType: u32; -} - -interface nsINavHistoryContainerResultNode extends nsINavHistoryResultNode { - readonly STATE_CLOSED: 0; - readonly STATE_LOADING: 1; - readonly STATE_OPENED: 2; - - containerOpen: boolean; - readonly state: u16; - readonly hasChildren: boolean; - readonly childCount: u32; - getChild(aIndex: u32): nsINavHistoryResultNode; - getChildIndex(aNode: nsINavHistoryResultNode): u32; -} - -interface nsINavHistoryQueryResultNode extends nsINavHistoryContainerResultNode { - readonly query: nsINavHistoryQuery; - readonly queryOptions: nsINavHistoryQueryOptions; - readonly folderItemId: i64; - readonly targetFolderGuid: string; -} - -interface nsINavHistoryResultObserver extends nsISupports { - readonly skipHistoryDetailsNotifications: boolean; - nodeInserted(aParent: nsINavHistoryContainerResultNode, aNode: nsINavHistoryResultNode, aNewIndex: u32): void; - nodeRemoved(aParent: nsINavHistoryContainerResultNode, aItem: nsINavHistoryResultNode, aOldIndex: u32): void; - nodeMoved(aNode: nsINavHistoryResultNode, aOldParent: nsINavHistoryContainerResultNode, aOldIndex: u32, aNewParent: nsINavHistoryContainerResultNode, aNewIndex: u32): void; - nodeTitleChanged(aNode: nsINavHistoryResultNode, aNewTitle: string): void; - nodeURIChanged(aNode: nsINavHistoryResultNode, aOldURI: string): void; - nodeIconChanged(aNode: nsINavHistoryResultNode): void; - nodeHistoryDetailsChanged(aNode: nsINavHistoryResultNode, aOldVisitDate: PRTime, aOldAccessCount: u32): void; - nodeTagsChanged(aNode: nsINavHistoryResultNode): void; - nodeKeywordChanged(aNode: nsINavHistoryResultNode, aNewKeyword: string): void; - nodeDateAddedChanged(aNode: nsINavHistoryResultNode, aNewValue: PRTime): void; - nodeLastModifiedChanged(aNode: nsINavHistoryResultNode, aNewValue: PRTime): void; - containerStateChanged(aContainerNode: nsINavHistoryContainerResultNode, aOldState: u32, aNewState: u32): void; - invalidateContainer(aContainerNode: nsINavHistoryContainerResultNode): void; - sortingChanged(sortingMode: u16): void; - batching(aToggleMode: boolean): void; - result: nsINavHistoryResult; -} - -interface nsINavHistoryResult extends nsISupports { - sortingMode: u16; - suppressNotifications: boolean; - addObserver(aObserver: nsINavHistoryResultObserver, aOwnsWeak?: boolean): void; - removeObserver(aObserver: nsINavHistoryResultObserver): void; - readonly root: nsINavHistoryContainerResultNode; - onBeginUpdateBatch(): void; - onEndUpdateBatch(): void; -} - -interface nsINavHistoryQuery extends nsISupports { - readonly TIME_RELATIVE_EPOCH: 0; - readonly TIME_RELATIVE_TODAY: 1; - readonly TIME_RELATIVE_NOW: 2; - - beginTime: PRTime; - beginTimeReference: u32; - readonly hasBeginTime: boolean; - readonly absoluteBeginTime: PRTime; - endTime: PRTime; - endTimeReference: u32; - readonly hasEndTime: boolean; - readonly absoluteEndTime: PRTime; - searchTerms: string; - readonly hasSearchTerms: boolean; - minVisits: i32; - maxVisits: i32; - setTransitions(transitions: u32[]): void; - getTransitions(): u32[]; - readonly transitionCount: u32; - domainIsHost: boolean; - domain: string; - readonly hasDomain: boolean; - uri: nsIURI; - readonly hasUri: boolean; - tags: nsIVariant; - tagsAreNot: boolean; - getParents(): string[]; - readonly parentCount: u32; - setParents(aGuids: string[]): void; - clone(): nsINavHistoryQuery; -} - -interface nsINavHistoryQueryOptions extends nsISupports { - readonly SORT_BY_NONE: 0; - readonly SORT_BY_TITLE_ASCENDING: 1; - readonly SORT_BY_TITLE_DESCENDING: 2; - readonly SORT_BY_DATE_ASCENDING: 3; - readonly SORT_BY_DATE_DESCENDING: 4; - readonly SORT_BY_URI_ASCENDING: 5; - readonly SORT_BY_URI_DESCENDING: 6; - readonly SORT_BY_VISITCOUNT_ASCENDING: 7; - readonly SORT_BY_VISITCOUNT_DESCENDING: 8; - readonly SORT_BY_DATEADDED_ASCENDING: 11; - readonly SORT_BY_DATEADDED_DESCENDING: 12; - readonly SORT_BY_LASTMODIFIED_ASCENDING: 13; - readonly SORT_BY_LASTMODIFIED_DESCENDING: 14; - readonly SORT_BY_TAGS_ASCENDING: 17; - readonly SORT_BY_TAGS_DESCENDING: 18; - readonly SORT_BY_FRECENCY_ASCENDING: 21; - readonly SORT_BY_FRECENCY_DESCENDING: 22; - readonly RESULTS_AS_URI: 0; - readonly RESULTS_AS_VISIT: 1; - readonly RESULTS_AS_DATE_QUERY: 3; - readonly RESULTS_AS_SITE_QUERY: 4; - readonly RESULTS_AS_DATE_SITE_QUERY: 5; - readonly RESULTS_AS_TAGS_ROOT: 6; - readonly RESULTS_AS_TAG_CONTENTS: 7; - readonly RESULTS_AS_ROOTS_QUERY: 8; - readonly RESULTS_AS_LEFT_PANE_QUERY: 9; - readonly QUERY_TYPE_HISTORY: 0; - readonly QUERY_TYPE_BOOKMARKS: 1; - - sortingMode: u16; - resultType: u16; - excludeItems: boolean; - excludeQueries: boolean; - expandQueries: boolean; - includeHidden: boolean; - maxResults: u32; - queryType: u16; - asyncEnabled: boolean; - clone(): nsINavHistoryQueryOptions; -} - -interface nsINavHistoryService extends nsISupports { - readonly DATABASE_SCHEMA_VERSION: 78; - readonly TRANSITION_LINK: 1; - readonly TRANSITION_TYPED: 2; - readonly TRANSITION_BOOKMARK: 3; - readonly TRANSITION_EMBED: 4; - readonly TRANSITION_REDIRECT_PERMANENT: 5; - readonly TRANSITION_REDIRECT_TEMPORARY: 6; - readonly TRANSITION_DOWNLOAD: 7; - readonly TRANSITION_FRAMED_LINK: 8; - readonly TRANSITION_RELOAD: 9; - readonly DATABASE_STATUS_OK: 0; - readonly DATABASE_STATUS_CREATE: 1; - readonly DATABASE_STATUS_CORRUPT: 2; - readonly DATABASE_STATUS_UPGRADED: 3; - readonly DATABASE_STATUS_LOCKED: 4; - readonly VISIT_SOURCE_ORGANIC: 0; - readonly VISIT_SOURCE_SPONSORED: 1; - readonly VISIT_SOURCE_BOOKMARKED: 2; - readonly VISIT_SOURCE_SEARCHED: 3; - - readonly databaseStatus: u16; - markPageAsFollowedBookmark(aURI: nsIURI): void; - markPageAsTyped(aURI: nsIURI): void; - markPageAsFollowedLink(aURI: nsIURI): void; - canAddURI(aURI: nsIURI): boolean; - getNewQuery(): nsINavHistoryQuery; - getNewQueryOptions(): nsINavHistoryQueryOptions; - executeQuery(aQuery: nsINavHistoryQuery, options: nsINavHistoryQueryOptions): nsINavHistoryResult; - queryStringToQuery(aQueryString: string, aQuery: OutParam, options: OutParam): void; - queryToQueryString(aQuery: nsINavHistoryQuery, options: nsINavHistoryQueryOptions): string; - readonly historyDisabled: boolean; - makeGuid(): string; - hashURL(aSpec: string, aMode?: string): u64; - isFrecencyDecaying: boolean; - shouldStartFrecencyRecalculation: boolean; - readonly DBConnection: mozIStorageConnection; - asyncExecuteLegacyQuery(aQuery: nsINavHistoryQuery, aOptions: nsINavHistoryQueryOptions, aCallback: mozIStorageStatementCallback): mozIStoragePendingStatement; - readonly shutdownClient: nsIAsyncShutdownClient; - readonly connectionShutdownClient: nsIAsyncShutdownClient; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsIPlacesPreviewsHelperService.idl - -interface nsIPlacesPreviewsHelperService extends nsISupports { - getFilePathForURL(aURL: string): string; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsITaggingService.idl - -interface nsITaggingService extends nsISupports { - tagURI(aURI: nsIURI, aTags: nsIVariant, aSource?: u16): void; - untagURI(aURI: nsIURI, aTags: nsIVariant, aSource?: u16): void; - getTagsForURI(aURI: nsIURI): string[]; -} - -// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaArtificialFailure.idl - -} // global - -declare namespace nsIQuotaArtificialFailure { - -enum Category { - CATEGORY_NONE = 0, - CATEGORY_INITIALIZE_ORIGIN = 1, - CATEGORY_OPEN_CLIENT_DIRECTORY = 2, - CATEGORY_CREATE_DIRECTORY_METADATA2 = 4, -} - -} - -declare global { - -interface nsIQuotaArtificialFailure extends nsISupports, Enums { -} - -// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaCallbacks.idl - -type nsIQuotaUsageCallback = Callable<{ - onUsageResult(aRequest: nsIQuotaUsageRequest): void; -}> - -type nsIQuotaCallback = Callable<{ - onComplete(aRequest: nsIQuotaRequest): void; -}> - -// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaManagerService.idl - -interface nsIQuotaManagerService extends nsISupports { - storageName(): nsIQuotaRequest; - storageInitialized(): nsIQuotaRequest; - persistentStorageInitialized(): nsIQuotaRequest; - temporaryStorageInitialized(): nsIQuotaRequest; - temporaryGroupInitialized(aPrincipal: nsIPrincipal): nsIQuotaRequest; - persistentOriginInitialized(aPrincipal: nsIPrincipal): nsIQuotaRequest; - temporaryOriginInitialized(aPersistenceType: string, aPrincipal: nsIPrincipal): nsIQuotaRequest; - init(): nsIQuotaRequest; - initializePersistentStorage(): nsIQuotaRequest; - initTemporaryStorage(): nsIQuotaRequest; - initializeTemporaryGroup(aPrincipal: nsIPrincipal): nsIQuotaRequest; - initializePersistentOrigin(aPrincipal: nsIPrincipal): nsIQuotaRequest; - initializeTemporaryOrigin(aPersistenceType: string, aPrincipal: nsIPrincipal, aCreateIfNonExistent?: boolean): nsIQuotaRequest; - initializePersistentClient(aPrincipal: nsIPrincipal, aClientType: string): nsIQuotaRequest; - initializeTemporaryClient(aPersistenceType: string, aPrincipal: nsIPrincipal, aClientType: string): nsIQuotaRequest; - getFullOriginMetadata(aPersistenceType: string, aPrincipal: nsIPrincipal): nsIQuotaRequest; - getUsage(aCallback: nsIQuotaUsageCallback, aGetAll?: boolean): nsIQuotaUsageRequest; - getUsageForPrincipal(aPrincipal: nsIPrincipal, aCallback: nsIQuotaUsageCallback): nsIQuotaUsageRequest; - getCachedUsageForPrincipal(aPrincipal: nsIPrincipal): nsIQuotaRequest; - listOrigins(): nsIQuotaRequest; - listCachedOrigins(): nsIQuotaRequest; - clear(): nsIQuotaRequest; - clearStoragesForPrivateBrowsing(): nsIQuotaRequest; - clearStoragesForOriginAttributesPattern(aPattern: string): nsIQuotaRequest; - clearStoragesForPrincipal(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; - clearStoragesForClient(aPrincipal: nsIPrincipal, aClientType: string, aPersistenceType?: string): nsIQuotaRequest; - clearStoragesForOriginPrefix(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; - reset(): nsIQuotaRequest; - resetStoragesForPrincipal(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; - resetStoragesForClient(aPrincipal: nsIPrincipal, aClientType: string, aPersistenceType?: string): nsIQuotaRequest; - persisted(aPrincipal: nsIPrincipal): nsIQuotaRequest; - persist(aPrincipal: nsIPrincipal): nsIQuotaRequest; - estimate(aPrincipal: nsIPrincipal): nsIQuotaRequest; -} - -// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaManagerServiceInternal.idl - -interface nsIQuotaManagerServiceInternal extends nsISupports { - setThumbnailPrivateIdentityId(aThumbnailPrivateIdentityId: u32): void; -} - -// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaRequests.idl - -interface nsIQuotaRequestBase extends nsISupports { - readonly principal: nsIPrincipal; - readonly resultCode: nsresult; - readonly resultName: string; -} - -interface nsIQuotaUsageRequest extends nsIQuotaRequestBase { - readonly result: nsIVariant; - callback: nsIQuotaUsageCallback; - cancel(): void; -} - -interface nsIQuotaRequest extends nsIQuotaRequestBase { - readonly result: nsIVariant; - callback: nsIQuotaCallback; -} - -// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaResults.idl - -interface nsIQuotaFullOriginMetadataResult extends nsISupports { - readonly suffix: string; - readonly group: string; - readonly origin: string; - readonly storageOrigin: string; - readonly persistenceType: string; - readonly persisted: boolean; - readonly lastAccessTime: i64; -} - -interface nsIQuotaUsageResult extends nsISupports { - readonly origin: string; - readonly persisted: boolean; - readonly usage: u64; - readonly lastAccessed: u64; -} - -interface nsIQuotaOriginUsageResult extends nsISupports { - readonly databaseUsage: u64; - readonly fileUsage: u64; - readonly usage: u64; - readonly databaseUsageIsExplicit: boolean; - readonly fileUsageIsExplicit: boolean; - readonly totalUsageIsExplicit: boolean; -} - -interface nsIQuotaEstimateResult extends nsISupports { - readonly usage: u64; - readonly limit: u64; -} - -// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaUtilsService.idl - -interface nsIQuotaUtilsService extends nsISupports { - getPrivateIdentityId(aName: string): u32; -} - -// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIProfileMigrator.idl - -interface nsIProfileStartup extends nsISupports { - readonly directory: nsIFile; - doStartup(): void; -} - -interface nsIProfileMigrator extends nsISupports { - migrate(aStartup: nsIProfileStartup, aKey: string, aProfileName?: string): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIProfileUnlocker.idl - -interface nsIProfileUnlocker extends nsISupports { - readonly ATTEMPT_QUIT: 0; - readonly FORCE_QUIT: 1; - - unlock(aSeverity: u32): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIToolkitProfile.idl - -interface nsIProfileLock extends nsISupports { - readonly directory: nsIFile; - readonly localDirectory: nsIFile; - readonly replacedLockTime: PRTime; - unlock(): void; -} - -interface nsIToolkitProfile extends nsISupports { - rootDir: nsIFile; - readonly localDir: nsIFile; - name: string; - storeID: string; - showProfileSelector: boolean; - remove(removeFiles: boolean): void; - removeInBackground(removeFiles: boolean): void; - lock(aUnlocker: OutParam): nsIProfileLock; -} - -// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIToolkitProfileService.idl - -} // global - -declare namespace nsIToolkitProfileService { - -enum downgradeUIFlags { - hasSync = 1, -} - -enum downgradeUIChoice { - quit = 0, - createNewProfile = 1, -} - -enum profileManagerResult { - exit = 0, - launchWithProfile = 1, - restart = 2, -} - -} - -declare global { - -interface nsIToolkitProfileService extends nsISupports, Enums { - readonly isListOutdated: boolean; - startWithLastProfile: boolean; - readonly profiles: nsISimpleEnumerator; - readonly currentProfile: nsIToolkitProfile; - readonly groupProfile: nsIToolkitProfile; - defaultProfile: nsIToolkitProfile; - selectStartupProfile(aArgv: string[], aIsResetting: boolean, aUpdateChannel: string, aLegacyInstallHash: string, aRootDir: OutParam, aLocalDir: OutParam, aProfile: OutParam): boolean; - getProfileByName(aName: string): nsIToolkitProfile; - getProfileByDir(aRootDir: nsIFile, aLocalDir?: nsIFile): nsIToolkitProfile; - createProfile(aRootDir: nsIFile, aName: string): nsIToolkitProfile; - createUniqueProfile(aRootDir: nsIFile, aNamePrefix: string): nsIToolkitProfile; - readonly profileCount: u32; - flush(): void; - asyncFlush(): Promise; - asyncFlushGroupProfile(): Promise; - removeProfileFilesByPath(aRootDir: nsIFile, aLocalDir: nsIFile, aTimeout: u32): Promise; -} - -// https://searchfox.org/mozilla-central/source/tools/profiler/gecko/nsIProfiler.idl - -interface nsIProfilerStartParams extends nsISupports { - readonly entries: u32; - readonly duration: double; - readonly interval: double; - readonly features: u32; - readonly activeTabID: u64; -} - -interface nsIProfiler extends nsISupports { - StartProfiler(aEntries: u32, aInterval: double, aFeatures: string[], aFilters?: string[], aActiveTabID?: u64, aDuration?: double): Promise; - StopProfiler(): Promise; - IsPaused(): boolean; - Pause(): Promise; - Resume(): Promise; - IsSamplingPaused(): boolean; - PauseSampling(): Promise; - ResumeSampling(): Promise; - waitOnePeriodicSampling(): Promise; - GetProfile(aSinceTime?: double): string; - getProfileData(aSinceTime?: double): any; - getProfileDataAsync(aSinceTime?: double): Promise; - getProfileDataAsArrayBuffer(aSinceTime?: double): Promise; - getProfileDataAsGzippedArrayBuffer(aSinceTime?: double): Promise; - dumpProfileToFileAsync(aFilename: string, aSinceTime?: double): Promise; - dumpProfileToFile(aFilename: string): void; - IsActive(): boolean; - ClearAllPages(): void; - GetFeatures(): string[]; - readonly activeConfiguration: any; - GetAllFeatures(): string[]; - GetBufferInfo(aCurrentPosition: OutParam, aTotalSize: OutParam, aGeneration: OutParam): void; - getElapsedTime(): double; - readonly sharedLibraries: any; - getSymbolTable(aDebugPath: string, aBreakpadID: string): Promise; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/file/nsIFileChannel.idl - -interface nsIFileChannel extends nsISupports { - readonly file: nsIFile; -} - -// https://searchfox.org/mozilla-central/source/netwerk/protocol/file/nsIFileProtocolHandler.idl - -interface nsIFileProtocolHandler extends nsIProtocolHandler { - newFileURI(aFile: nsIFile): nsIURI; - newFileURIMutator(file: nsIFile): nsIURIMutator; - getURLSpecFromActualFile(file: nsIFile): string; - getURLSpecFromDir(file: nsIFile): string; - getFileFromURLSpec(url: string): nsIFile; - readURLFile(file: nsIFile): nsIURI; - readShellLink(file: nsIFile): nsIURI; + getCellAt(rowIndex: i32, columnIndex: i32): nsIAccessible; + getCellIndexAt(rowIndex: i32, columnIndex: i32): i32; + getColumnIndexAt(cellIndex: i32): i32; + getRowIndexAt(cellIndex: i32): i32; + getRowAndColumnIndicesAt(cellIndex: i32, rowIndex: OutParam, columnIndex: OutParam): void; + getColumnExtentAt(row: i32, column: i32): i32; + getRowExtentAt(row: i32, column: i32): i32; + getColumnDescription(columnIndex: i32): string; + getRowDescription(rowIndex: i32): string; + isColumnSelected(columnIndex: i32): boolean; + isRowSelected(rowIndex: i32): boolean; + isCellSelected(rowIndex: i32, columnIndex: i32): boolean; + readonly selectedCellCount: u32; + readonly selectedColumnCount: u32; + readonly selectedRowCount: u32; + readonly selectedCells: nsIArray; + getSelectedCellIndices(): u32[]; + getSelectedColumnIndices(): u32[]; + getSelectedRowIndices(): u32[]; + isProbablyForLayout(): boolean; +} + +interface nsIAccessibleTableCell extends nsISupports { + readonly table: nsIAccessibleTable; + readonly columnIndex: i32; + readonly rowIndex: i32; + readonly columnExtent: i32; + readonly rowExtent: i32; + readonly columnHeaderCells: nsIArray; + readonly rowHeaderCells: nsIArray; + isSelected(): boolean; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTableChangeEvent.idl + +interface nsIAccessibleTableChangeEvent extends nsIAccessibleEvent { + readonly rowOrColIndex: i32; + readonly RowsOrColsCount: i32; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleText.idl + +interface nsIAccessibleText extends nsISupports { + readonly TEXT_OFFSET_END_OF_TEXT: -1; + readonly TEXT_OFFSET_CARET: -2; + readonly BOUNDARY_CHAR: 0; + readonly BOUNDARY_WORD_START: 1; + readonly BOUNDARY_WORD_END: 2; + readonly BOUNDARY_SENTENCE_START: 3; + readonly BOUNDARY_SENTENCE_END: 4; + readonly BOUNDARY_LINE_START: 5; + readonly BOUNDARY_LINE_END: 6; + readonly BOUNDARY_PARAGRAPH: 7; + readonly BOUNDARY_CLUSTER: 8; + + caretOffset: i32; + getCaretRect(x: OutParam, y: OutParam, width: OutParam, height: OutParam): void; + readonly characterCount: i32; + readonly selectionCount: i32; + getText(startOffset: i32, endOffset: i32): string; + getTextAfterOffset(offset: i32, boundaryType: AccessibleTextBoundary, startOffset: OutParam, endOffset: OutParam): string; + getTextAtOffset(offset: i32, boundaryType: AccessibleTextBoundary, startOffset: OutParam, endOffset: OutParam): string; + getTextBeforeOffset(offset: i32, boundaryType: AccessibleTextBoundary, startOffset: OutParam, endOffset: OutParam): string; + getCharacterAtOffset(offset: i32): string; + getTextAttributes(includeDefAttrs: boolean, offset: i32, rangeStartOffset: OutParam, rangeEndOffset: OutParam): nsIPersistentProperties; + readonly defaultTextAttributes: nsIPersistentProperties; + getCharacterExtents(offset: i32, x: OutParam, y: OutParam, width: OutParam, height: OutParam, coordType: u32): void; + getRangeExtents(startOffset: i32, endOffset: i32, x: OutParam, y: OutParam, width: OutParam, height: OutParam, coordType: u32): void; + getOffsetAtPoint(x: i32, y: i32, coordType: u32): i32; + getSelectionBounds(selectionNum: i32, startOffset: OutParam, endOffset: OutParam): void; + setSelectionBounds(selectionNum: i32, startOffset: i32, endOffset: i32): void; + addSelection(startOffset: i32, endOffset: i32): void; + removeSelection(selectionNum: i32): void; + scrollSubstringTo(startIndex: i32, endIndex: i32, scrollType: u32): void; + scrollSubstringToPoint(startIndex: i32, endIndex: i32, coordinateType: u32, x: i32, y: i32): void; + readonly selectionRanges: nsIArray; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextChangeEvent.idl + +interface nsIAccessibleTextChangeEvent extends nsIAccessibleEvent { + readonly start: i32; + readonly length: u32; + readonly isInserted: boolean; + readonly modifiedText: string; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextLeafRange.idl + +interface nsIAccessibleTextLeafPoint extends nsISupports { + readonly DIRECTION_NEXT: 0; + readonly DIRECTION_PREVIOUS: 1; + readonly BOUNDARY_FLAG_DEFAULT: 0; + readonly BOUNDARY_FLAG_INCLUDE_ORIGIN: 1; + readonly BOUNDARY_FLAG_STOP_IN_EDITABLE: 2; + readonly BOUNDARY_FLAG_SKIP_LIST_ITEM_MARKER: 4; + + accessible: nsIAccessible; + offset: i32; + findBoundary(aBoundaryType: AccessibleTextBoundary, aDirection: u32, aFlags: u32): nsIAccessibleTextLeafPoint; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextRange.idl + +interface nsIAccessibleTextRange extends nsISupports { + readonly EndPoint_Start: 1; + readonly EndPoint_End: 2; + readonly AlignToTop: 0; + readonly AlignToBottom: 1; + + readonly startContainer: nsIAccessibleText; + readonly startOffset: i32; + readonly endContainer: nsIAccessibleText; + readonly endOffset: i32; + readonly container: nsIAccessible; + compare(aOtherRange: nsIAccessibleTextRange): boolean; + compareEndPoints(aEndPoint: u32, aOtherRange: nsIAccessibleTextRange, aOtherRangeEndPoint: u32): i32; + crop(aContainer: nsIAccessible): boolean; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextSelectionChangeEvent.idl + +interface nsIAccessibleTextSelectionChangeEvent extends nsIAccessibleEvent { + readonly selectionRanges: nsIArray; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTypes.idl + +interface nsIAccessibleScrollType extends nsISupports { + readonly SCROLL_TYPE_TOP_LEFT: 0; + readonly SCROLL_TYPE_BOTTOM_RIGHT: 1; + readonly SCROLL_TYPE_TOP_EDGE: 2; + readonly SCROLL_TYPE_BOTTOM_EDGE: 3; + readonly SCROLL_TYPE_LEFT_EDGE: 4; + readonly SCROLL_TYPE_RIGHT_EDGE: 5; + readonly SCROLL_TYPE_ANYWHERE: 6; +} + +interface nsIAccessibleCoordinateType extends nsISupports { + readonly COORDTYPE_SCREEN_RELATIVE: 0; + readonly COORDTYPE_WINDOW_RELATIVE: 1; + readonly COORDTYPE_PARENT_RELATIVE: 2; +} + +// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleValue.idl + +interface nsIAccessibleValue extends nsISupports { + readonly maximumValue: double; + readonly minimumValue: double; + currentValue: double; + readonly minimumIncrement: double; } // https://searchfox.org/mozilla-central/source/toolkit/components/alerts/nsIAlertsService.idl @@ -4499,643 +846,80 @@ interface nsIAlertsIconURI extends nsISupports { showAlertWithIconURI(aAlert: nsIAlertNotification, aAlertListener?: nsIObserver, aIconURI?: nsIURI): void; } -// https://searchfox.org/mozilla-central/source/dom/bindings/nsIScriptError.idl +// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIAppShellService.idl -interface nsIScriptErrorNote extends nsISupports { - readonly errorMessage: string; - readonly sourceName: string; - readonly sourceId: u32; - readonly lineNumber: u32; - readonly columnNumber: u32; - toString(): string; +interface nsIAppShellService extends nsISupports { + readonly SIZE_TO_CONTENT: -1; + + createTopLevelWindow(aParent: nsIAppWindow, aUrl: nsIURI, aChromeMask: u32, aInitialWidth: i32, aInitialHeight: i32): nsIAppWindow; + createWindowlessBrowser(aIsChrome?: boolean, aChromeMask?: u32): nsIWindowlessBrowser; + readonly hiddenWindow: nsIAppWindow; + readonly hiddenDOMWindow: mozIDOMWindowProxy; + registerTopLevelWindow(aWindow: nsIAppWindow): void; + unregisterTopLevelWindow(aWindow: nsIAppWindow): void; + readonly hasHiddenWindow: boolean; } -interface nsIScriptError extends nsIConsoleMessage { - readonly errorFlag: 0; - readonly warningFlag: 1; - readonly infoFlag: 8; +// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIAppWindow.idl - readonly errorMessage: string; - readonly sourceName: string; - readonly sourceId: u32; - readonly lineNumber: u32; - readonly columnNumber: u32; - readonly flags: u32; - readonly category: string; - readonly outerWindowID: u64; - readonly innerWindowID: u64; - readonly isFromPrivateWindow: boolean; - readonly isFromChromeContext: boolean; - readonly isPromiseRejection: boolean; - exception: any; - readonly hasException: boolean; - stack: any; - errorMessageName: string; - readonly notes: nsIArray; - cssSelectors: string; - init(message: string, sourceName: string, lineNumber: u32, columnNumber: u32, flags: u32, category: string, fromPrivateWindow?: boolean, fromChromeContext?: boolean): void; - initWithWindowID(message: string, sourceName: string, lineNumber: u32, columnNumber: u32, flags: u32, category: string, innerWindowID: u64, fromChromeContext?: boolean): void; - initWithSanitizedSource(message: string, sourceName: string, lineNumber: u32, columnNumber: u32, flags: u32, category: string, innerWindowID: u64, fromChromeContext?: boolean): void; - initWithSourceURI(message: string, sourceURI: nsIURI, lineNumber: u32, columnNumber: u32, flags: u32, category: string, innerWindowID: u64, fromChromeContext?: boolean): void; - initSourceId(sourceId: u32): void; +interface nsIAppWindow extends nsISupports { + readonly docShell: nsIDocShell; + intrinsicallySized: boolean; + readonly primaryContentShell: nsIDocShellTreeItem; + readonly primaryRemoteTab: nsIRemoteTab; + readonly primaryContentBrowsingContext: BrowsingContext; + remoteTabAdded(aTab: nsIRemoteTab, aPrimary: boolean): void; + remoteTabRemoved(aTab: nsIRemoteTab): void; + readonly outerToInnerHeightDifferenceInCSSPixels: u32; + readonly outerToInnerWidthDifferenceInCSSPixels: u32; + center(aRelative: nsIAppWindow, aScreen: boolean, aAlert: boolean): void; + showModal(): void; + lockAspectRatio(aShouldLock: boolean): void; + chromeFlags: u32; + assumeChromeFlagsAreFrozen(): void; + createNewWindow(aChromeFlags: i32, aOpenWindowInfo: nsIOpenWindowInfo): nsIAppWindow; + XULBrowserWindow: nsIXULBrowserWindow; + readonly initialOpenWindowInfo: nsIOpenWindowInfo; + needFastSnaphot(): void; + rollupAllPopups(): void; } -// https://searchfox.org/mozilla-central/source/dom/indexedDB/nsIIDBPermissionsRequest.idl +// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIWindowMediator.idl -interface nsIIDBPermissionsRequest extends nsISupports { - readonly browserElement: Element; - readonly responseObserver: nsIObserver; +interface nsIWindowMediator extends nsISupports { + getEnumerator(aWindowType: string): nsISimpleEnumerator; + getAppWindowEnumerator(aWindowType: string): nsISimpleEnumerator; + getZOrderAppWindowEnumerator(aWindowType: string, aFrontToBack: boolean): nsISimpleEnumerator; + getMostRecentWindow(aWindowType: string): mozIDOMWindowProxy; + getMostRecentBrowserWindow(): mozIDOMWindowProxy; + getMostRecentNonPBWindow(aWindowType: string): mozIDOMWindowProxy; + getOuterWindowWithId(aOuterWindowID: u64): mozIDOMWindowProxy; + getCurrentInnerWindowWithId(aInnerWindowID: u64): mozIDOMWindow; + addListener(aListener: nsIWindowMediatorListener): void; + removeListener(aListener: nsIWindowMediatorListener): void; } -// https://searchfox.org/mozilla-central/source/dom/indexedDB/nsIIndexedDatabaseManager.idl +// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIWindowMediatorListener.idl -interface nsIIndexedDatabaseManager extends nsISupports { - doMaintenance(): Promise; +interface nsIWindowMediatorListener extends nsISupports { + onOpenWindow(window: nsIAppWindow): void; + onCloseWindow(window: nsIAppWindow): void; } -// https://searchfox.org/mozilla-central/source/netwerk/protocol/res/nsIResProtocolHandler.idl +// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIWindowlessBrowser.idl -interface nsIResProtocolHandler extends nsISubstitutingProtocolHandler { - allowContentToAccess(url: nsIURI): boolean; +interface nsIWindowlessBrowser extends nsIWebNavigation { + close(): void; + readonly docShell: nsIDocShell; + readonly browsingContext: BrowsingContext; } -// https://searchfox.org/mozilla-central/source/netwerk/protocol/res/nsISubstitutingProtocolHandler.idl +// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIXULBrowserWindow.idl -interface nsISubstitutingProtocolHandler extends nsIProtocolHandler { - readonly ALLOW_CONTENT_ACCESS: 1; - readonly RESOLVE_JAR_URI: 2; - - setSubstitution(root: string, baseURI: nsIURI): void; - setSubstitutionWithFlags(root: string, baseURI: nsIURI, flags: u32): void; - getSubstitution(root: string): nsIURI; - hasSubstitution(root: string): boolean; - resolveURI(resURI: nsIURI): string; -} - -// https://searchfox.org/mozilla-central/source/gfx/src/nsIFontEnumerator.idl - -interface nsIFontEnumerator extends nsISupports { - EnumerateAllFonts(): string[]; - EnumerateFonts(aLangGroup: string, aGeneric: string): string[]; - EnumerateAllFontsAsync(): any; - EnumerateFontsAsync(aLangGroup: string, aGeneric: string): any; - HaveFontFor(aLangGroup: string): OutParam; - getDefaultFont(aLangGroup: string, aGeneric: string): string; - getStandardFamilyName(aName: string): string; -} - -// https://searchfox.org/mozilla-central/source/gfx/thebes/nsIFontLoadCompleteCallback.idl - -// https://searchfox.org/mozilla-central/source/dom/power/nsIDOMWakeLockListener.idl - -type nsIDOMMozWakeLockListener = Callable<{ - callback(aTopic: string, aState: string): void; -}> - -// https://searchfox.org/mozilla-central/source/dom/power/nsIPowerManagerService.idl - -interface nsIPowerManagerService extends nsISupports { - addWakeLockListener(aListener: nsIDOMMozWakeLockListener): void; - removeWakeLockListener(aListener: nsIDOMMozWakeLockListener): void; - getWakeLockState(aTopic: string): string; - newWakeLock(aTopic: string, aWindow?: mozIDOMWindow): nsIWakeLock; -} - -// https://searchfox.org/mozilla-central/source/dom/power/nsIWakeLock.idl - -interface nsIWakeLock extends nsISupports { - unlock(): void; -} - -// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIMacShellService.idl - -interface nsIMacShellService extends nsIShellService { - showDesktopPreferences(): void; - showSecurityPreferences(aPaneID: string): void; - getAvailableApplicationsForProtocol(protocol: string): string[][]; -} - -// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIShellService.idl - -interface nsIShellService extends nsISupports { - readonly BACKGROUND_TILE: 1; - readonly BACKGROUND_STRETCH: 2; - readonly BACKGROUND_CENTER: 3; - readonly BACKGROUND_FILL: 4; - readonly BACKGROUND_FIT: 5; - readonly BACKGROUND_SPAN: 6; - - isDefaultBrowser(aForAllTypes?: boolean): boolean; - setDefaultBrowser(aForAllUsers: boolean): void; - setDesktopBackground(aElement: Element, aPosition: i32, aImageName: string): void; - desktopBackgroundColor: u32; -} - -// https://searchfox.org/mozilla-central/source/dom/webbrowserpersist/nsIWebBrowserPersist.idl - -interface nsIWebBrowserPersist extends nsICancelable { - readonly PERSIST_FLAGS_NONE: 0; - readonly PERSIST_FLAGS_FROM_CACHE: 1; - readonly PERSIST_FLAGS_BYPASS_CACHE: 2; - readonly PERSIST_FLAGS_IGNORE_REDIRECTED_DATA: 4; - readonly PERSIST_FLAGS_IGNORE_IFRAMES: 8; - readonly PERSIST_FLAGS_NO_CONVERSION: 16; - readonly PERSIST_FLAGS_REPLACE_EXISTING_FILES: 32; - readonly PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS: 64; - readonly PERSIST_FLAGS_FIXUP_ORIGINAL_DOM: 128; - readonly PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION: 256; - readonly PERSIST_FLAGS_DONT_FIXUP_LINKS: 512; - readonly PERSIST_FLAGS_SERIALIZE_OUTPUT: 1024; - readonly PERSIST_FLAGS_DONT_CHANGE_FILENAMES: 2048; - readonly PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS: 4096; - readonly PERSIST_FLAGS_CLEANUP_ON_FAILURE: 8192; - readonly PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION: 16384; - readonly PERSIST_FLAGS_APPEND_TO_FILE: 32768; - readonly PERSIST_STATE_READY: 1; - readonly PERSIST_STATE_SAVING: 2; - readonly PERSIST_STATE_FINISHED: 3; - readonly ENCODE_FLAGS_SELECTION_ONLY: 1; - readonly ENCODE_FLAGS_FORMATTED: 2; - readonly ENCODE_FLAGS_RAW: 4; - readonly ENCODE_FLAGS_BODY_ONLY: 8; - readonly ENCODE_FLAGS_PREFORMATTED: 16; - readonly ENCODE_FLAGS_WRAP: 32; - readonly ENCODE_FLAGS_FORMAT_FLOWED: 64; - readonly ENCODE_FLAGS_ABSOLUTE_LINKS: 128; - readonly ENCODE_FLAGS_CR_LINEBREAKS: 512; - readonly ENCODE_FLAGS_LF_LINEBREAKS: 1024; - readonly ENCODE_FLAGS_NOSCRIPT_CONTENT: 2048; - readonly ENCODE_FLAGS_NOFRAMES_CONTENT: 4096; - readonly ENCODE_FLAGS_ENCODE_BASIC_ENTITIES: 8192; - - persistFlags: u32; - readonly currentState: u32; - readonly result: nsresult; - progressListener: nsIWebProgressListener; - saveURI(aURI: nsIURI, aTriggeringPrincipal: nsIPrincipal, aCacheKey: u32, aReferrerInfo: nsIReferrerInfo, aCookieJarSettings: nsICookieJarSettings, aPostData: nsIInputStream, aExtraHeaders: string, aFile: nsISupports, aContentPolicyType: nsContentPolicyType, aIsPrivate: boolean): void; - saveChannel(aChannel: nsIChannel, aFile: nsISupports): void; - saveDocument(aDocument: nsISupports, aFile: nsISupports, aDataPath: nsISupports, aOutputContentType: string, aEncodingFlags: u32, aWrapColumn: u32): void; - cancelSave(): void; -} - -// https://searchfox.org/mozilla-central/source/dom/webbrowserpersist/nsIWebBrowserPersistDocument.idl - -interface nsIWebBrowserPersistURIMap extends nsISupports { - readonly numMappedURIs: u32; - getURIMapping(aIndex: u32, aMapFrom: OutParam, aMapTo: OutParam): void; - readonly targetBaseURI: string; -} - -interface nsIWebBrowserPersistDocument extends nsISupports { - readonly isClosed: boolean; - readonly isPrivate: boolean; - readonly documentURI: string; - readonly baseURI: string; - readonly contentType: string; - readonly characterSet: string; - readonly title: string; - readonly referrerInfo: nsIReferrerInfo; - readonly cookieJarSettings: nsICookieJarSettings; - readonly contentDisposition: string; - readonly postData: nsIInputStream; - readonly principal: nsIPrincipal; - readonly cacheKey: u32; - persistFlags: u32; - readResources(aVisitor: nsIWebBrowserPersistResourceVisitor): void; - writeContent(aStream: nsIOutputStream, aURIMap: nsIWebBrowserPersistURIMap, aRequestedContentType: string, aEncoderFlags: u32, aWrapColumn: u32, aCompletion: nsIWebBrowserPersistWriteCompletion): void; -} - -interface nsIWebBrowserPersistResourceVisitor extends nsISupports { - visitResource(aDocument: nsIWebBrowserPersistDocument, aURI: string, aContentPolicyType: nsContentPolicyType): void; - visitDocument(aDocument: nsIWebBrowserPersistDocument, aSubDocument: nsIWebBrowserPersistDocument): void; - visitBrowsingContext(aDocument: nsIWebBrowserPersistDocument, aContext: BrowsingContext): void; - endVisit(aDocument: nsIWebBrowserPersistDocument, aStatus: nsresult): void; -} - -type nsIWebBrowserPersistWriteCompletion = Callable<{ - onFinish(aDocument: nsIWebBrowserPersistDocument, aStream: nsIOutputStream, aContentType: string, aStatus: nsresult): void; -}> - -interface nsIWebBrowserPersistDocumentReceiver extends nsISupports { - onDocumentReady(aDocument: nsIWebBrowserPersistDocument): void; - onError(aFailure: nsresult): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIChannelClassifierService.idl - -interface nsIUrlClassifierBlockedChannel extends nsISupports { - readonly TRACKING_PROTECTION: 0; - readonly SOCIAL_TRACKING_PROTECTION: 1; - readonly FINGERPRINTING_PROTECTION: 2; - readonly CRYPTOMINING_PROTECTION: 3; - - readonly reason: u8; - readonly tables: string; - readonly url: string; - readonly tabId: u64; - readonly channelId: u64; - readonly isPrivateBrowsing: boolean; - readonly topLevelUrl: string; - replace(): void; - allow(): void; -} - -interface nsIChannelClassifierService extends nsISupports { - addListener(aObserver: nsIObserver): void; - removeListener(aObserver: nsIObserver): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIURIClassifier.idl - -type nsIURIClassifierCallback = Callable<{ - onClassifyComplete(aErrorCode: nsresult, aList: string, aProvider: string, aFullHash: string): void; -}> - -interface nsIURIClassifier extends nsISupports { - classify(aPrincipal: nsIPrincipal, aCallback: nsIURIClassifierCallback): boolean; - asyncClassifyLocalWithFeatures(aURI: nsIURI, aFeatures: nsIUrlClassifierFeature[], aListType: nsIUrlClassifierFeature.listType, aCallback: nsIUrlClassifierFeatureCallback): void; - getFeatureByName(aFeatureName: string): nsIUrlClassifierFeature; - getFeatureNames(): string[]; - createFeatureWithTables(aName: string, aBlocklistTables: string[], aEntitylistTables: string[]): nsIUrlClassifierFeature; - sendThreatHitReport(aChannel: nsIChannel, aProvider: string, aList: string, aFullHash: string): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIUrlClassifierExceptionListService.idl - -type nsIUrlClassifierExceptionListObserver = Callable<{ - onExceptionListUpdate(aList: string): void; -}> - -interface nsIUrlClassifierExceptionListService extends nsISupports { - registerAndRunExceptionListObserver(aFeature: string, aPrefName: string, aObserver: nsIUrlClassifierExceptionListObserver): void; - unregisterExceptionListObserver(aFeature: string, aObserver: nsIUrlClassifierExceptionListObserver): void; - clear(): void; -} - -// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIUrlClassifierFeature.idl - -} // global - -declare namespace nsIUrlClassifierFeature { - -enum listType { - blocklist = 0, - entitylist = 1, -} - -enum URIType { - blocklistURI = 0, - entitylistURI = 1, - pairwiseEntitylistURI = 2, -} - -} - -declare global { - -interface nsIUrlClassifierFeature extends nsISupports, Enums { - readonly name: string; - readonly exceptionHostList: string; -} - -interface nsIUrlClassifierFeatureResult extends nsISupports { - readonly uri: nsIURI; - readonly feature: nsIUrlClassifierFeature; - readonly list: string; -} - -type nsIUrlClassifierFeatureCallback = Callable<{ - onClassifyComplete(aResults: nsIUrlClassifierFeatureResult[]): void; -}> - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/IUrlClassifierUITelemetry.idl - -interface IUrlClassifierUITelemetry extends nsISupports { - readonly WARNING_MALWARE_PAGE_TOP: 1; - readonly WARNING_MALWARE_PAGE_TOP_WHY_BLOCKED: 2; - readonly WARNING_MALWARE_PAGE_TOP_GET_ME_OUT_OF_HERE: 3; - readonly WARNING_MALWARE_PAGE_TOP_IGNORE_WARNING: 4; - readonly WARNING_MALWARE_PAGE_FRAME: 5; - readonly WARNING_MALWARE_PAGE_FRAME_WHY_BLOCKED: 6; - readonly WARNING_MALWARE_PAGE_FRAME_GET_ME_OUT_OF_HERE: 7; - readonly WARNING_MALWARE_PAGE_FRAME_IGNORE_WARNING: 8; - readonly WARNING_PHISHING_PAGE_TOP: 9; - readonly WARNING_PHISHING_PAGE_TOP_WHY_BLOCKED: 10; - readonly WARNING_PHISHING_PAGE_TOP_GET_ME_OUT_OF_HERE: 11; - readonly WARNING_PHISHING_PAGE_TOP_IGNORE_WARNING: 12; - readonly WARNING_PHISHING_PAGE_FRAME: 13; - readonly WARNING_PHISHING_PAGE_FRAME_WHY_BLOCKED: 14; - readonly WARNING_PHISHING_PAGE_FRAME_GET_ME_OUT_OF_HERE: 15; - readonly WARNING_PHISHING_PAGE_FRAME_IGNORE_WARNING: 16; - readonly WARNING_UNWANTED_PAGE_TOP: 17; - readonly WARNING_UNWANTED_PAGE_TOP_WHY_BLOCKED: 18; - readonly WARNING_UNWANTED_PAGE_TOP_GET_ME_OUT_OF_HERE: 19; - readonly WARNING_UNWANTED_PAGE_TOP_IGNORE_WARNING: 20; - readonly WARNING_UNWANTED_PAGE_FRAME: 21; - readonly WARNING_UNWANTED_PAGE_FRAME_WHY_BLOCKED: 22; - readonly WARNING_UNWANTED_PAGE_FRAME_GET_ME_OUT_OF_HERE: 23; - readonly WARNING_UNWANTED_PAGE_FRAME_IGNORE_WARNING: 24; - readonly WARNING_HARMFUL_PAGE_TOP: 25; - readonly WARNING_HARMFUL_PAGE_TOP_WHY_BLOCKED: 26; - readonly WARNING_HARMFUL_PAGE_TOP_GET_ME_OUT_OF_HERE: 27; - readonly WARNING_HARMFUL_PAGE_TOP_IGNORE_WARNING: 28; - readonly WARNING_HARMFUL_PAGE_FRAME: 29; - readonly WARNING_HARMFUL_PAGE_FRAME_WHY_BLOCKED: 30; - readonly WARNING_HARMFUL_PAGE_FRAME_GET_ME_OUT_OF_HERE: 31; - readonly WARNING_HARMFUL_PAGE_FRAME_IGNORE_WARNING: 32; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierDBService.idl - -type nsIUrlClassifierCallback = Callable<{ - handleEvent(value: string): void; -}> - -interface nsIUrlClassifierUpdateObserver extends nsISupports { - updateUrlRequested(url: string, table: string): void; - streamFinished(status: nsresult, delay: u32): void; - updateError(error: nsresult): void; - updateSuccess(requestedTimeout: u32): void; -} - -interface nsIUrlClassifierDBService extends nsISupports { - lookup(principal: nsIPrincipal, tables: string, c: nsIUrlClassifierCallback): void; - getTables(c: nsIUrlClassifierCallback): void; - setHashCompleter(tableName: string, completer: nsIUrlClassifierHashCompleter): void; - clearLastResults(): void; - beginUpdate(updater: nsIUrlClassifierUpdateObserver, tables: string): void; - beginStream(table: string): void; - updateStream(updateChunk: string): void; - finishStream(): void; - finishUpdate(): void; - cancelUpdate(): void; - resetDatabase(): void; - reloadDatabase(): void; - clearCache(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierHashCompleter.idl - -interface nsIFullHashMatch extends nsISupports { - readonly tableName: string; - readonly fullHash: string; - readonly cacheDuration: u32; -} - -interface nsIUrlClassifierHashCompleterCallback extends nsISupports { - completionV2(hash: string, table: string, chunkId: u32): void; - completionV4(partialHash: string, table: string, negativeCacheDuration: u32, fullHashes: nsIArray): void; - completionFinished(status: nsresult): void; -} - -interface nsIUrlClassifierHashCompleter extends nsISupports { - complete(partialHash: string, gethashUrl: string, tableName: string, callback: nsIUrlClassifierHashCompleterCallback): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierInfo.idl - -interface nsIUrlClassifierPositiveCacheEntry extends nsISupports { - readonly fullhash: string; - readonly expiry: i64; -} - -interface nsIUrlClassifierCacheEntry extends nsISupports { - readonly prefix: string; - readonly expiry: i64; - readonly matches: nsIArray; -} - -interface nsIUrlClassifierCacheInfo extends nsISupports { - readonly table: string; - readonly entries: nsIArray; -} - -type nsIUrlClassifierGetCacheCallback = Callable<{ - onGetCacheComplete(info: nsIUrlClassifierCacheInfo): void; -}> - -interface nsIUrlClassifierInfo extends nsISupports { - getCacheInfo(table: string, callback: nsIUrlClassifierGetCacheCallback): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierPrefixSet.idl - -interface nsIUrlClassifierPrefixSet extends nsISupports { - init(aName: string): void; - setPrefixes(aPrefixes: u32[], aLength: u32): void; - getPrefixes(aCount: OutParam): OutParam; - contains(aPrefix: u32): boolean; - isEmpty(): boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierRemoteSettingsService.idl - -interface nsIUrlClassifierRemoteSettingsService extends nsISupports { - fetchList(aPayload: string, aListener: nsIStreamListener): void; - clear(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierStreamUpdater.idl - -interface nsIUrlClassifierStreamUpdater extends nsISupports { - downloadUpdates(aRequestTables: string, aRequestPayload: string, aIsPostRequest: boolean, aUpdateUrl: string, aSuccessCallback: nsIUrlClassifierCallback, aUpdateErrorCallback: nsIUrlClassifierCallback, aDownloadErrorCallback: nsIUrlClassifierCallback): boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierUtils.idl - -interface nsIUrlClassifierParseFindFullHashCallback extends nsISupports { - onCompleteHashFound(aCompleteHash: string, aTableNames: string, aPerHashCacheDuration: u32): void; - onResponseParsed(aMinWaitDuration: u32, aNegCacheDuration: u32): void; -} - -interface nsIUrlClassifierUtils extends nsISupports { - getKeyForURI(uri: nsIURI): string; - getProvider(tableName: string): string; - getTelemetryProvider(tableName: string): string; - getProtocolVersion(provider: string): string; - convertThreatTypeToListNames(threatType: u32): string; - convertListNameToThreatType(listName: string): u32; - makeUpdateRequestV4(aListNames: string[], aStatesBase64: string[]): string; - makeFindFullHashRequestV4(aListNames: string[], aListStatesBase64: string[], aPrefixes: string[]): string; - makeThreatHitReport(aChannel: nsIChannel, aListName: string, aHashBase64: string): string; - parseFindFullHashResponseV4(aResponse: string, aCallback: nsIUrlClassifierParseFindFullHashCallback): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlListManager.idl - -interface nsIUrlListManager extends nsISupports { - getGethashUrl(tableName: string): string; - getUpdateUrl(tableName: string): string; - registerTable(tableName: string, providerName: string, updateUrl: string, gethashUrl: string): boolean; - unregisterTable(tableName: string): void; - enableUpdate(tableName: string): void; - disableAllUpdates(): void; - disableUpdate(tableName: string): void; - maybeToggleUpdateChecking(): void; - checkForUpdates(updateUrl: string): boolean; - forceUpdates(tableNames: string): boolean; - getBackOffTime(provider: string): u64; - isRegistered(): boolean; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_attributes.idl - -interface nsIXPCTestObjectReadOnly extends nsISupports { - readonly strReadOnly: string; - readonly boolReadOnly: boolean; - readonly shortReadOnly: i16; - readonly longReadOnly: i32; - readonly floatReadOnly: float; - readonly charReadOnly: string; - readonly timeReadOnly: PRTime; -} - -interface nsIXPCTestObjectReadWrite extends nsISupports { - stringProperty: string; - booleanProperty: boolean; - shortProperty: i16; - longProperty: i32; - floatProperty: float; - charProperty: string; - timeProperty: PRTime; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_bug809674.idl - -interface nsIXPCTestBug809674 extends nsISupports { - addArgs(x: u32, y: u32): u32; - addSubMulArgs(x: u32, y: u32, subOut: OutParam, mulOut: OutParam): u32; - addVals(x: any, y: any): any; - methodNoArgs(): u32; - methodNoArgsNoRetVal(): void; - addMany(x1: u32, x2: u32, x3: u32, x4: u32, x5: u32, x6: u32, x7: u32, x8: u32): u32; - valProperty: any; - uintProperty: u32; - methodWithOptionalArgc(): void; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_cenums.idl - -} // global - -declare namespace nsIXPCTestCEnums { - -enum testFlagsExplicit { - shouldBe1Explicit = 1, - shouldBe2Explicit = 2, - shouldBe4Explicit = 4, - shouldBe8Explicit = 8, - shouldBe12Explicit = 12, -} - -enum testFlagsImplicit { - shouldBe0Implicit = 0, - shouldBe1Implicit = 1, - shouldBe2Implicit = 2, - shouldBe3Implicit = 3, - shouldBe5Implicit = 5, - shouldBe6Implicit = 6, - shouldBe2AgainImplicit = 2, - shouldBe3AgainImplicit = 3, -} - -} - -declare global { - -interface nsIXPCTestCEnums extends nsISupports, Enums { - readonly testConst: 1; - - testCEnumInput(abc: nsIXPCTestCEnums.testFlagsExplicit): void; - testCEnumOutput(): nsIXPCTestCEnums.testFlagsExplicit; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_interfaces.idl - -interface nsIXPCTestInterfaceA extends nsISupports { - name: string; -} - -interface nsIXPCTestInterfaceB extends nsISupports { - name: string; -} - -interface nsIXPCTestInterfaceC extends nsISupports { - someInteger: i32; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_params.idl - -interface nsIXPCTestParams extends nsISupports { - testBoolean(a: boolean, b: InOutParam): boolean; - testOctet(a: u8, b: InOutParam): u8; - testShort(a: i16, b: InOutParam): i16; - testLong(a: i32, b: InOutParam): i32; - testLongLong(a: i64, b: InOutParam): i64; - testUnsignedShort(a: u16, b: InOutParam): u16; - testUnsignedLong(a: u32, b: InOutParam): u32; - testUnsignedLongLong(a: u64, b: InOutParam): u64; - testFloat(a: float, b: InOutParam): float; - testDouble(a: double, b: InOutParam): double; - testChar(a: string, b: InOutParam): string; - testString(a: string, b: InOutParam): string; - testWchar(a: string, b: InOutParam): string; - testWstring(a: string, b: InOutParam): string; - testAString(a: string, b: InOutParam): string; - testAUTF8String(a: string, b: InOutParam): string; - testACString(a: string, b: InOutParam): string; - testJsval(a: any, b: InOutParam): any; - testShortSequence(a: i16[], b: InOutParam): i16[]; - testDoubleSequence(a: double[], b: InOutParam): double[]; - testInterfaceSequence(a: nsIXPCTestInterfaceA[], b: InOutParam): nsIXPCTestInterfaceA[]; - testAStringSequence(a: string[], b: InOutParam): string[]; - testACStringSequence(a: string[], b: InOutParam): string[]; - testJsvalSequence(a: any[], b: InOutParam): any[]; - testSequenceSequence(a: i16[][], b: InOutParam): i16[][]; - testOptionalSequence(arr?: u8[]): u8[]; - testShortArray(aLength: u32, a: i16[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testDoubleArray(aLength: u32, a: double[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testStringArray(aLength: u32, a: string[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testWstringArray(aLength: u32, a: string[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testInterfaceArray(aLength: u32, a: nsIXPCTestInterfaceA[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testByteArrayOptionalLength(a: u8[], aLength?: u32): u32; - testSizedString(aLength: u32, a: string, bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testSizedWstring(aLength: u32, a: string, bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testJsvalArray(aLength: u32, a: any[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; - testOutAString(o: OutParam): void; - testStringArrayOptionalSize(a: string[], aLength?: u32): string; - testOmittedOptionalOut(aJSObj: nsIXPCTestParams, aOut?: OutParam): void; - readonly testNaN: double; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_returncode.idl - -interface nsIXPCTestReturnCodeParent extends nsISupports { - callChild(childBehavior: i32): nsresult; -} - -interface nsIXPCTestReturnCodeChild extends nsISupports { - readonly CHILD_SHOULD_THROW: 0; - readonly CHILD_SHOULD_RETURN_SUCCESS: 1; - readonly CHILD_SHOULD_RETURN_RESULTCODE: 2; - readonly CHILD_SHOULD_NEST_RESULTCODES: 3; - - doIt(behavior: i32): void; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_utils.idl - -type nsIXPCTestFunctionInterface = Callable<{ - echo(arg: string): string; -}> - -interface nsIXPCTestUtils extends nsISupports { - doubleWrapFunction(f: nsIXPCTestFunctionInterface): nsIXPCTestFunctionInterface; -} - -interface nsIXPCTestTypeScript extends nsISupports { - exposedProp: i32; - exposedMethod(arg: i32): void; +interface nsIXULBrowserWindow extends nsISupports { + setOverLink(link: string): void; + showTooltip(x: i32, y: i32, tooltip: string, direction: string, browser: Element): void; + hideTooltip(): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/startup/public/nsIAppStartup.idl @@ -5188,126 +972,937 @@ interface nsIAppStartup extends nsISupports, Enums; - addLogin(aLogin: nsILoginInfo): nsILoginInfo; - addLoginAsync(aLogin: nsILoginInfo): Promise; - addLogins(aLogins: any): Promise; - removeLogin(aLogin: nsILoginInfo): void; - modifyLogin(oldLogin: nsILoginInfo, newLoginData: nsISupports): void; - recordPasswordUse(aLogin: nsILoginInfo, aPrivateContextWithoutExplicitConsent: boolean, aLoginType: string, aFilled: boolean): void; - removeAllUserFacingLogins(): void; - removeAllLogins(): void; - getAllLogins(): Promise; - getAllLoginsWithCallback(aCallback: nsILoginSearchCallback): void; - getAllDisabledHosts(): string[]; - getLoginSavingEnabled(aHost: string): boolean; - setLoginSavingEnabled(aHost: string, isEnabled: boolean): void; - findLogins(aOrigin: string, aActionOrigin: string, aHttpRealm: string): nsILoginInfo[]; - countLogins(aOrigin: string, aActionOrigin: string, aHttpRealm: string): u32; - searchLoginsAsync(matchData: any): Promise; - searchLogins(matchData: nsIPropertyBag): nsILoginInfo[]; - getSyncID(): Promise; - setSyncID(syncID: string): Promise; - getLastSync(): Promise; - setLastSync(timestamp: double): Promise; - ensureCurrentSyncID(newSyncID: string): Promise; - readonly uiBusy: boolean; - readonly isLoggedIn: boolean; +// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompletePopup.idl + +interface nsIAutoCompletePopup extends nsISupports { + readonly INVALIDATE_REASON_NEW_RESULT: 0; + readonly INVALIDATE_REASON_DELETE: 1; + + readonly input: nsIAutoCompleteInput; + readonly overrideValue: string; + selectedIndex: i32; + readonly popupOpen: boolean; + getNoRollupOnEmptySearch(element: Element): boolean; + openAutocompletePopup(input: nsIAutoCompleteInput, element: Element): void; + closePopup(): void; + invalidate(reason: u16): void; + selectBy(reverse: boolean, page: boolean): void; + startSearch(searchString: string, element: Element, listener: nsIFormFillCompleteObserver): void; + stopSearch(): void; + selectEntry(): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginManagerAuthPrompter.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteResult.idl -interface nsILoginManagerAuthPrompter extends nsISupports { - init(aWindow: nsIDOMWindow): void; - browser: Element; +interface nsIAutoCompleteResult extends nsISupports { + readonly RESULT_IGNORED: 1; + readonly RESULT_FAILURE: 2; + readonly RESULT_NOMATCH: 3; + readonly RESULT_SUCCESS: 4; + readonly RESULT_NOMATCH_ONGOING: 5; + readonly RESULT_SUCCESS_ONGOING: 6; + + readonly searchString: string; + readonly searchResult: u16; + readonly defaultIndex: i32; + readonly errorDescription: string; + readonly matchCount: u32; + getValueAt(index: i32): string; + getLabelAt(index: i32): string; + getCommentAt(index: i32): string; + getStyleAt(index: i32): string; + getImageAt(index: i32): string; + getFinalCompleteValueAt(index: i32): string; + isRemovableAt(rowIndex: i32): boolean; + removeValueAt(rowIndex: i32): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginManagerCrypto.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteSearch.idl -interface nsILoginManagerCrypto extends nsISupports { - readonly ENCTYPE_BASE64: 0; - readonly ENCTYPE_SDR: 1; - - encrypt(plainText: string): string; - encryptMany(plainTexts: any): Promise; - decrypt(cipherText: string): string; - decryptMany(cipherTexts: any): Promise; - readonly uiBusy: boolean; - readonly isLoggedIn: boolean; - readonly defaultEncType: u32; +interface nsIAutoCompleteSearch extends nsISupports { + startSearch(searchString: string, searchParam: string, previousResult: nsIAutoCompleteResult, listener: nsIAutoCompleteObserver): void; + stopSearch(): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginManagerPrompter.idl - -interface nsILoginManagerPrompter extends nsISupports { - promptToSavePassword(aBrowser: Element, aLogin: nsILoginInfo, dismissed?: boolean, notifySaved?: boolean, autoFilledLoginGuid?: string, possibleValues?: any): nsIPromptInstance; - promptToChangePassword(aBrowser: Element, aOldLogin: nsILoginInfo, aNewLogin: nsILoginInfo, dismissed?: boolean, notifySaved?: boolean, autoSavedLoginGuid?: string, autoFilledLoginGuid?: string, possibleValues?: any): nsIPromptInstance; - promptToChangePasswordWithUsernames(aBrowser: Element, logins: nsILoginInfo[], aNewLogin: nsILoginInfo): nsIPromptInstance; +interface nsIAutoCompleteObserver extends nsISupports { + onSearchResult(search: nsIAutoCompleteSearch, result: nsIAutoCompleteResult): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginMetaInfo.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteSimpleResult.idl -interface nsILoginMetaInfo extends nsISupports { - guid: string; - timeCreated: u64; - timeLastUsed: u64; - timePasswordChanged: u64; - timesUsed: u32; +interface nsIAutoCompleteSimpleResult extends nsIAutoCompleteResult { + setSearchString(aSearchString: string): void; + setErrorDescription(aErrorDescription: string): void; + setDefaultIndex(aDefaultIndex: i32): void; + setSearchResult(aSearchResult: u16): void; + insertMatchAt(aIndex: i32, aValue: string, aComment: string, aImage?: string, aStyle?: string, aFinalCompleteValue?: string, aLabel?: string): void; + appendMatch(aValue: string, aComment: string, aImage?: string, aStyle?: string, aFinalCompleteValue?: string, aLabel?: string): void; + removeMatchAt(aIndex: i32): void; + getListener(): nsIAutoCompleteSimpleResultListener; + setListener(aListener: nsIAutoCompleteSimpleResultListener): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsIPromptInstance.idl - -interface nsIPromptInstance extends nsISupports { - dismiss(): void; +interface nsIAutoCompleteSimpleResultListener extends nsISupports { + onValueRemoved(aResult: nsIAutoCompleteSimpleResult, aValue: string): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/enterprisepolicies/nsIEnterprisePolicies.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteSimpleSearch.idl -interface nsIEnterprisePolicies extends nsISupports { - readonly UNINITIALIZED: -1; - readonly INACTIVE: 0; - readonly ACTIVE: 1; - readonly FAILED: 2; +interface nsIAutoCompleteSimpleSearch extends nsIAutoCompleteSearch { + overrideNextResult(values: nsIAutoCompleteResult): void; +} - readonly status: i16; - readonly isEnterprise: boolean; - isAllowed(feature: string): boolean; - getActivePolicies(): any; - getSupportMenu(): any; - getExtensionPolicy(extensionID: string): any; - getExtensionSettings(extensionID: string): any; - mayInstallAddon(addon: any): boolean; - allowedInstallSource(uri: nsIURI): boolean; - isExemptExecutableExtension(url: string, extension: string): boolean; +// https://searchfox.org/mozilla-central/source/dom/media/autoplay/nsIAutoplay.idl + +interface nsIAutoplay extends nsISupports { + readonly ALLOWED: 0; + readonly BLOCKED: 1; + readonly BLOCKED_ALL: 5; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundhangmonitor/nsIHangDetails.idl + +interface nsIHangDetails extends nsISupports { + readonly wasPersisted: boolean; + readonly duration: double; + readonly thread: string; + readonly runnableName: string; + readonly process: string; + readonly remoteType: string; + readonly stack: any; + readonly modules: any; + readonly annotations: any; +} + +// https://searchfox.org/mozilla-central/source/browser/components/newtab/nsIAboutNewTabService.idl + +interface nsIAboutNewTabService extends nsISupports { + readonly defaultURL: string; + aboutHomeChannel(aURI: nsIURI, aLoadInfo: nsILoadInfo): nsIChannel; + readonly welcomeURL: string; +} + +// https://searchfox.org/mozilla-central/source/browser/components/nsIBrowserHandler.idl + +interface nsIBrowserHandler extends nsISupports { + startPage: string; + defaultArgs: string; + getFirstWindowArgs(): string; + kiosk: boolean; + majorUpgrade: boolean; + firstRunProfile: boolean; + getFeatures(aCmdLine: nsICommandLine): string; +} + +// https://searchfox.org/mozilla-central/source/caps/nsIAddonPolicyService.idl + +interface nsIAddonPolicyService extends nsISupports { + readonly defaultCSP: string; + readonly defaultCSPV3: string; + getBaseCSP(aAddonId: string): string; + getExtensionPageCSP(aAddonId: string): string; + getGeneratedBackgroundPageUrl(aAddonId: string): string; + addonHasPermission(aAddonId: string, aPerm: string): boolean; + addonMayLoadURI(aAddonId: string, aURI: nsIURI, aExplicit?: boolean): boolean; + getExtensionName(aAddonId: string): string; + sourceMayLoadExtensionURI(aSourceURI: nsIURI, aExtensionURI: nsIURI, aFromPrivateWindow?: boolean): boolean; + extensionURIToAddonId(aURI: nsIURI): string; +} + +interface nsIAddonContentPolicy extends nsISupports { + readonly CSP_ALLOW_ANY: 65535; + readonly CSP_ALLOW_LOCALHOST: 1; + readonly CSP_ALLOW_EVAL: 2; + readonly CSP_ALLOW_REMOTE: 4; + readonly CSP_ALLOW_WASM: 8; + + validateAddonCSP(aPolicyString: string, aPermittedPolicy: u32): string; +} + +// https://searchfox.org/mozilla-central/source/caps/nsIDomainPolicy.idl + +interface nsIDomainPolicy extends nsISupports { + readonly blocklist: nsIDomainSet; + readonly superBlocklist: nsIDomainSet; + readonly allowlist: nsIDomainSet; + readonly superAllowlist: nsIDomainSet; + deactivate(): void; +} + +interface nsIDomainSet extends nsISupports { + add(aDomain: nsIURI): void; + remove(aDomain: nsIURI): void; + clear(): void; + contains(aDomain: nsIURI): boolean; + containsSuperDomain(aDomain: nsIURI): boolean; +} + +// https://searchfox.org/mozilla-central/source/caps/nsIPrincipal.idl + +interface nsIPrincipal extends nsISupports { + equals(other: nsIPrincipal): boolean; + equalsForPermission(other: nsIPrincipal, aExactHost: boolean): boolean; + equalsConsideringDomain(other: nsIPrincipal): boolean; + equalsURI(aOtherURI: nsIURI): boolean; + readonly URI: nsIURI; + subsumes(other: nsIPrincipal): boolean; + subsumesConsideringDomain(other: nsIPrincipal): boolean; + subsumesConsideringDomainIgnoringFPD(other: nsIPrincipal): boolean; + checkMayLoad(uri: nsIURI, allowIfInheritsPrincipal: boolean): void; + checkMayLoadWithReporting(uri: nsIURI, allowIfInheritsPrincipal: boolean, innerWindowID: u64): void; + isThirdPartyURI(uri: nsIURI): boolean; + isThirdPartyPrincipal(principal: nsIPrincipal): boolean; + isThirdPartyChannel(channel: nsIChannel): boolean; + readonly originAttributes: any; + readonly origin: string; + readonly hostPort: string; + readonly asciiHost: string; + readonly host: string; + readonly prePath: string; + readonly filePath: string; + readonly asciiSpec: string; + readonly spec: string; + readonly exposablePrePath: string; + readonly exposableSpec: string; + readonly scheme: string; + schemeIs(scheme: string): boolean; + isURIInPrefList(pref: string): boolean; + isURIInList(list: string): boolean; + isContentAccessibleAboutURI(): boolean; + isSameOrigin(otherURI: nsIURI): boolean; + hasFirstpartyStorageAccess(aWindow: mozIDOMWindow, rejectedReason: OutParam): boolean; + readonly localStorageQuotaKey: string; + readonly isOriginPotentiallyTrustworthy: boolean; + readonly isLoopbackHost: boolean; + getAboutModuleFlags(): u32; + readonly storageOriginKey: string; + readonly originNoSuffix: string; + readonly originSuffix: string; + readonly siteOrigin: string; + readonly siteOriginNoSuffix: string; + readonly baseDomain: string; + readonly addonId: string; + readonly addonPolicy: WebExtensionPolicy; + readonly contentScriptAddonPolicy: WebExtensionPolicy; + readonly userContextId: u32; + readonly privateBrowsingId: u32; + readonly isInPrivateBrowsing: boolean; + readonly isNullPrincipal: boolean; + readonly isContentPrincipal: boolean; + readonly isExpandedPrincipal: boolean; + readonly isSystemPrincipal: boolean; + readonly isAddonOrExpandedAddonPrincipal: boolean; + readonly isOnion: boolean; + readonly isScriptAllowedByPolicy: boolean; + isL10nAllowed(aDocumentURI: nsIURI): boolean; + readonly nextSubDomainPrincipal: nsIPrincipal; + readonly isIpAddress: boolean; + readonly isLocalIpAddress: boolean; + readonly precursorPrincipal: nsIPrincipal; +} + +// https://searchfox.org/mozilla-central/source/caps/nsIScriptSecurityManager.idl + +interface nsIScriptSecurityManager extends nsISupports { + readonly STANDARD: 0; + readonly LOAD_IS_AUTOMATIC_DOCUMENT_REPLACEMENT: 1; + readonly ALLOW_CHROME: 2; + readonly DISALLOW_INHERIT_PRINCIPAL: 4; + readonly DISALLOW_SCRIPT_OR_DATA: 4; + readonly DISALLOW_SCRIPT: 8; + readonly DONT_REPORT_ERRORS: 16; + readonly DEFAULT_USER_CONTEXT_ID: 0; + readonly DEFAULT_PRIVATE_BROWSING_ID: 0; + + checkLoadURIWithPrincipalXPCOM(aPrincipal: nsIPrincipal, uri: nsIURI, flags: u32, innerWindowID?: u64): void; + checkLoadURIWithPrincipal(aPrincipal: nsIPrincipal, uri: nsIURI, flags?: u32, innerWindowID?: u64): void; + checkLoadURIStrWithPrincipalXPCOM(aPrincipal: nsIPrincipal, uri: string, flags: u32): void; + checkLoadURIStrWithPrincipal(aPrincipal: nsIPrincipal, uri: string, flags?: u32): void; + inFileURIAllowlist(aUri: nsIURI): boolean; + getSystemPrincipal(): nsIPrincipal; + getLoadContextContentPrincipal(uri: nsIURI, loadContext: nsILoadContext): nsIPrincipal; + getDocShellContentPrincipal(uri: nsIURI, docShell: nsIDocShell): nsIPrincipal; + principalWithOA(principal: nsIPrincipal, originAttributes: any): nsIPrincipal; + createContentPrincipal(uri: nsIURI, originAttributes: any): nsIPrincipal; + createContentPrincipalFromOrigin(origin: string): nsIPrincipal; + principalToJSON(principal: nsIPrincipal): string; + JSONToPrincipal(json: string): nsIPrincipal; + createNullPrincipal(originAttributes: any): nsIPrincipal; + checkSameOriginURI(aSourceURI: nsIURI, aTargetURI: nsIURI, reportError: boolean, fromPrivateWindow: boolean): void; + getChannelResultPrincipal(aChannel: nsIChannel): nsIPrincipal; + getChannelResultStoragePrincipal(aChannel: nsIChannel): nsIPrincipal; + getChannelResultPrincipals(aChannel: nsIChannel, aPrincipal: OutParam, aPartitionedPrincipal: OutParam): void; + getChannelURIPrincipal(aChannel: nsIChannel): nsIPrincipal; + activateDomainPolicy(): nsIDomainPolicy; + readonly domainPolicyActive: boolean; + policyAllowsScript(aDomain: nsIURI): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/captivedetect/nsICaptivePortalDetector.idl + +interface nsICaptivePortalCallback extends nsISupports { + prepare(): void; + complete(success: boolean): void; +} + +interface nsICaptivePortalDetector extends nsISupports { + checkCaptivePortal(ifname: string, callback: nsICaptivePortalCallback): void; + abort(ifname: string): void; + cancelLogin(eventId: string): void; + finishPreparation(ifname: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cascade_bloom_filter/nsICascadeFilter.idl + +interface nsICascadeFilter extends nsISupports { + setFilterData(data: u8[]): void; + has(key: string): boolean; +} + +// https://searchfox.org/mozilla-central/source/chrome/nsIChromeRegistry.idl + +interface nsIChromeRegistry extends nsISupports { + readonly NONE: 0; + readonly PARTIAL: 1; + readonly FULL: 2; + + convertChromeURL(aChromeURL: nsIURI): nsIURI; + checkForNewChrome(): void; +} + +interface nsIXULChromeRegistry extends nsIChromeRegistry { + isLocaleRTL(package: string): boolean; + allowScriptsForPackage(url: nsIURI): boolean; + allowContentToAccess(url: nsIURI): boolean; + canLoadURLRemotely(url: nsIURI): boolean; + mustLoadURLRemotely(url: nsIURI): boolean; +} + +// https://searchfox.org/mozilla-central/source/chrome/nsIToolkitChromeRegistry.idl + +interface nsIToolkitChromeRegistry extends nsIXULChromeRegistry { + getLocalesForPackage(aPackage: string): nsIUTF8StringEnumerator; +} + +// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsICommandManager.idl + +interface nsICommandManager extends nsISupports { + addCommandObserver(aCommandObserver: nsIObserver, aCommandToObserve: string): void; + removeCommandObserver(aCommandObserver: nsIObserver, aCommandObserved: string): void; + isCommandSupported(aCommandName: string, aTargetWindow: mozIDOMWindowProxy): boolean; + isCommandEnabled(aCommandName: string, aTargetWindow: mozIDOMWindowProxy): boolean; + getCommandState(aCommandName: string, aTargetWindow: mozIDOMWindowProxy, aCommandParams: nsICommandParams): void; + doCommand(aCommandName: string, aCommandParams: nsICommandParams, aTargetWindow: mozIDOMWindowProxy): void; +} + +// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsICommandParams.idl + +interface nsICommandParams extends nsISupports { + readonly eNoType: 0; + readonly eBooleanType: 1; + readonly eLongType: 2; + readonly eDoubleType: 3; + readonly eWStringType: 4; + readonly eISupportsType: 5; + readonly eStringType: 6; + + getValueType(name: string): i16; + getBooleanValue(name: string): boolean; + getLongValue(name: string): i32; + getDoubleValue(name: string): double; + getStringValue(name: string): string; + getCStringValue(name: string): string; + getISupportsValue(name: string): nsISupports; + setBooleanValue(name: string, value: boolean): void; + setLongValue(name: string, value: i32): void; + setDoubleValue(name: string, value: double): void; + setStringValue(name: string, value: string): void; + setCStringValue(name: string, value: string): void; + setISupportsValue(name: string, value: nsISupports): void; + removeValue(name: string): void; +} + +// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsIControllerCommand.idl + +interface nsIControllerCommand extends nsISupports { + isCommandEnabled(aCommandName: string, aCommandContext: nsISupports): boolean; + getCommandStateParams(aCommandName: string, aParams: nsICommandParams, aCommandContext: nsISupports): void; + doCommand(aCommandName: string, aCommandContext: nsISupports): void; + doCommandParams(aCommandName: string, aParams: nsICommandParams, aCommandContext: nsISupports): void; +} + +// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsIControllerCommandTable.idl + +interface nsIControllerCommandTable extends nsISupports { + makeImmutable(): void; + registerCommand(aCommandName: string, aCommand: nsIControllerCommand): void; + unregisterCommand(aCommandName: string, aCommand: nsIControllerCommand): void; + findCommandHandler(aCommandName: string): nsIControllerCommand; + isCommandEnabled(aCommandName: string, aCommandRefCon: nsISupports): boolean; + updateCommandState(aCommandName: string, aCommandRefCon: nsISupports): void; + supportsCommand(aCommandName: string, aCommandRefCon: nsISupports): boolean; + doCommand(aCommandName: string, aCommandRefCon: nsISupports): void; + doCommandParams(aCommandName: string, aParam: nsICommandParams, aCommandRefCon: nsISupports): void; + getCommandState(aCommandName: string, aParam: nsICommandParams, aCommandRefCon: nsISupports): void; + getSupportedCommands(): string[]; +} + +// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsIControllerContext.idl + +interface nsIControllerContext extends nsISupports { + setCommandContext(aCommandContext: nsISupports): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLine.idl + +interface nsICommandLine extends nsISupports { + readonly STATE_INITIAL_LAUNCH: 0; + readonly STATE_REMOTE_AUTO: 1; + readonly STATE_REMOTE_EXPLICIT: 2; + + readonly length: i32; + getArgument(aIndex: i32): string; + findFlag(aFlag: string, aCaseSensitive: boolean): i32; + removeArguments(aStart: i32, aEnd: i32): void; + handleFlag(aFlag: string, aCaseSensitive: boolean): boolean; + handleFlagWithParam(aFlag: string, aCaseSensitive: boolean): string; + readonly state: u32; + preventDefault: boolean; + readonly workingDirectory: nsIFile; + resolveFile(aArgument: string): nsIFile; + resolveURI(aArgument: string): nsIURI; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineHandler.idl + +interface nsICommandLineHandler extends nsISupports { + handle(aCommandLine: nsICommandLine): void; + readonly helpInfo: string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineRunner.idl + +// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineValidator.idl + +interface nsICommandLineValidator extends nsISupports { + validate(aCommandLine: nsICommandLine): void; +} + +// https://searchfox.org/mozilla-central/source/editor/composer/nsIEditingSession.idl + +interface nsIEditingSession extends nsISupports { + readonly eEditorOK: 0; + readonly eEditorCreationInProgress: 1; + readonly eEditorErrorCantEditMimeType: 2; + readonly eEditorErrorFileNotFound: 3; + readonly eEditorErrorCantEditFramesets: 8; + readonly eEditorErrorUnknown: 9; + + readonly editorStatus: u32; + makeWindowEditable(window: mozIDOMWindowProxy, aEditorType: string, doAfterUriLoad: boolean, aMakeWholeDocumentEditable: boolean, aInteractive: boolean): void; + windowIsEditable(window: mozIDOMWindowProxy): boolean; + getEditorForWindow(window: mozIDOMWindowProxy): nsIEditor; +} + +// https://searchfox.org/mozilla-central/source/dom/events/nsIEventListenerService.idl + +interface nsIEventListenerChange extends nsISupports { + readonly target: EventTarget; +} + +type nsIListenerChangeListener = Callable<{ + listenersChanged(aEventListenerChanges: nsIArray): void; +}> + +interface nsIEventListenerInfo extends nsISupports { + readonly type: string; + readonly capturing: boolean; + readonly allowsUntrusted: boolean; + readonly inSystemEventGroup: boolean; + enabled: boolean; + readonly listenerObject: any; + toSource(): string; +} + +interface nsIEventListenerService extends nsISupports { + getListenerInfoFor(aEventTarget: EventTarget): nsIEventListenerInfo[]; + hasListenersFor(aEventTarget: EventTarget, aType: string): boolean; + addListenerForAllEvents(target: EventTarget, listener: any, aUseCapture?: boolean, aWantsUntrusted?: boolean, aSystemEventGroup?: boolean): void; + removeListenerForAllEvents(target: EventTarget, listener: any, aUseCapture?: boolean, aSystemEventGroup?: boolean): void; + addListenerChangeListener(aListener: nsIListenerChangeListener): void; + removeListenerChangeListener(aListener: nsIListenerChangeListener): void; +} + +// https://searchfox.org/mozilla-central/source/dom/media/gmp/mozIGeckoMediaPluginChromeService.idl + +interface mozIGeckoMediaPluginChromeService extends nsISupports { + addPluginDirectory(directory: string): void; + removePluginDirectory(directory: string): void; + removeAndDeletePluginDirectory(directory: string, defer?: boolean): void; + forgetThisSite(site: string, aPattern: string): void; + forgetThisBaseDomain(baseDomain: string): void; + isPersistentStorageAllowed(nodeId: string): boolean; + getStorageDir(): nsIFile; +} + +// https://searchfox.org/mozilla-central/source/dom/media/gmp/mozIGeckoMediaPluginService.idl + +interface mozIGeckoMediaPluginService extends nsISupports { + readonly thread: nsIThread; + RunPluginCrashCallbacks(pluginId: u32, pluginName: string): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShell.idl + +} // global + +declare namespace nsIDocShell { + +enum DocShellEnumeratorDirection { + ENUMERATE_FORWARDS = 0, + ENUMERATE_BACKWARDS = 1, +} + +enum AppType { + APP_TYPE_UNKNOWN = 0, + APP_TYPE_MAIL = 1, + APP_TYPE_EDITOR = 2, +} + +enum BusyFlags { + BUSY_FLAGS_NONE = 0, + BUSY_FLAGS_BUSY = 1, + BUSY_FLAGS_BEFORE_PAGE_LOAD = 2, + BUSY_FLAGS_PAGE_LOADING = 4, +} + +enum LoadCommand { + LOAD_CMD_NORMAL = 1, + LOAD_CMD_RELOAD = 2, + LOAD_CMD_HISTORY = 4, + LOAD_CMD_PUSHSTATE = 8, +} + +} + +declare global { + +interface nsIDocShell extends nsIDocShellTreeItem, Enums { + setCancelContentJSEpoch(aEpoch: i32): void; + addState(aData: any, aTitle: string, aURL: string, aReplace: boolean): void; + prepareForNewContentModel(): void; + setCurrentURIForSessionStore(aURI: nsIURI): void; + readonly docViewer: nsIDocumentViewer; + readonly outerWindowID: u64; + chromeEventHandler: EventTarget; + customUserAgent: string; + cssErrorReportingEnabled: boolean; + allowMetaRedirects: boolean; + allowSubframes: boolean; + allowImages: boolean; + allowMedia: boolean; + allowDNSPrefetch: boolean; + allowWindowControl: boolean; + allowContentRetargeting: boolean; + allowContentRetargetingOnChildren: boolean; + getAllDocShellsInSubtree(aItemType: i32, aDirection: nsIDocShell.DocShellEnumeratorDirection): nsIDocShell[]; + appType: nsIDocShell.AppType; + allowAuth: boolean; + zoom: float; + readonly busyFlags: nsIDocShell.BusyFlags; + loadType: u32; + defaultLoadFlags: nsLoadFlags; + isBeingDestroyed(): boolean; + readonly isExecutingOnLoadHandler: boolean; + layoutHistoryState: nsILayoutHistoryState; + readonly loadURIDelegate: nsILoadURIDelegate; + suspendRefreshURIs(): void; + resumeRefreshURIs(): void; + beginRestore(viewer: nsIDocumentViewer, top: boolean): void; + finishRestore(): void; + clearCachedUserAgent(): void; + clearCachedPlatform(): void; + readonly restoringDocument: boolean; + useErrorPages: boolean; + displayLoadError(aError: nsresult, aURI: nsIURI, aURL: string, aFailedChannel?: nsIChannel): boolean; + readonly failedChannel: nsIChannel; + readonly previousEntryIndex: i32; + readonly loadedEntryIndex: i32; + historyPurged(numEntries: i32): void; + readonly currentDocumentChannel: nsIChannel; + readonly isInUnload: boolean; + exitPrintPreview(): void; + readonly historyID: nsID; + createAboutBlankDocumentViewer(aPrincipal: nsIPrincipal, aPartitionedPrincipal: nsIPrincipal, aCSP?: nsIContentSecurityPolicy): void; + readonly charset: string; + forceEncodingDetection(): void; + now(): DOMHighResTimeStamp; + addWeakPrivacyTransitionObserver(obs: nsIPrivacyTransitionObserver): void; + addWeakReflowObserver(obs: nsIReflowObserver): void; + removeWeakReflowObserver(obs: nsIReflowObserver): void; + readonly isTopLevelContentDocShell: boolean; + readonly asyncPanZoomEnabled: boolean; + readonly mayEnableCharacterEncodingMenu: boolean; + editor: nsIEditor; + readonly editable: boolean; + readonly hasEditingSession: boolean; + makeEditable(inWaitForUriLoad: boolean): void; + getCurrentSHEntry(aEntry: OutParam): boolean; + isCommandEnabled(command: string): boolean; + doCommand(command: string): void; + doCommandWithParams(command: string, aParams: nsICommandParams): void; + readonly hasLoadedNonBlankURI: boolean; + windowDraggingAllowed: boolean; + currentScrollRestorationIsManual: boolean; + getOriginAttributes(): any; + setOriginAttributes(aAttrs: any): void; + readonly editingSession: nsIEditingSession; + readonly browserChild: nsIBrowserChild; + useTrackingProtection: boolean; + setColorMatrix(aMatrix: float[]): void; + readonly isForceReloading: boolean; + getColorMatrix(): float[]; + readonly messageManager: ContentFrameMessageManager; + getHasTrackingContentBlocked(): Promise; + readonly isNavigating: boolean; + synchronizeLayoutHistoryState(): void; + persistLayoutHistoryState(): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShellTreeItem.idl + +interface nsIDocShellTreeItem extends nsISupports { + readonly typeChrome: 0; + readonly typeContent: 1; + readonly typeContentWrapper: 2; + readonly typeChromeWrapper: 3; + readonly typeAll: 2147483647; + + name: string; + nameEquals(name: string): boolean; + readonly itemType: i32; + readonly parent: nsIDocShellTreeItem; + readonly sameTypeParent: nsIDocShellTreeItem; + readonly rootTreeItem: nsIDocShellTreeItem; + readonly sameTypeRootTreeItem: nsIDocShellTreeItem; + readonly treeOwner: nsIDocShellTreeOwner; + readonly childCount: i32; + getChildAt(index: i32): nsIDocShellTreeItem; + readonly browsingContext: BrowsingContext; + readonly domWindow: mozIDOMWindowProxy; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShellTreeOwner.idl + +interface nsIDocShellTreeOwner extends nsISupports { + contentShellAdded(aContentShell: nsIDocShellTreeItem, aPrimary: boolean): void; + contentShellRemoved(aContentShell: nsIDocShellTreeItem): void; + readonly primaryContentShell: nsIDocShellTreeItem; + remoteTabAdded(aTab: nsIRemoteTab, aPrimary: boolean): void; + remoteTabRemoved(aTab: nsIRemoteTab): void; + readonly primaryRemoteTab: nsIRemoteTab; + readonly primaryContentBrowsingContext: BrowsingContext; + sizeShellTo(shell: nsIDocShellTreeItem, cx: i32, cy: i32): void; + getPrimaryContentSize(width: OutParam, height: OutParam): void; + setPrimaryContentSize(width: i32, height: i32): void; + getRootShellSize(width: OutParam, height: OutParam): void; + setRootShellSize(width: i32, height: i32): void; + setPersistence(aPersistPosition: boolean, aPersistSize: boolean, aPersistSizeMode: boolean): void; + getPersistence(aPersistPosition: OutParam, aPersistSize: OutParam, aPersistSizeMode: OutParam): void; + readonly hasPrimaryContent: boolean; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocumentLoaderFactory.idl + +interface nsIDocumentLoaderFactory extends nsISupports { + createInstance(aCommand: string, aChannel: nsIChannel, aLoadGroup: nsILoadGroup, aContentType: string, aContainer: nsIDocShell, aExtraInfo: nsISupports, aDocListenerResult: OutParam): nsIDocumentViewer; + createInstanceForDocument(aContainer: nsISupports, aDocument: Document, aCommand: string): nsIDocumentViewer; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocumentViewer.idl + +} // global + +declare namespace nsIDocumentViewer { + +enum PermitUnloadAction { + ePrompt = 0, + eDontPromptAndDontUnload = 1, + eDontPromptAndUnload = 2, +} + +enum PermitUnloadResult { + eAllowNavigation = 0, + eRequestBlockNavigation = 1, +} + +} + +declare global { + +interface nsIDocumentViewer extends nsISupports, Enums { + readonly eDelayResize: 1; + + container: nsIDocShell; + loadComplete(aStatus: nsresult): void; + permitUnload(aAction?: nsIDocumentViewer.PermitUnloadAction): boolean; + readonly inPermitUnload: boolean; + readonly beforeUnloadFiring: boolean; + pageHide(isUnload: boolean): void; + close(historyEntry: nsISHEntry): void; + destroy(): void; + stop(): void; + readonly DOMDocument: Document; + move(aX: i32, aY: i32): void; + show(): void; + hide(): void; + sticky: boolean; + open(aState: nsISupports, aSHEntry: nsISHEntry): void; + clearHistoryEntry(): void; + setPageModeForTesting(aPageMode: boolean, aPrintSettings: nsIPrintSettings): void; + readonly historyEntry: nsISHEntry; + readonly isTabModalPromptAllowed: boolean; + isHidden: boolean; + readonly deviceFullZoomForTest: float; + authorStyleDisabled: boolean; + getContentSize(maxWidth: i32, maxHeight: i32, prefWidth: i32, width: OutParam, height: OutParam): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocumentViewerEdit.idl + +interface nsIDocumentViewerEdit extends nsISupports { + readonly COPY_IMAGE_TEXT: 1; + readonly COPY_IMAGE_HTML: 2; + readonly COPY_IMAGE_DATA: 4; + readonly COPY_IMAGE_ALL: -1; + + clearSelection(): void; + selectAll(): void; + copySelection(): void; + readonly copyable: boolean; + copyLinkLocation(): void; + readonly inLink: boolean; + copyImage(aCopyFlags: i32): void; + readonly inImage: boolean; + getContents(aMimeType: string, aSelectionOnly: boolean): string; + readonly canGetContents: boolean; + setCommandNode(aNode: Node): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsILoadContext.idl + +interface nsILoadContext extends nsISupports { + readonly associatedWindow: mozIDOMWindowProxy; + readonly topWindow: mozIDOMWindowProxy; + readonly topFrameElement: Element; + readonly isContent: boolean; + usePrivateBrowsing: boolean; + readonly useRemoteTabs: boolean; + readonly useRemoteSubframes: boolean; + useTrackingProtection: boolean; + readonly originAttributes: any; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsILoadURIDelegate.idl + +interface nsILoadURIDelegate extends nsISupports { + handleLoadError(aURI: nsIURI, aError: nsresult, aErrorModule: i16): nsIURI; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIPrivacyTransitionObserver.idl + +type nsIPrivacyTransitionObserver = Callable<{ + privateModeChanged(enabled: boolean): void; +}> + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIReflowObserver.idl + +interface nsIReflowObserver extends nsISupports { + reflow(start: DOMHighResTimeStamp, end: DOMHighResTimeStamp): void; + reflowInterruptible(start: DOMHighResTimeStamp, end: DOMHighResTimeStamp): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIRefreshURI.idl + +interface nsIRefreshURI extends nsISupports { + refreshURI(aURI: nsIURI, aPrincipal: nsIPrincipal, aMillis: u32): void; + forceRefreshURI(aURI: nsIURI, aPrincipal: nsIPrincipal, aMillis: u32): void; + cancelRefreshURITimers(): void; + readonly refreshPending: boolean; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsITooltipListener.idl + +interface nsITooltipListener extends nsISupports { + onShowTooltip(aXCoords: i32, aYCoords: i32, aTipText: string, aTipDir: string): void; + onHideTooltip(): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsITooltipTextProvider.idl + +interface nsITooltipTextProvider extends nsISupports { + getNodeText(aNode: Node, aText: OutParam, aDirection: OutParam): boolean; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIURIFixup.idl + +interface nsIURIFixupInfo extends nsISupports { + consumer: BrowsingContext; + preferredURI: nsIURI; + fixedURI: nsIURI; + keywordProviderName: string; + keywordAsSent: string; + schemelessInput: nsILoadInfo.SchemelessInputType; + fixupChangedProtocol: boolean; + fixupCreatedAlternateURI: boolean; + originalInput: string; + postData: nsIInputStream; +} + +interface nsIURIFixup extends nsISupports { + readonly FIXUP_FLAG_NONE: 0; + readonly FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP: 1; + readonly FIXUP_FLAGS_MAKE_ALTERNATE_URI: 2; + readonly FIXUP_FLAG_PRIVATE_CONTEXT: 4; + readonly FIXUP_FLAG_FIX_SCHEME_TYPOS: 8; + + getFixupURIInfo(aURIText: string, aFixupFlags?: u32): nsIURIFixupInfo; + webNavigationFlagsToFixupFlags(aURIText: string, aDocShellFlags: u32): u32; + keywordToURI(aKeyword: string, aIsPrivateContext?: boolean): nsIURIFixupInfo; + forceHttpFixup(aUriString: string): nsIURIFixupInfo; + checkHost(aURI: nsIURI, aListener: nsIDNSListener, aOriginAttributes?: any): void; + isDomainKnown(aDomain: string): boolean; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIWebNavigation.idl + +interface nsIWebNavigation extends nsISupports { + readonly LOAD_FLAGS_MASK: 65535; + readonly LOAD_FLAGS_NONE: 0; + readonly LOAD_FLAGS_IS_REFRESH: 16; + readonly LOAD_FLAGS_IS_LINK: 32; + readonly LOAD_FLAGS_BYPASS_HISTORY: 64; + readonly LOAD_FLAGS_REPLACE_HISTORY: 128; + readonly LOAD_FLAGS_BYPASS_CACHE: 256; + readonly LOAD_FLAGS_BYPASS_PROXY: 512; + readonly LOAD_FLAGS_CHARSET_CHANGE: 1024; + readonly LOAD_FLAGS_STOP_CONTENT: 2048; + readonly LOAD_FLAGS_FROM_EXTERNAL: 4096; + readonly LOAD_FLAGS_FIRST_LOAD: 16384; + readonly LOAD_FLAGS_ALLOW_POPUPS: 32768; + readonly LOAD_FLAGS_BYPASS_CLASSIFIER: 65536; + readonly LOAD_FLAGS_FORCE_ALLOW_COOKIES: 131072; + readonly LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL: 262144; + readonly LOAD_FLAGS_ERROR_LOAD_CHANGES_RV: 524288; + readonly LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP: 1048576; + readonly LOAD_FLAGS_FIXUP_SCHEME_TYPOS: 2097152; + readonly LOAD_FLAGS_FORCE_ALLOW_DATA_URI: 4194304; + readonly LOAD_FLAGS_IS_REDIRECT: 8388608; + readonly LOAD_FLAGS_DISABLE_TRR: 16777216; + readonly LOAD_FLAGS_FORCE_TRR: 33554432; + readonly LOAD_FLAGS_BYPASS_LOAD_URI_DELEGATE: 67108864; + readonly LOAD_FLAGS_USER_ACTIVATION: 134217728; + readonly STOP_NETWORK: 1; + readonly STOP_CONTENT: 2; + readonly STOP_ALL: 3; + + readonly canGoBack: boolean; + readonly canGoBackIgnoringUserInteraction: boolean; + readonly canGoForward: boolean; + goBack(aRequireUserInteraction?: boolean, aUserActivation?: boolean): void; + goForward(aRequireUserInteraction?: boolean, aUserActivation?: boolean): void; + gotoIndex(index: i32, aUserActivation?: boolean): void; + loadURI(aURI: nsIURI, aLoadURIOptions: any): void; + fixupAndLoadURIString(aURIString: string, aLoadURIOptions: any): void; + reload(aReloadFlags: u32): void; + stop(aStopFlags: u32): void; + readonly document: Document; + readonly currentURI: nsIURI; + readonly sessionHistory: nsISupports; + resumeRedirectedLoad(aLoadIdentifier: u64, aHistoryIndex: i32): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIWebNavigationInfo.idl + +interface nsIWebNavigationInfo extends nsISupports { + readonly UNSUPPORTED: 0; + readonly IMAGE: 1; + readonly FALLBACK: 2; + readonly OTHER: 32768; + + isTypeSupported(aType: string): u32; +} + +// https://searchfox.org/mozilla-central/source/docshell/base/nsIWebPageDescriptor.idl + +interface nsIWebPageDescriptor extends nsISupports { + loadPageAsViewSource(otherDocShell: nsIDocShell, aURL: string): void; + readonly currentDescriptor: nsISupports; } // https://searchfox.org/mozilla-central/source/dom/base/mozIDOMWindow.idl @@ -5659,6 +2254,11 @@ interface nsIDOMProcessParent extends nsISupports { readonly remoteType: string; } +interface nsIContentParentKeepAlive extends nsISupports { + readonly domProcess: nsIDOMProcessParent; + invalidateKeepAlive(): void; +} + // https://searchfox.org/mozilla-central/source/dom/ipc/nsIHangReport.idl interface nsIHangReport extends nsISupports { @@ -5681,12 +2281,11 @@ interface nsILoginDetectionService extends nsISupports { isLoginsLoaded(): boolean; } -// https://searchfox.org/mozilla-central/source/security/sandbox/common/mozISandboxSettings.idl +// https://searchfox.org/mozilla-central/source/dom/audiochannel/nsIAudioChannelAgent.idl -interface mozISandboxSettings extends nsISupports { - readonly effectiveContentSandboxLevel: i32; - readonly contentWin32kLockdownState: i32; - readonly contentWin32kLockdownStateString: string; +interface nsISuspendedTypes extends nsISupports { + readonly NONE_SUSPENDED: 0; + readonly SUSPENDED_BLOCK: 1; } // https://searchfox.org/mozilla-central/source/dom/interfaces/base/domstubs.idl @@ -6126,8 +2725,9 @@ interface nsIDOMWindowUtils extends nsISupports { getOMTAStyle(aElement: Element, aProperty: string, aPseudoElement?: string): string; setHandlingUserInput(aHandlingInput: boolean): nsIJSRAIIHelper; isKeyboardEventUserActivity(aKeyboardEvent: Event): boolean; - getContentAPZTestData(): any; + getContentAPZTestData(aElement?: Element): any; getCompositorAPZTestData(aElement?: Element): any; + sendMozMouseHitTestEvent(aX: float, aY: float, aElement?: Element): void; postRestyleSelfEvent(aElement: Element): void; xpconnectArgument(aObj: nsISupports): void; askPermission(aRequest: nsIContentPermissionRequest): void; @@ -6372,7 +2972,7 @@ interface nsIServiceWorkerManager extends nsISupports { sendNotificationClickEvent(aOriginSuffix: string, scope: string, aID: string, aTitle: string, aDir: string, aLang: string, aBody: string, aTag: string, aIcon: string, aData: string): void; sendNotificationCloseEvent(aOriginSuffix: string, scope: string, aID: string, aTitle: string, aDir: string, aLang: string, aBody: string, aTag: string, aIcon: string, aData: string): void; sendPushEvent(aOriginAttributes: string, aScope: string, aDataBytes?: u8[]): void; - sendPushSubscriptionChangeEvent(aOriginAttributes: string, scope: string): void; + sendPushSubscriptionChangeEvent(aOriginAttributes: string, scope: string, aOldSubscription?: nsIPushSubscription): void; addListener(aListener: nsIServiceWorkerManagerListener): void; removeListener(aListener: nsIServiceWorkerManagerListener): void; } @@ -6452,2572 +3052,657 @@ type nsITextInputProcessorCallback = Callable<{ onNotify(aTextInputProcessor: nsITextInputProcessor, aNotification: nsITextInputProcessorNotification): boolean; }> -// https://searchfox.org/mozilla-central/source/intl/strres/nsIStringBundle.idl - -interface nsIStringBundle extends nsISupports { - GetStringFromID(aID: i32): string; - GetStringFromName(aName: string): string; - formatStringFromID(aID: i32, params: string[]): string; - formatStringFromName(aName: string, params: string[]): string; - getSimpleEnumeration(): nsISimpleEnumerator; - asyncPreload(): void; -} - -interface nsIStringBundleService extends nsISupports { - createBundle(aURLSpec: string): nsIStringBundle; - formatStatusMessage(aStatus: nsresult, aStatusArg: string): string; - flushBundles(): void; -} - -// https://searchfox.org/mozilla-central/source/browser/components/migration/nsIEdgeMigrationUtils.idl - -interface nsIEdgeMigrationUtils extends nsISupports { - isDbLocked(aFile: nsIFile): Promise; -} - -// https://searchfox.org/mozilla-central/source/browser/components/migration/nsIKeychainMigrationUtils.idl - -interface nsIKeychainMigrationUtils extends nsISupports { - getGenericPassword(aServiceName: string, aAccountName: string): string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIBlocklistService.idl - -interface nsIBlocklistService extends nsISupports { - readonly STATE_NOT_BLOCKED: 0; - readonly STATE_SOFTBLOCKED: 1; - readonly STATE_BLOCKED: 2; - readonly STATE_MAX: 3; - - readonly isLoaded: boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsICrashReporter.idl - -interface nsICrashReporter extends nsISupports { - readonly crashReporterEnabled: boolean; - serverURL: nsIURL; - minidumpPath: nsIFile; - getMinidumpForID(id: string): nsIFile; - getExtraFileForID(id: string): nsIFile; - annotateCrashReport(key: string, data: any): void; - removeCrashReportAnnotation(key: string): void; - isAnnotationAllowedForPing(value: string): boolean; - appendAppNotesToCrashReport(data: string): void; - registerAppMemory(ptr: u64, size: u64): void; - submitReports: boolean; - UpdateCrashEventsDir(): void; - saveMemoryReport(): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIDeviceSensors.idl - -interface nsIDeviceSensorData extends nsISupports { - readonly TYPE_ORIENTATION: 0; - readonly TYPE_ACCELERATION: 1; - readonly TYPE_PROXIMITY: 2; - readonly TYPE_LINEAR_ACCELERATION: 3; - readonly TYPE_GYROSCOPE: 4; - readonly TYPE_LIGHT: 5; - readonly TYPE_ROTATION_VECTOR: 6; - readonly TYPE_GAME_ROTATION_VECTOR: 7; - - readonly type: u32; - readonly x: double; - readonly y: double; - readonly z: double; -} - -interface nsIDeviceSensors extends nsISupports { - hasWindowListener(aType: u32, aWindow: nsIDOMWindow): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIGIOService.idl - -interface nsIGIOHandlerApp extends nsIHandlerApp { - readonly id: string; - launchFile(fileName: string): void; - getMozIconURL(): string; -} - -interface nsIGIOMimeApp extends nsIHandlerApp { - readonly EXPECTS_URIS: 0; - readonly EXPECTS_PATHS: 1; - readonly EXPECTS_URIS_FOR_NON_FILES: 2; - - readonly id: string; - readonly command: string; - readonly expectsURIs: i32; - readonly supportedURISchemes: nsIUTF8StringEnumerator; - setAsDefaultForMimeType(mimeType: string): void; - setAsDefaultForFileExtensions(extensions: string): void; - setAsDefaultForURIScheme(uriScheme: string): void; -} - -interface nsIGIOService extends nsISupports { - getMimeTypeFromExtension(extension: string): string; - getAppForURIScheme(aURIScheme: string): nsIHandlerApp; - getAppsForURIScheme(aURIScheme: string): nsIMutableArray; - getAppForMimeType(mimeType: string): nsIHandlerApp; - createHandlerAppFromAppId(appId: string): nsIGIOHandlerApp; - createAppFromCommand(cmd: string, appName: string): nsIGIOMimeApp; - findAppFromCommand(cmd: string): nsIGIOMimeApp; - getDescriptionForMimeType(mimeType: string): string; - readonly isRunningUnderFlatpak: boolean; - readonly isRunningUnderSnap: boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIGSettingsService.idl - -interface nsIGSettingsCollection extends nsISupports { - setString(key: string, value: string): void; - setBoolean(key: string, value: boolean): void; - setInt(key: string, value: i32): void; - getString(key: string): string; - getBoolean(key: string): boolean; - getInt(key: string): i32; - getStringList(key: string): nsIArray; -} - -interface nsIGSettingsService extends nsISupports { - getCollectionForSchema(schema: string): nsIGSettingsCollection; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIGeolocationProvider.idl - -interface nsIGeolocationUpdate extends nsISupports { - update(position: nsIDOMGeoPosition): void; - notifyError(error: u16): void; -} - -interface nsIGeolocationProvider extends nsISupports { - startup(): void; - watch(callback: nsIGeolocationUpdate): void; - shutdown(): void; - setHighAccuracy(enable: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIHapticFeedback.idl - -interface nsIHapticFeedback extends nsISupports { - readonly ShortPress: 0; - readonly LongPress: 1; - - performSimpleAction(isLongPress: i32): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIPlatformInfo.idl - -interface nsIPlatformInfo extends nsISupports { - readonly platformVersion: string; - readonly platformBuildID: string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsISystemInfo.idl - -interface nsISystemInfo extends nsISupports { - readonly diskInfo: Promise; - readonly countryCode: Promise; - readonly osInfo: Promise; - readonly processInfo: Promise; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIXULAppInfo.idl - -interface nsIXULAppInfo extends nsIPlatformInfo { - readonly vendor: string; - readonly name: string; - readonly ID: string; - readonly version: string; - readonly appBuildID: string; - readonly UAName: string; - readonly sourceURL: string; - readonly updateURL: string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/system/nsIXULRuntime.idl - -} // global - -declare namespace nsIXULRuntime { - -enum ExperimentStatus { - eExperimentStatusUnenrolled = 0, - eExperimentStatusControl = 1, - eExperimentStatusTreatment = 2, - eExperimentStatusDisqualified = 3, - eExperimentStatusRollout = 4, - eExperimentStatusCount = 5, -} - -enum ContentWin32kLockdownState { - LockdownEnabled = 1, - MissingWebRender = 2, - OperatingSystemNotSupported = 3, - PrefNotSet = 4, - MissingRemoteWebGL = 5, - MissingNonNativeTheming = 6, - DisabledByEnvVar = 7, - DisabledBySafeMode = 8, - DisabledByE10S = 9, - DisabledByUserPref = 10, - EnabledByUserPref = 11, - DisabledByControlGroup = 12, - EnabledByTreatmentGroup = 13, - DisabledByDefault = 14, - EnabledByDefault = 15, - DecodersArentRemote = 16, - IncompatibleMitigationPolicy = 17, -} - -enum FissionDecisionStatus { - eFissionStatusUnknown = 0, - eFissionDisabledByE10sEnv = 3, - eFissionEnabledByEnv = 4, - eFissionDisabledByEnv = 5, - eFissionEnabledByDefault = 7, - eFissionDisabledByDefault = 8, - eFissionEnabledByUserPref = 9, - eFissionDisabledByUserPref = 10, - eFissionDisabledByE10sOther = 11, -} - -} - -declare global { - -interface nsIXULRuntime extends nsISupports, Enums { - readonly PROCESS_TYPE_DEFAULT: 0; - readonly PROCESS_TYPE_CONTENT: 2; - readonly PROCESS_TYPE_IPDLUNITTEST: 3; - readonly PROCESS_TYPE_GMPLUGIN: 4; - readonly PROCESS_TYPE_GPU: 5; - readonly PROCESS_TYPE_VR: 6; - readonly PROCESS_TYPE_RDD: 7; - readonly PROCESS_TYPE_SOCKET: 8; - readonly PROCESS_TYPE_FORKSERVER: 10; - readonly PROCESS_TYPE_UTILITY: 11; - readonly E10S_MULTI_EXPERIMENT: 1; - - readonly inSafeMode: boolean; - readonly win32kExperimentStatus: nsIXULRuntime.ExperimentStatus; - readonly win32kLiveStatusTestingOnly: nsIXULRuntime.ContentWin32kLockdownState; - readonly win32kSessionStatus: nsIXULRuntime.ContentWin32kLockdownState; - readonly fissionAutostart: boolean; - readonly fissionDecisionStatus: nsIXULRuntime.FissionDecisionStatus; - readonly fissionDecisionStatusString: string; - readonly sessionHistoryInParent: boolean; - readonly sessionStorePlatformCollection: boolean; - logConsoleErrors: boolean; - readonly OS: string; - readonly XPCOMABI: string; - readonly widgetToolkit: string; - readonly processType: u32; - readonly processID: u32; - readonly uniqueProcessID: u64; - readonly remoteType: string; - readonly browserTabsRemoteAutostart: boolean; - readonly maxWebProcessCount: u32; - readonly accessibilityEnabled: boolean; - readonly accessibilityInstantiator: string; - readonly is64Bit: boolean; - readonly isTextRecognitionSupported: boolean; - invalidateCachesOnRestart(): void; - readonly replacedLockTime: PRTime; - readonly defaultUpdateChannel: string; - readonly distributionID: string; - readonly windowsDLLBlocklistStatus: boolean; - readonly restartedByOS: boolean; - readonly chromeColorSchemeIsDark: boolean; - readonly contentThemeDerivedColorSchemeIsDark: boolean; - readonly prefersReducedMotion: boolean; - readonly drawInTitlebar: boolean; - readonly desktopEnvironment: string; - readonly isWayland: boolean; - readonly processStartupShortcut: string; - readonly launcherProcessState: u32; - readonly lastAppVersion: string; - readonly lastAppBuildID: string; -} - -// https://searchfox.org/mozilla-central/source/dom/media/webspeech/synth/nsISpeechService.idl - -interface nsISpeechTaskCallback extends nsISupports { - onPause(): void; - onResume(): void; - onCancel(): void; - onVolumeChanged(aVolume: float): void; -} - -interface nsISpeechTask extends nsISupports { - setup(aCallback: nsISpeechTaskCallback): void; - dispatchStart(): void; - dispatchEnd(aElapsedTime: float, aCharIndex: u32): void; - dispatchPause(aElapsedTime: float, aCharIndex: u32): void; - dispatchResume(aElapsedTime: float, aCharIndex: u32): void; - dispatchError(aElapsedTime: float, aCharIndex: u32): void; - dispatchBoundary(aName: string, aElapsedTime: float, aCharIndex: u32, aCharLength?: u32): void; - dispatchMark(aName: string, aElapsedTime: float, aCharIndex: u32): void; -} - -interface nsISpeechService extends nsISupports { - speak(aText: string, aUri: string, aVolume: float, aRate: float, aPitch: float, aTask: nsISpeechTask): void; -} - -// https://searchfox.org/mozilla-central/source/dom/media/webspeech/synth/nsISynthVoiceRegistry.idl - -interface nsISynthVoiceRegistry extends nsISupports { - addVoice(aService: nsISpeechService, aUri: string, aName: string, aLang: string, aLocalService: boolean, aQueuesUtterances: boolean): void; - removeVoice(aService: nsISpeechService, aUri: string): void; - notifyVoicesChanged(): void; - notifyVoicesError(aError: string): void; - setDefaultVoice(aUri: string, aIsDefault: boolean): void; - readonly voiceCount: u32; - getVoice(aIndex: u32): string; - isDefaultVoice(aUri: string): boolean; - isLocalVoice(aUri: string): boolean; - getVoiceLang(aUri: string): string; - getVoiceName(aUri: string): string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIAsyncInputStream.idl - -interface nsIAsyncInputStream extends nsIInputStream { - readonly WAIT_CLOSURE_ONLY: 1; - - closeWithStatus(aStatus: nsresult): void; - asyncWait(aCallback: nsIInputStreamCallback, aFlags: u32, aRequestedCount: u32, aEventTarget: nsIEventTarget): void; -} - -type nsIInputStreamCallback = Callable<{ - onInputStreamReady(aStream: nsIAsyncInputStream): void; -}> - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIAsyncOutputStream.idl - -interface nsIAsyncOutputStream extends nsIOutputStream { - readonly WAIT_CLOSURE_ONLY: 1; - - closeWithStatus(reason: nsresult): void; - asyncWait(aCallback: nsIOutputStreamCallback, aFlags: u32, aRequestedCount: u32, aEventTarget: nsIEventTarget): void; -} - -type nsIOutputStreamCallback = Callable<{ - onOutputStreamReady(aStream: nsIAsyncOutputStream): void; -}> - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIBinaryInputStream.idl - -interface nsIBinaryInputStream extends nsIInputStream { - setInputStream(aInputStream: nsIInputStream): void; - readBoolean(): boolean; - read8(): u8; - read16(): u16; - read32(): u32; - read64(): u64; - readFloat(): float; - readDouble(): double; - readCString(): string; - readString(): string; - readBytes(aLength: u32): OutParam; - readByteArray(aLength: u32): u8[]; - readArrayBuffer(aLength: u64, aArrayBuffer: any): u64; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIBinaryOutputStream.idl - -interface nsIBinaryOutputStream extends nsIOutputStream { - setOutputStream(aOutputStream: nsIOutputStream): void; - writeBoolean(aBoolean: boolean): void; - write8(aByte: u8): void; - write16(a16: u16): void; - write32(a32: u32): void; - write64(a64: u64): void; - writeFloat(aFloat: float): void; - writeDouble(aDouble: double): void; - writeStringZ(aString: string): void; - writeWStringZ(aString: string): void; - writeUtf8Z(aString: string): void; - writeBytes(aString: string, aLength?: u32): void; - writeByteArray(aBytes: u8[]): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsICloneableInputStream.idl - -interface nsICloneableInputStream extends nsISupports { - readonly cloneable: boolean; - clone(): nsIInputStream; -} - -interface nsICloneableInputStreamWithRange extends nsICloneableInputStream { - cloneWithRange(start: u64, length: u64): nsIInputStream; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIConverterInputStream.idl - -interface nsIConverterInputStream extends nsIUnicharInputStream { - readonly DEFAULT_REPLACEMENT_CHARACTER: 65533; - readonly ERRORS_ARE_FATAL: 0; - - init(aStream: nsIInputStream, aCharset: string, aBufferSize: i32, aReplacementChar: u16): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIConverterOutputStream.idl - -interface nsIConverterOutputStream extends nsIUnicharOutputStream { - init(aOutStream: nsIOutputStream, aCharset: string): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIDirectoryEnumerator.idl - -interface nsIDirectoryEnumerator extends nsISimpleEnumerator { - readonly nextFile: nsIFile; - close(): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIDirectoryService.idl - -interface nsIDirectoryServiceProvider extends nsISupports { - getFile(prop: string, persistent: OutParam): nsIFile; -} - -interface nsIDirectoryServiceProvider2 extends nsIDirectoryServiceProvider { - getFiles(prop: string): nsISimpleEnumerator; -} - -interface nsIDirectoryService extends nsISupports { - init(): void; - registerProvider(prov: nsIDirectoryServiceProvider): void; - unregisterProvider(prov: nsIDirectoryServiceProvider): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIFile.idl - -interface nsIFile extends nsISupports { - readonly NORMAL_FILE_TYPE: 0; - readonly DIRECTORY_TYPE: 1; - readonly OS_READAHEAD: 1073741824; - readonly DELETE_ON_CLOSE: 2147483648; - - append(node: string): void; - normalize(): void; - create(type: u32, permissions: u32, skipAncestors?: boolean): void; - leafName: string; - readonly displayName: string; - hostPath(): Promise; - copyTo(newParentDir: nsIFile, newName: string): void; - copyToFollowingLinks(newParentDir: nsIFile, newName: string): void; - moveTo(newParentDir: nsIFile, newName: string): void; - moveToFollowingLinks(newParentDir: nsIFile, newName: string): void; - renameTo(newParentDir: nsIFile, newName: string): void; - remove(recursive: boolean, removeCount?: InOutParam): void; - permissions: u32; - permissionsOfLink: u32; - lastAccessedTime: PRTime; - lastAccessedTimeOfLink: PRTime; - lastModifiedTime: PRTime; - lastModifiedTimeOfLink: PRTime; - readonly creationTime: PRTime; - readonly creationTimeOfLink: PRTime; - fileSize: i64; - readonly fileSizeOfLink: i64; - readonly target: string; - readonly path: string; - exists(): boolean; - isWritable(): boolean; - isReadable(): boolean; - isExecutable(): boolean; - isHidden(): boolean; - isDirectory(): boolean; - isFile(): boolean; - isSymlink(): boolean; - isSpecial(): boolean; - createUnique(type: u32, permissions: u32): void; - clone(): nsIFile; - equals(inFile: nsIFile): boolean; - contains(inFile: nsIFile): boolean; - readonly parent: nsIFile; - readonly directoryEntries: nsIDirectoryEnumerator; - initWithPath(filePath: string): void; - initWithFile(aFile: nsIFile): void; - readonly diskSpaceAvailable: i64; - readonly diskCapacity: i64; - appendRelativePath(relativeFilePath: string): void; - persistentDescriptor: string; - reveal(): void; - launch(): void; - getRelativeDescriptor(fromFile: nsIFile): string; - setRelativeDescriptor(fromFile: nsIFile, relativeDesc: string): void; - getRelativePath(fromFile: nsIFile): string; - setRelativePath(fromFile: nsIFile, relativeDesc: string): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIIOUtil.idl - -interface nsIIOUtil extends nsISupports { - inputStreamIsBuffered(aStream: nsIInputStream): boolean; - outputStreamIsBuffered(aStream: nsIOutputStream): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStream.idl - -interface nsIInputStream extends nsISupports { - close(): void; - available(): u64; - streamStatus(): void; - isNonBlocking(): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStreamLength.idl - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStreamPriority.idl - -interface nsIInputStreamPriority extends nsISupports { - priority: u32; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStreamTee.idl - -interface nsIInputStreamTee extends nsIInputStream { - source: nsIInputStream; - sink: nsIOutputStream; - eventTarget: nsIEventTarget; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsILineInputStream.idl - -interface nsILineInputStream extends nsISupports { - readLine(aLine: OutParam): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsILocalFileMac.idl - -interface nsILocalFileMac extends nsIFile { - readonly fileSizeWithResFork: i64; - launchWithDoc(aDocToLoad: nsIFile, aLaunchInBackground: boolean): void; - openDocWithApp(aAppToOpenWith: nsIFile, aLaunchInBackground: boolean): void; - isPackage(): boolean; - readonly bundleDisplayName: string; - readonly bundleIdentifier: string; - readonly bundleContentsLastModifiedTime: i64; - hasXAttr(aAttrName: string): boolean; - getXAttr(aAttrName: string): u8[]; - setXAttr(aAttrName: string, aAttrValue: u8[]): void; - delXAttr(aAttrName: string): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsILocalFileWin.idl - -interface nsILocalFileWin extends nsIFile { - initWithCommandLine(aCommandLine: string): void; - getVersionInfoField(aField: string): string; - readOnly: boolean; - useDOSDevicePathSyntax: boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIMultiplexInputStream.idl - -interface nsIMultiplexInputStream extends nsISupports { - readonly count: u32; - appendStream(stream: nsIInputStream): void; - getStream(index: u32): nsIInputStream; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIObjectInputStream.idl - -interface nsIObjectInputStream extends nsIBinaryInputStream { - readObject(aIsStrongRef: boolean): nsISupports; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIObjectOutputStream.idl - -interface nsIObjectOutputStream extends nsIBinaryOutputStream { - writeObject(aObject: nsISupports, aIsStrongRef: boolean): void; - writeSingleRefObject(aObject: nsISupports): void; - writeCompoundObject(aObject: nsISupports, aIID: nsID, aIsStrongRef: boolean): void; - writeID(aID: nsID): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIOutputStream.idl - -interface nsIOutputStream extends nsISupports { - close(): void; - flush(): void; - streamStatus(): void; - write(aBuf: string, aCount: u32): u32; - writeFrom(aFromStream: nsIInputStream, aCount: u32): u32; - isNonBlocking(): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIPipe.idl - -interface nsIPipe extends nsISupports { - init(nonBlockingInput: boolean, nonBlockingOutput: boolean, segmentSize: u32, segmentCount: u32): void; - readonly inputStream: nsIAsyncInputStream; - readonly outputStream: nsIAsyncOutputStream; -} - -interface nsISearchableInputStream extends nsISupports { - search(forString: string, ignoreCase: boolean, found: OutParam, offsetSearchedTo: OutParam): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIRandomAccessStream.idl - -interface nsIRandomAccessStream extends nsISeekableStream { - getInputStream(): nsIInputStream; - getOutputStream(): nsIOutputStream; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsISafeOutputStream.idl - -interface nsISafeOutputStream extends nsISupports { - finish(): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIScriptableBase64Encoder.idl - -interface nsIScriptableBase64Encoder extends nsISupports { - encodeToCString(stream: nsIInputStream, length: u32): string; - encodeToString(stream: nsIInputStream, length: u32): string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIScriptableInputStream.idl - -interface nsIScriptableInputStream extends nsISupports { - close(): void; - init(aInputStream: nsIInputStream): void; - available(): u64; - read(aCount: u32): string; - readBytes(aCount: u32): string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsISeekableStream.idl - -interface nsISeekableStream extends nsITellableStream { - readonly NS_SEEK_SET: 0; - readonly NS_SEEK_CUR: 1; - readonly NS_SEEK_END: 2; - - seek(whence: i32, offset: i64): void; - setEOF(): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIStorageStream.idl - -interface nsIStorageStream extends nsISupports { - init(segmentSize: u32, maxSize: u32): void; - getOutputStream(startPosition: i32): nsIOutputStream; - newInputStream(startPosition: i32): nsIInputStream; - length: u32; - readonly writeInProgress: boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIStreamBufferAccess.idl - -interface nsIStreamBufferAccess extends nsISupports { - disableBuffering(): void; - enableBuffering(): void; - readonly unbufferedStream: nsISupports; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIStringStream.idl - -interface nsIStringInputStream extends nsIInputStream { - setByteStringData(data: string): void; - setUTF8Data(data: string): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsITellableStream.idl - -interface nsITellableStream extends nsISupports { - tell(): i64; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIUnicharInputStream.idl - -interface nsIUnicharInputStream extends nsISupports { - readString(aCount: u32, aString: OutParam): u32; - close(): void; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIUnicharLineInputStream.idl - -interface nsIUnicharLineInputStream extends nsISupports { - readLine(aLine: OutParam): boolean; -} - -// https://searchfox.org/mozilla-central/source/xpcom/io/nsIUnicharOutputStream.idl - -interface nsIUnicharOutputStream extends nsISupports { - write(aCount: u32, c: u16[]): boolean; - writeString(str: string): boolean; - flush(): void; - close(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/search/nsISearchService.idl - -interface nsISearchSubmission extends nsISupports { - readonly postData: nsIInputStream; - readonly uri: nsIURI; -} - -interface nsISearchEngine extends nsISupports { - getSubmission(searchTerms: string, responseType?: string): nsISearchSubmission; - searchTermFromResult(uri: nsIURI): string; - readonly searchUrlQueryParamName: string; - readonly searchUrlPublicSuffix: string; - supportsResponseType(responseType: string): boolean; - getIconURL(preferredWidth?: u16): Promise; - speculativeConnect(options: any): void; - alias: string; - readonly aliases: string[]; - readonly description: string; - hidden: boolean; - hideOneOffButton: boolean; - readonly name: string; - readonly id: string; - readonly telemetryId: string; - readonly identifier: string; - readonly isAppProvided: boolean; - readonly inMemory: boolean; - readonly isGeneralPurposeEngine: boolean; - readonly searchUrlDomain: string; - readonly clickUrl: string; - readonly searchForm: string; -} - -interface nsISearchParseSubmissionResult extends nsISupports { - readonly engine: nsISearchEngine; - readonly terms: string; - readonly termsParameterName: string; -} - -interface nsISearchService extends nsISupports { - readonly ERROR_DOWNLOAD_FAILURE: 1; - readonly ERROR_DUPLICATE_ENGINE: 2; - readonly ERROR_ENGINE_CORRUPTED: 3; - readonly CHANGE_REASON_UNKNOWN: 0; - readonly CHANGE_REASON_USER: 1; - readonly CHANGE_REASON_USER_PRIVATE_SPLIT: 2; - readonly CHANGE_REASON_USER_SEARCHBAR: 3; - readonly CHANGE_REASON_USER_SEARCHBAR_CONTEXT: 4; - readonly CHANGE_REASON_ADDON_INSTALL: 5; - readonly CHANGE_REASON_ADDON_UNINSTALL: 6; - readonly CHANGE_REASON_CONFIG: 7; - readonly CHANGE_REASON_LOCALE: 8; - readonly CHANGE_REASON_REGION: 9; - readonly CHANGE_REASON_EXPERIMENT: 10; - readonly CHANGE_REASON_ENTERPRISE: 11; - readonly CHANGE_REASON_UITOUR: 12; - readonly CHANGE_REASON_ENGINE_UPDATE: 13; - readonly CHANGE_REASON_USER_PRIVATE_PREF_ENABLED: 14; - - init(): Promise; - readonly promiseInitialized: Promise; - readonly isInitialized: boolean; - readonly hasSuccessfullyInitialized: boolean; - runBackgroundChecks(): Promise; - resetToAppDefaultEngine(): Promise; - addOpenSearchEngine(engineURL: string, iconURL: string): Promise; - addUserEngine(name: string, url: string, alias?: string): Promise; - addEnginesFromExtension(extension: any): Promise; - restoreDefaultEngines(): void; - getEngineByAlias(alias: string): Promise; - getEngineByName(aEngineName: string): nsISearchEngine; - getEngineById(aEngineId: string): nsISearchEngine; - getEngines(): Promise; - getVisibleEngines(): Promise; - getAppProvidedEngines(): Promise; - getEnginesByExtensionID(extensionID: string): Promise; - findContextualSearchEngineByHost(host: string): Promise; - shouldShowInstallPrompt(engine: any): Promise; - addSearchEngine(engine: any): Promise; - moveEngine(engine: nsISearchEngine, newIndex: i32): Promise; - removeEngine(engine: nsISearchEngine): Promise; - removeWebExtensionEngine(id: string): Promise; - readonly appDefaultEngine: nsISearchEngine; - readonly appPrivateDefaultEngine: nsISearchEngine; - defaultEngine: nsISearchEngine; - getDefault(): Promise; - setDefault(engine: nsISearchEngine, changeSource: u16): Promise; - defaultPrivateEngine: nsISearchEngine; - getDefaultPrivate(): Promise; - setDefaultPrivate(engine: nsISearchEngine, changeSource: u16): Promise; - readonly separatePrivateDefaultUrlbarResultEnabled: boolean; - maybeSetAndOverrideDefault(extension: any): Promise; - getDefaultEngineInfo(): any; - parseSubmissionURL(url: string): nsISearchParseSubmissionResult; - getAlternateDomains(domain: string): string[]; -} - -// https://searchfox.org/mozilla-central/source/extensions/permissions/nsIRemotePermissionService.idl - -interface nsIRemotePermissionService extends nsISupports { - init(): void; - readonly isInitialized: Promise; - testAllowedPermissionValues: any; -} - -// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsICommandManager.idl - -interface nsICommandManager extends nsISupports { - addCommandObserver(aCommandObserver: nsIObserver, aCommandToObserve: string): void; - removeCommandObserver(aCommandObserver: nsIObserver, aCommandObserved: string): void; - isCommandSupported(aCommandName: string, aTargetWindow: mozIDOMWindowProxy): boolean; - isCommandEnabled(aCommandName: string, aTargetWindow: mozIDOMWindowProxy): boolean; - getCommandState(aCommandName: string, aTargetWindow: mozIDOMWindowProxy, aCommandParams: nsICommandParams): void; - doCommand(aCommandName: string, aCommandParams: nsICommandParams, aTargetWindow: mozIDOMWindowProxy): void; -} - -// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsICommandParams.idl - -interface nsICommandParams extends nsISupports { - readonly eNoType: 0; - readonly eBooleanType: 1; - readonly eLongType: 2; - readonly eDoubleType: 3; - readonly eWStringType: 4; - readonly eISupportsType: 5; - readonly eStringType: 6; - - getValueType(name: string): i16; - getBooleanValue(name: string): boolean; - getLongValue(name: string): i32; - getDoubleValue(name: string): double; - getStringValue(name: string): string; - getCStringValue(name: string): string; - getISupportsValue(name: string): nsISupports; - setBooleanValue(name: string, value: boolean): void; - setLongValue(name: string, value: i32): void; - setDoubleValue(name: string, value: double): void; - setStringValue(name: string, value: string): void; - setCStringValue(name: string, value: string): void; - setISupportsValue(name: string, value: nsISupports): void; - removeValue(name: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsIControllerCommand.idl - -interface nsIControllerCommand extends nsISupports { - isCommandEnabled(aCommandName: string, aCommandContext: nsISupports): boolean; - getCommandStateParams(aCommandName: string, aParams: nsICommandParams, aCommandContext: nsISupports): void; - doCommand(aCommandName: string, aCommandContext: nsISupports): void; - doCommandParams(aCommandName: string, aParams: nsICommandParams, aCommandContext: nsISupports): void; -} - -// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsIControllerCommandTable.idl - -interface nsIControllerCommandTable extends nsISupports { - makeImmutable(): void; - registerCommand(aCommandName: string, aCommand: nsIControllerCommand): void; - unregisterCommand(aCommandName: string, aCommand: nsIControllerCommand): void; - findCommandHandler(aCommandName: string): nsIControllerCommand; - isCommandEnabled(aCommandName: string, aCommandRefCon: nsISupports): boolean; - updateCommandState(aCommandName: string, aCommandRefCon: nsISupports): void; - supportsCommand(aCommandName: string, aCommandRefCon: nsISupports): boolean; - doCommand(aCommandName: string, aCommandRefCon: nsISupports): void; - doCommandParams(aCommandName: string, aParam: nsICommandParams, aCommandRefCon: nsISupports): void; - getCommandState(aCommandName: string, aParam: nsICommandParams, aCommandRefCon: nsISupports): void; - getSupportedCommands(): string[]; -} - -// https://searchfox.org/mozilla-central/source/dom/commandhandler/nsIControllerContext.idl - -interface nsIControllerContext extends nsISupports { - setCommandContext(aCommandContext: nsISupports): void; -} - -// https://searchfox.org/mozilla-central/source/layout/inspector/inIDeepTreeWalker.idl - -interface inIDeepTreeWalker extends nsISupports { - showAnonymousContent: boolean; - showSubDocuments: boolean; - showDocumentsAsNodes: boolean; - init(aRoot: Node): void; - readonly root: Node; - currentNode: Node; - parentNode(): Node; - firstChild(): Node; - lastChild(): Node; - previousSibling(): Node; - nextSibling(): Node; - previousNode(): Node; - nextNode(): Node; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/contentanalysis/nsIContentAnalysis.idl - -} // global - -declare namespace nsIContentAnalysisAcknowledgement { - -enum Result { - eSuccess = 1, - eInvalidResponse = 2, - eTooLate = 3, -} - -enum FinalAction { - eUnspecified = 0, - eAllow = 1, - eReportOnly = 2, - eWarn = 3, - eBlock = 4, -} - -} - -declare global { - -interface nsIContentAnalysisAcknowledgement extends nsISupports, Enums { - readonly result: nsIContentAnalysisAcknowledgement.Result; - readonly finalAction: nsIContentAnalysisAcknowledgement.FinalAction; -} - -} // global - -declare namespace nsIContentAnalysisResponse { - -enum Action { - eUnspecified = 0, - eReportOnly = 1, - eWarn = 2, - eBlock = 3, - eAllow = 1000, - eCanceled = 1001, -} - -enum CancelError { - eUserInitiated = 0, - eNoAgent = 1, - eInvalidAgentSignature = 2, - eErrorOther = 3, - eOtherRequestInGroupCancelled = 4, - eShutdown = 5, -} - -} - -declare global { - -interface nsIContentAnalysisResponse extends nsISupports, Enums { - readonly action: nsIContentAnalysisResponse.Action; - readonly shouldAllowContent: boolean; - readonly cancelError: nsIContentAnalysisResponse.CancelError; - readonly requestToken: string; - readonly isCachedResponse: boolean; - acknowledge(aCaa: nsIContentAnalysisAcknowledgement): void; -} - -interface nsIClientDownloadResource extends nsISupports { - readonly DOWNLOAD_URL: 0; - readonly DOWNLOAD_REDIRECT: 1; - readonly TAB_URL: 2; - readonly TAB_REDIRECT: 3; - readonly PPAPI_DOCUMENT: 4; - readonly PPAPI_PLUGIN: 5; - - readonly url: string; - readonly type: u32; -} - -} // global - -declare namespace nsIContentAnalysisRequest { - -enum AnalysisType { - eUnspecified = 0, - eFileDownloaded = 1, - eFileAttached = 2, - eBulkDataEntry = 3, - ePrint = 4, - eFileTransfer = 5, -} - -enum Reason { - eUnknown = 0, - eClipboardPaste = 1, - eDragAndDrop = 2, - eFilePickerDialog = 3, - ePrintPreviewPrint = 4, - eSystemDialogPrint = 5, - eNormalDownload = 6, - eSaveAsDownload = 7, -} - -enum OperationType { - eCustomDisplayString = 0, - eClipboard = 1, - eDroppedText = 2, - eOperationPrint = 3, -} - -} - -declare global { - -interface nsIContentAnalysisRequest extends nsISupports, Enums { - readonly analysisType: nsIContentAnalysisRequest.AnalysisType; - readonly reason: nsIContentAnalysisRequest.Reason; - readonly operationTypeForDisplay: nsIContentAnalysisRequest.OperationType; - readonly operationDisplayString: string; - readonly textContent: string; - readonly filePath: string; - readonly printDataHandle: u64; - readonly printDataSize: u64; - readonly printerName: string; - readonly url: nsIURI; - readonly sha256Digest: string; - readonly resources: nsIClientDownloadResource[]; - readonly email: string; - readonly requestToken: string; - readonly windowGlobalParent: WindowGlobalParent; -} - -interface nsIContentAnalysisResult extends nsISupports { - readonly shouldAllowContent: boolean; -} - -interface nsIContentAnalysisCallback extends nsISupports { - contentResult(aResult: nsIContentAnalysisResponse): void; - error(aResult: nsresult): void; -} - -interface nsIContentAnalysisDiagnosticInfo extends nsISupports { - readonly connectedToAgent: boolean; - readonly agentPath: string; - readonly failedSignatureVerification: boolean; - readonly requestCount: i64; -} - -interface nsIContentAnalysis extends nsISupports { - readonly isActive: boolean; - readonly mightBeActive: boolean; - isSetByEnterprisePolicy: boolean; - analyzeContentRequest(aCar: nsIContentAnalysisRequest, aAutoAcknowledge: boolean): Promise; - analyzeContentRequestCallback(aCar: nsIContentAnalysisRequest, aAutoAcknowledge: boolean, callback: nsIContentAnalysisCallback): void; - cancelContentAnalysisRequest(aRequestToken: string, aNotifyObservers: boolean): void; - respondToWarnDialog(aRequestToken: string, aAllowContent: boolean): void; - cancelAllRequests(): void; - testOnlySetCACmdLineArg(aVal: boolean): void; - getDiagnosticInfo(): Promise; - getURIForBrowsingContext(aBrowsingContext: BrowsingContext): nsIURI; - getURIForDropEvent(aEvent: DragEvent): nsIURI; - setCachedResponse(aURI: nsIURI, aSequenceNumber: i32, aFlavors: string[], aAction: nsIContentAnalysisResponse.Action): void; - getCachedResponse(aURI: nsIURI, aSequenceNumber: i32, aFlavors: string[], aAction: OutParam, aIsValid: OutParam): void; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/mozIJSSubScriptLoader.idl - -interface mozIJSSubScriptLoader extends nsISupports { - loadSubScript(url: string, obj?: any): any; - loadSubScriptWithOptions(url: string, options: any): any; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/nsIXPCScriptable.idl - -// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/xpcIJSWeakReference.idl - -interface xpcIJSWeakReference extends nsISupports { - get(): any; -} - -// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/xpccomponents.idl - -interface nsIXPCComponents_Classes extends nsISupports { -} - -interface nsIXPCComponents_Results extends nsISupports { -} - -interface nsIXPCComponents_ID extends nsISupports { -} - -interface nsIXPCComponents_Exception extends nsISupports { -} - -interface nsIXPCComponents_Constructor extends nsISupports { -} - -interface nsIXPCComponents_utils_Sandbox extends nsISupports { -} - -type nsIScheduledGCCallback = Callable<{ - callback(): void; -}> - -interface nsIXPCComponents_Utils extends nsISupports { - printStderr(message: string): void; - reportError(error: any, stack?: any): void; - readonly Sandbox: nsIXPCComponents_utils_Sandbox; - evalInSandbox(source: string, sandbox: any, version?: any, filename?: string, lineNo?: i32, enforceFilenameRestrictions?: boolean): any; - getUAWidgetScope(principal: nsIPrincipal): any; - getSandboxMetadata(sandbox: any): any; - setSandboxMetadata(sandbox: any, metadata: any): void; - isESModuleLoaded(aResourceURI: string): boolean; - importGlobalProperties(aPropertyList: any): void; - getWeakReference(obj: any): xpcIJSWeakReference; - forceGC(): void; - forceCC(aListener?: nsICycleCollectorListener): void; - createCCLogger(): nsICycleCollectorListener; - finishCC(): void; - ccSlice(budget: i64): void; - getMaxCCSliceTimeSinceClear(): i32; - clearMaxCCTime(): void; - forceShrinkingGC(): void; - schedulePreciseGC(callback: nsIScheduledGCCallback): void; - schedulePreciseShrinkingGC(callback: nsIScheduledGCCallback): void; - unlinkGhostWindows(): void; - intentionallyLeak(): void; - getJSTestingFunctions(): any; - getFunctionSourceLocation(func: any): any; - callFunctionWithAsyncStack(func: any, stack: nsIStackFrame, asyncCause: string): any; - getGlobalForObject(obj: any): any; - isProxy(vobject: any): boolean; - exportFunction(vfunction: any, vscope: any, voptions?: any): any; - createObjectIn(vobj: any, voptions?: any): any; - makeObjectPropsNormal(vobj: any): void; - isDeadWrapper(obj: any): boolean; - isRemoteProxy(val: any): boolean; - recomputeWrappers(vobj?: any): void; - setWantXrays(vscope: any): void; - dispatch(runnable: any, scope?: any): void; - readonly isInAutomation: boolean; - exitIfInAutomation(): void; - crashIfNotInAutomation(): void; - setGCZeal(zeal: i32): void; - nukeSandbox(obj: any): void; - blockScriptForGlobal(global: any): void; - unblockScriptForGlobal(global: any): void; - isOpaqueWrapper(obj: any): boolean; - isXrayWrapper(obj: any): boolean; - waiveXrays(aVal: any): any; - unwaiveXrays(aVal: any): any; - getClassName(aObj: any, aUnwrap: boolean): string; - getIncumbentGlobal(callback?: any): any; - getDebugName(obj: any): string; - getWatchdogTimestamp(aCategory: string): PRTime; - getJSEngineTelemetryValue(): any; - cloneInto(value: any, scope: any, options?: any): any; - getWebIDLCallerPrincipal(): nsIPrincipal; - getObjectPrincipal(obj: any): nsIPrincipal; - getRealmLocation(obj: any): string; - now(): double; - readUTF8File(file: nsIFile): string; - readUTF8URI(url: nsIURI): string; - createSpellChecker(): nsIEditorSpellCheck; - createCommandLine(args: string[], workingDir: nsIFile, state: u32): nsISupports; - createCommandParams(): nsICommandParams; - createLoadContext(): nsILoadContext; - createPrivateLoadContext(): nsILoadContext; - createPersistentProperties(): nsIPersistentProperties; - createDocumentEncoder(contentType: string): nsIDocumentEncoder; - createHTMLCopyEncoder(): nsIDocumentEncoder; - readonly loadedESModules: string[]; - getModuleImportStack(aLocation: string): string; -} - -interface nsIXPCComponents extends nsISupports { - readonly interfaces: nsIXPCComponents_Interfaces; - readonly results: nsIXPCComponents_Results; - isSuccessCode(result: nsresult): boolean; - readonly classes: nsIXPCComponents_Classes; - readonly stack: nsIStackFrame; - readonly manager: nsIComponentManager; - readonly utils: nsIXPCComponents_Utils; - readonly ID: nsIXPCComponents_ID; - readonly Exception: nsIXPCComponents_Exception; - readonly Constructor: nsIXPCComponents_Constructor; - returnCode: any; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/kvstore/nsIKeyValue.idl - -} // global - -declare namespace nsIKeyValueService { - -enum RecoveryStrategy { - ERROR = 0, - DISCARD = 1, - RENAME = 2, -} - -} - -declare global { - -interface nsIKeyValueService extends nsISupports, Enums { - getOrCreate(callback: nsIKeyValueDatabaseCallback, path: string, name: string): void; - getOrCreateWithOptions(callback: nsIKeyValueDatabaseCallback, path: string, name: string, recoveryStrategy?: nsIKeyValueService.RecoveryStrategy): void; - createImporter(type: string, path: string): nsIKeyValueImporter; -} - -interface nsIKeyValueImportSourceSpec extends nsISupports { - readonly path: string; - addDatabase(name: string): nsIKeyValueDatabaseImportOptions; - addAllDatabases(): nsIKeyValueDatabaseImportOptions; -} - -} // global - -declare namespace nsIKeyValueImporter { - -enum ConflictPolicy { - ERROR_ON_CONFLICT = 0, - IGNORE_ON_CONFLICT = 1, - REPLACE_ON_CONFLICT = 2, -} - -enum CleanupPolicy { - KEEP_AFTER_IMPORT = 0, - DELETE_AFTER_IMPORT = 1, -} - -} - -declare global { - -interface nsIKeyValueImporter extends nsIKeyValueImportSourceSpec, Enums { - readonly type: string; - addPath(path: string): nsIKeyValueImportSourceSpec; - import(callback: nsIKeyValueVoidCallback): void; -} - -interface nsIKeyValueDatabaseImportOptions extends nsISupports { - setConflictPolicy(conflictPolicy: nsIKeyValueImporter.ConflictPolicy): nsIKeyValueDatabaseImportOptions; - setCleanupPolicy(cleanupPolicy: nsIKeyValueImporter.CleanupPolicy): nsIKeyValueDatabaseImportOptions; -} - -interface nsIKeyValueDatabase extends nsISupports { - isEmpty(callback: nsIKeyValueVariantCallback): void; - count(callback: nsIKeyValueVariantCallback): void; - size(callback: nsIKeyValueVariantCallback): void; - put(callback: nsIKeyValueVoidCallback, key: string, value: nsIVariant): void; - writeMany(callback: nsIKeyValueVoidCallback, pairs: nsIKeyValuePair[]): void; - get(callback: nsIKeyValueVariantCallback, key: string, defaultValue?: nsIVariant): void; - has(callback: nsIKeyValueVariantCallback, key: string): void; - delete(callback: nsIKeyValueVoidCallback, key: string): void; - deleteRange(callback: nsIKeyValueVoidCallback, fromKey?: string, toKey?: string): void; - clear(callback: nsIKeyValueVoidCallback): void; - enumerate(callback: nsIKeyValueEnumeratorCallback, fromKey?: string, toKey?: string): void; - close(callback: nsIKeyValueVoidCallback): void; -} - -interface nsIKeyValuePair extends nsISupports { - readonly key: string; - readonly value: nsIVariant; -} - -interface nsIKeyValueEnumerator extends nsISupports { - hasMoreElements(): boolean; - getNext(): nsIKeyValuePair; -} - -interface nsIKeyValueDatabaseCallback extends nsISupports { - resolve(database: nsIKeyValueDatabase): void; - reject(message: string): void; -} - -interface nsIKeyValueEnumeratorCallback extends nsISupports { - resolve(enumerator: nsIKeyValueEnumerator): void; - reject(message: string): void; -} - -interface nsIKeyValuePairCallback extends nsISupports { - resolve(pair: nsIKeyValuePair): void; - reject(message: string): void; -} - -interface nsIKeyValueVariantCallback extends nsISupports { - resolve(result: nsIVariant): void; - reject(message: string): void; -} - -interface nsIKeyValueVoidCallback extends nsISupports { - resolve(): void; - reject(message: string): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShell.idl - -} // global - -declare namespace nsIDocShell { - -enum DocShellEnumeratorDirection { - ENUMERATE_FORWARDS = 0, - ENUMERATE_BACKWARDS = 1, -} - -enum AppType { - APP_TYPE_UNKNOWN = 0, - APP_TYPE_MAIL = 1, - APP_TYPE_EDITOR = 2, -} - -enum BusyFlags { - BUSY_FLAGS_NONE = 0, - BUSY_FLAGS_BUSY = 1, - BUSY_FLAGS_BEFORE_PAGE_LOAD = 2, - BUSY_FLAGS_PAGE_LOADING = 4, -} - -enum LoadCommand { - LOAD_CMD_NORMAL = 1, - LOAD_CMD_RELOAD = 2, - LOAD_CMD_HISTORY = 4, - LOAD_CMD_PUSHSTATE = 8, -} - -} - -declare global { - -interface nsIDocShell extends nsIDocShellTreeItem, Enums { - setCancelContentJSEpoch(aEpoch: i32): void; - addState(aData: any, aTitle: string, aURL: string, aReplace: boolean): void; - prepareForNewContentModel(): void; - setCurrentURIForSessionStore(aURI: nsIURI): void; - readonly docViewer: nsIDocumentViewer; - readonly outerWindowID: u64; - chromeEventHandler: EventTarget; - customUserAgent: string; - cssErrorReportingEnabled: boolean; - allowMetaRedirects: boolean; - allowSubframes: boolean; - allowImages: boolean; - allowMedia: boolean; - allowDNSPrefetch: boolean; - allowWindowControl: boolean; - allowContentRetargeting: boolean; - allowContentRetargetingOnChildren: boolean; - getAllDocShellsInSubtree(aItemType: i32, aDirection: nsIDocShell.DocShellEnumeratorDirection): nsIDocShell[]; - appType: nsIDocShell.AppType; - allowAuth: boolean; - zoom: float; - readonly busyFlags: nsIDocShell.BusyFlags; - loadType: u32; - defaultLoadFlags: nsLoadFlags; - isBeingDestroyed(): boolean; - readonly isExecutingOnLoadHandler: boolean; - layoutHistoryState: nsILayoutHistoryState; - readonly loadURIDelegate: nsILoadURIDelegate; - suspendRefreshURIs(): void; - resumeRefreshURIs(): void; - beginRestore(viewer: nsIDocumentViewer, top: boolean): void; - finishRestore(): void; - clearCachedUserAgent(): void; - clearCachedPlatform(): void; - readonly restoringDocument: boolean; - useErrorPages: boolean; - displayLoadError(aError: nsresult, aURI: nsIURI, aURL: string, aFailedChannel?: nsIChannel): boolean; - readonly failedChannel: nsIChannel; - readonly previousEntryIndex: i32; - readonly loadedEntryIndex: i32; - historyPurged(numEntries: i32): void; - readonly currentDocumentChannel: nsIChannel; - readonly isInUnload: boolean; - exitPrintPreview(): void; - readonly historyID: nsID; - createAboutBlankDocumentViewer(aPrincipal: nsIPrincipal, aPartitionedPrincipal: nsIPrincipal, aCSP?: nsIContentSecurityPolicy): void; - readonly charset: string; - forceEncodingDetection(): void; - now(): DOMHighResTimeStamp; - addWeakPrivacyTransitionObserver(obs: nsIPrivacyTransitionObserver): void; - addWeakReflowObserver(obs: nsIReflowObserver): void; - removeWeakReflowObserver(obs: nsIReflowObserver): void; - readonly isTopLevelContentDocShell: boolean; - readonly asyncPanZoomEnabled: boolean; - readonly mayEnableCharacterEncodingMenu: boolean; - editor: nsIEditor; - readonly editable: boolean; - readonly hasEditingSession: boolean; - makeEditable(inWaitForUriLoad: boolean): void; - getCurrentSHEntry(aEntry: OutParam): boolean; - isCommandEnabled(command: string): boolean; - doCommand(command: string): void; - doCommandWithParams(command: string, aParams: nsICommandParams): void; - readonly hasLoadedNonBlankURI: boolean; - windowDraggingAllowed: boolean; - currentScrollRestorationIsManual: boolean; - getOriginAttributes(): any; - setOriginAttributes(aAttrs: any): void; - readonly editingSession: nsIEditingSession; - readonly browserChild: nsIBrowserChild; - useTrackingProtection: boolean; - setColorMatrix(aMatrix: float[]): void; - readonly isForceReloading: boolean; - getColorMatrix(): float[]; - readonly messageManager: ContentFrameMessageManager; - getHasTrackingContentBlocked(): Promise; - readonly isNavigating: boolean; - synchronizeLayoutHistoryState(): void; - persistLayoutHistoryState(): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShellTreeItem.idl - -interface nsIDocShellTreeItem extends nsISupports { - readonly typeChrome: 0; - readonly typeContent: 1; - readonly typeContentWrapper: 2; - readonly typeChromeWrapper: 3; - readonly typeAll: 2147483647; - - name: string; - nameEquals(name: string): boolean; - readonly itemType: i32; - readonly parent: nsIDocShellTreeItem; - readonly sameTypeParent: nsIDocShellTreeItem; - readonly rootTreeItem: nsIDocShellTreeItem; - readonly sameTypeRootTreeItem: nsIDocShellTreeItem; - readonly treeOwner: nsIDocShellTreeOwner; - readonly childCount: i32; - getChildAt(index: i32): nsIDocShellTreeItem; - readonly browsingContext: BrowsingContext; - readonly domWindow: mozIDOMWindowProxy; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShellTreeOwner.idl - -interface nsIDocShellTreeOwner extends nsISupports { - contentShellAdded(aContentShell: nsIDocShellTreeItem, aPrimary: boolean): void; - contentShellRemoved(aContentShell: nsIDocShellTreeItem): void; - readonly primaryContentShell: nsIDocShellTreeItem; - remoteTabAdded(aTab: nsIRemoteTab, aPrimary: boolean): void; - remoteTabRemoved(aTab: nsIRemoteTab): void; - readonly primaryRemoteTab: nsIRemoteTab; - readonly primaryContentBrowsingContext: BrowsingContext; - sizeShellTo(shell: nsIDocShellTreeItem, cx: i32, cy: i32): void; - getPrimaryContentSize(width: OutParam, height: OutParam): void; - setPrimaryContentSize(width: i32, height: i32): void; - getRootShellSize(width: OutParam, height: OutParam): void; - setRootShellSize(width: i32, height: i32): void; - setPersistence(aPersistPosition: boolean, aPersistSize: boolean, aPersistSizeMode: boolean): void; - getPersistence(aPersistPosition: OutParam, aPersistSize: OutParam, aPersistSizeMode: OutParam): void; - readonly tabCount: u32; - readonly hasPrimaryContent: boolean; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocumentLoaderFactory.idl - -interface nsIDocumentLoaderFactory extends nsISupports { - createInstance(aCommand: string, aChannel: nsIChannel, aLoadGroup: nsILoadGroup, aContentType: string, aContainer: nsIDocShell, aExtraInfo: nsISupports, aDocListenerResult: OutParam): nsIDocumentViewer; - createInstanceForDocument(aContainer: nsISupports, aDocument: Document, aCommand: string): nsIDocumentViewer; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocumentViewer.idl - -} // global - -declare namespace nsIDocumentViewer { - -enum PermitUnloadAction { - ePrompt = 0, - eDontPromptAndDontUnload = 1, - eDontPromptAndUnload = 2, -} - -enum PermitUnloadResult { - eAllowNavigation = 0, - eRequestBlockNavigation = 1, -} - -} - -declare global { - -interface nsIDocumentViewer extends nsISupports, Enums { - readonly eDelayResize: 1; - - container: nsIDocShell; - loadComplete(aStatus: nsresult): void; - permitUnload(aAction?: nsIDocumentViewer.PermitUnloadAction): boolean; - readonly inPermitUnload: boolean; - readonly beforeUnloadFiring: boolean; - pageHide(isUnload: boolean): void; - close(historyEntry: nsISHEntry): void; - destroy(): void; - stop(): void; - readonly DOMDocument: Document; - move(aX: i32, aY: i32): void; - show(): void; - hide(): void; - sticky: boolean; - open(aState: nsISupports, aSHEntry: nsISHEntry): void; - clearHistoryEntry(): void; - setPageModeForTesting(aPageMode: boolean, aPrintSettings: nsIPrintSettings): void; - readonly historyEntry: nsISHEntry; - readonly isTabModalPromptAllowed: boolean; - isHidden: boolean; - readonly deviceFullZoomForTest: float; - authorStyleDisabled: boolean; - getContentSize(maxWidth: i32, maxHeight: i32, prefWidth: i32, width: OutParam, height: OutParam): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIDocumentViewerEdit.idl - -interface nsIDocumentViewerEdit extends nsISupports { - readonly COPY_IMAGE_TEXT: 1; - readonly COPY_IMAGE_HTML: 2; - readonly COPY_IMAGE_DATA: 4; - readonly COPY_IMAGE_ALL: -1; - - clearSelection(): void; - selectAll(): void; - copySelection(): void; - readonly copyable: boolean; - copyLinkLocation(): void; - readonly inLink: boolean; - copyImage(aCopyFlags: i32): void; - readonly inImage: boolean; - getContents(aMimeType: string, aSelectionOnly: boolean): string; - readonly canGetContents: boolean; - setCommandNode(aNode: Node): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsILoadContext.idl - -interface nsILoadContext extends nsISupports { - readonly associatedWindow: mozIDOMWindowProxy; - readonly topWindow: mozIDOMWindowProxy; - readonly topFrameElement: Element; - readonly isContent: boolean; - usePrivateBrowsing: boolean; - readonly useRemoteTabs: boolean; - readonly useRemoteSubframes: boolean; - useTrackingProtection: boolean; - readonly originAttributes: any; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsILoadURIDelegate.idl - -interface nsILoadURIDelegate extends nsISupports { - handleLoadError(aURI: nsIURI, aError: nsresult, aErrorModule: i16): nsIURI; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIPrivacyTransitionObserver.idl - -type nsIPrivacyTransitionObserver = Callable<{ - privateModeChanged(enabled: boolean): void; -}> - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIReflowObserver.idl - -interface nsIReflowObserver extends nsISupports { - reflow(start: DOMHighResTimeStamp, end: DOMHighResTimeStamp): void; - reflowInterruptible(start: DOMHighResTimeStamp, end: DOMHighResTimeStamp): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIRefreshURI.idl - -interface nsIRefreshURI extends nsISupports { - refreshURI(aURI: nsIURI, aPrincipal: nsIPrincipal, aMillis: u32): void; - forceRefreshURI(aURI: nsIURI, aPrincipal: nsIPrincipal, aMillis: u32): void; - cancelRefreshURITimers(): void; - readonly refreshPending: boolean; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsITooltipListener.idl - -interface nsITooltipListener extends nsISupports { - onShowTooltip(aXCoords: i32, aYCoords: i32, aTipText: string, aTipDir: string): void; - onHideTooltip(): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsITooltipTextProvider.idl - -interface nsITooltipTextProvider extends nsISupports { - getNodeText(aNode: Node, aText: OutParam, aDirection: OutParam): boolean; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIURIFixup.idl - -interface nsIURIFixupInfo extends nsISupports { - consumer: BrowsingContext; - preferredURI: nsIURI; - fixedURI: nsIURI; - keywordProviderName: string; - keywordAsSent: string; - schemelessInput: nsILoadInfo.SchemelessInputType; - fixupChangedProtocol: boolean; - fixupCreatedAlternateURI: boolean; - originalInput: string; - postData: nsIInputStream; -} - -interface nsIURIFixup extends nsISupports { - readonly FIXUP_FLAG_NONE: 0; - readonly FIXUP_FLAG_ALLOW_KEYWORD_LOOKUP: 1; - readonly FIXUP_FLAGS_MAKE_ALTERNATE_URI: 2; - readonly FIXUP_FLAG_PRIVATE_CONTEXT: 4; - readonly FIXUP_FLAG_FIX_SCHEME_TYPOS: 8; - - getFixupURIInfo(aURIText: string, aFixupFlags?: u32): nsIURIFixupInfo; - webNavigationFlagsToFixupFlags(aURIText: string, aDocShellFlags: u32): u32; - keywordToURI(aKeyword: string, aIsPrivateContext?: boolean): nsIURIFixupInfo; - forceHttpFixup(aUriString: string): nsIURIFixupInfo; - checkHost(aURI: nsIURI, aListener: nsIDNSListener, aOriginAttributes?: any): void; - isDomainKnown(aDomain: string): boolean; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIWebNavigation.idl - -interface nsIWebNavigation extends nsISupports { - readonly LOAD_FLAGS_MASK: 65535; - readonly LOAD_FLAGS_NONE: 0; - readonly LOAD_FLAGS_IS_REFRESH: 16; - readonly LOAD_FLAGS_IS_LINK: 32; - readonly LOAD_FLAGS_BYPASS_HISTORY: 64; - readonly LOAD_FLAGS_REPLACE_HISTORY: 128; - readonly LOAD_FLAGS_BYPASS_CACHE: 256; - readonly LOAD_FLAGS_BYPASS_PROXY: 512; - readonly LOAD_FLAGS_CHARSET_CHANGE: 1024; - readonly LOAD_FLAGS_STOP_CONTENT: 2048; - readonly LOAD_FLAGS_FROM_EXTERNAL: 4096; - readonly LOAD_FLAGS_FIRST_LOAD: 16384; - readonly LOAD_FLAGS_ALLOW_POPUPS: 32768; - readonly LOAD_FLAGS_BYPASS_CLASSIFIER: 65536; - readonly LOAD_FLAGS_FORCE_ALLOW_COOKIES: 131072; - readonly LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL: 262144; - readonly LOAD_FLAGS_ERROR_LOAD_CHANGES_RV: 524288; - readonly LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP: 1048576; - readonly LOAD_FLAGS_FIXUP_SCHEME_TYPOS: 2097152; - readonly LOAD_FLAGS_FORCE_ALLOW_DATA_URI: 4194304; - readonly LOAD_FLAGS_IS_REDIRECT: 8388608; - readonly LOAD_FLAGS_DISABLE_TRR: 16777216; - readonly LOAD_FLAGS_FORCE_TRR: 33554432; - readonly LOAD_FLAGS_BYPASS_LOAD_URI_DELEGATE: 67108864; - readonly LOAD_FLAGS_USER_ACTIVATION: 134217728; - readonly STOP_NETWORK: 1; - readonly STOP_CONTENT: 2; - readonly STOP_ALL: 3; - - readonly canGoBack: boolean; - readonly canGoBackIgnoringUserInteraction: boolean; - readonly canGoForward: boolean; - goBack(aRequireUserInteraction?: boolean, aUserActivation?: boolean): void; - goForward(aRequireUserInteraction?: boolean, aUserActivation?: boolean): void; - gotoIndex(index: i32, aUserActivation?: boolean): void; - loadURI(aURI: nsIURI, aLoadURIOptions: any): void; - fixupAndLoadURIString(aURIString: string, aLoadURIOptions: any): void; - reload(aReloadFlags: u32): void; - stop(aStopFlags: u32): void; - readonly document: Document; - readonly currentURI: nsIURI; - readonly sessionHistory: nsISupports; - resumeRedirectedLoad(aLoadIdentifier: u64, aHistoryIndex: i32): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIWebNavigationInfo.idl - -interface nsIWebNavigationInfo extends nsISupports { - readonly UNSUPPORTED: 0; - readonly IMAGE: 1; - readonly FALLBACK: 2; - readonly OTHER: 32768; - - isTypeSupported(aType: string): u32; -} - -// https://searchfox.org/mozilla-central/source/docshell/base/nsIWebPageDescriptor.idl - -interface nsIWebPageDescriptor extends nsISupports { - loadPageAsViewSource(otherDocShell: nsIDocShell, aURL: string): void; - readonly currentDescriptor: nsISupports; -} - -// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsCExternalHandlerService.idl - -// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIContentDispatchChooser.idl - -interface nsIContentDispatchChooser extends nsISupports { - handleURI(aHandler: nsIHandlerInfo, aURI: nsIURI, aTriggeringPrincipal: nsIPrincipal, aBrowsingContext: BrowsingContext, aWasTriggeredExternally?: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIExternalHelperAppService.idl - -interface nsIExternalHelperAppService extends nsISupports { - doContent(aMimeContentType: string, aChannel: nsIChannel, aContentContext: nsIInterfaceRequestor, aForceSave: boolean, aWindowContext?: nsIInterfaceRequestor): nsIStreamListener; - createListener(aMimeContentType: string, aChannel: nsIChannel, aContentContext: BrowsingContext, aForceSave: boolean, aWindowContext?: nsIInterfaceRequestor): nsIStreamListener; - applyDecodingForExtension(aExtension: string, aEncodingType: string): boolean; - getPreferredDownloadsDirectory(): nsIFile; -} - -interface nsPIExternalAppLauncher extends nsISupports { - deleteTemporaryFileOnExit(aTemporaryFile: nsIFile): void; - deleteTemporaryPrivateFileWhenPossible(aTemporaryFile: nsIFile): void; -} - -interface nsIHelperAppLauncher extends nsICancelable { - readonly MIMEInfo: nsIMIMEInfo; - readonly source: nsIURI; - readonly suggestedFileName: string; - promptForSaveDestination(): void; - setDownloadToLaunch(aHandleInternally: boolean, aFile: nsIFile): void; - launchLocalFile(): void; - saveDestinationAvailable(aFile: nsIFile, aDialogWasShown?: boolean): void; - setWebProgressListener(aWebProgressListener: nsIWebProgressListener2): void; - readonly targetFile: nsIFile; - readonly targetFileIsExecutable: boolean; - readonly timeDownloadStarted: PRTime; - readonly contentLength: i64; - readonly browsingContextId: u64; -} - -// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIExternalProtocolService.idl - -interface nsIExternalProtocolService extends nsISupports { - externalProtocolHandlerExists(aProtocolScheme: string): boolean; - isExposedProtocol(aProtocolScheme: string): boolean; - getProtocolHandlerInfo(aProtocolScheme: string): nsIHandlerInfo; - getProtocolHandlerInfoFromOS(aProtocolScheme: string, aFound: OutParam): nsIHandlerInfo; - setProtocolHandlerDefaults(aHandlerInfo: nsIHandlerInfo, aOSHandlerExists: boolean): void; - loadURI(aURI: nsIURI, aTriggeringPrincipal?: nsIPrincipal, aRedirectPrincipal?: nsIPrincipal, aBrowsingContext?: BrowsingContext, aWasTriggeredExternally?: boolean, aHasValidUserGestureActivation?: boolean, aNewWindowTarget?: boolean): void; - getApplicationDescription(aScheme: string): string; - isCurrentAppOSDefaultForProtocol(aScheme: string): boolean; -} - -// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIHandlerService.idl - -interface nsIHandlerService extends nsISupports { - asyncInit(): void; - enumerate(): nsISimpleEnumerator; - fillHandlerInfo(aHandlerInfo: nsIHandlerInfo, aOverrideType: string): void; - store(aHandlerInfo: nsIHandlerInfo): void; - exists(aHandlerInfo: nsIHandlerInfo): boolean; - remove(aHandlerInfo: nsIHandlerInfo): void; - getTypeFromExtension(aFileExtension: string): string; - existsForProtocolOS(aProtocolScheme: string): boolean; - existsForProtocol(aProtocolScheme: string): boolean; - getApplicationDescription(aProtocolScheme: string): string; -} - -// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIHelperAppLauncherDialog.idl - -interface nsIHelperAppLauncherDialog extends nsISupports { - readonly REASON_CANTHANDLE: 0; - readonly REASON_SERVERREQUEST: 1; - readonly REASON_TYPESNIFFED: 2; - - show(aLauncher: nsIHelperAppLauncher, aWindowContext: nsIInterfaceRequestor, aReason: u32): void; - promptForSaveToFileAsync(aLauncher: nsIHelperAppLauncher, aWindowContext: nsIInterfaceRequestor, aDefaultFileName: string, aSuggestedFileExtension: string, aForcePrompt: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsISharingHandlerApp.idl - -interface nsISharingHandlerApp extends nsIHandlerApp { - share(data: string, title?: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/media/autoplay/nsIAutoplay.idl - -interface nsIAutoplay extends nsISupports { - readonly ALLOWED: 0; - readonly BLOCKED: 1; - readonly BLOCKED_ALL: 5; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/thumbnails/nsIPageThumbsStorageService.idl - -interface nsIPageThumbsStorageService extends nsISupports { - getLeafNameForURL(aURL: string): string; - readonly path: string; - getFilePathForURL(aURL: string): string; -} - -// https://searchfox.org/mozilla-central/source/dom/media/test/rdd_process_xpcom/nsIRddProcessTest.idl - -interface nsIRddProcessTest extends nsISupports { - testTelemetryProbes(): Promise; - stopProcess(): void; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertOverrideService.idl - -interface nsICertOverride extends nsISupports { - readonly asciiHost: string; - readonly port: i32; - readonly hostPort: string; - readonly fingerprint: string; - readonly originAttributes: any; -} - -interface nsICertOverrideService extends nsISupports { - rememberValidityOverride(aHostName: string, aPort: i32, aOriginAttributes: any, aCert: nsIX509Cert, aTemporary: boolean): void; - hasMatchingOverride(aHostName: string, aPort: i32, aOriginAttributes: any, aCert: nsIX509Cert, aIsTemporary: OutParam): boolean; - clearValidityOverride(aHostName: string, aPort: i32, aOriginAttributes: any): void; - clearAllOverrides(): void; - getOverrides(): nsICertOverride[]; - setDisableAllSecurityChecksAndLetAttackersInterceptMyData(aDisable: boolean): void; - readonly securityCheckDisabled: boolean; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertStorage.idl - -type nsICertStorageCallback = Callable<{ - done(rv: nsresult, result: nsIVariant): void; -}> - -interface nsIRevocationState extends nsISupports { - readonly state: i16; -} - -interface nsIIssuerAndSerialRevocationState extends nsIRevocationState { - readonly issuer: string; - readonly serial: string; -} - -interface nsISubjectAndPubKeyRevocationState extends nsIRevocationState { - readonly subject: string; - readonly pubKey: string; -} - -interface nsICRLiteCoverage extends nsISupports { - readonly b64LogID: string; - readonly minTimestamp: u64; - readonly maxTimestamp: u64; -} - -interface nsICertInfo extends nsISupports { - readonly cert: string; - readonly subject: string; - readonly trust: i16; -} - -interface nsICertStorage extends nsISupports { - readonly DATA_TYPE_REVOCATION: 1; - readonly DATA_TYPE_CERTIFICATE: 2; - readonly DATA_TYPE_CRLITE: 3; - readonly DATA_TYPE_CRLITE_FILTER_FULL: 4; - readonly DATA_TYPE_CRLITE_FILTER_INCREMENTAL: 5; - readonly STATE_UNSET: 0; - readonly STATE_ENFORCE: 1; - readonly STATE_NOT_ENROLLED: 2; - readonly STATE_NOT_COVERED: 3; - readonly STATE_NO_FILTER: 4; - readonly TRUST_INHERIT: 0; - readonly TRUST_ANCHOR: 1; - - hasPriorData(type: u8, callback: nsICertStorageCallback): void; - setRevocations(revocations: nsIRevocationState[], callback: nsICertStorageCallback): void; - getRevocationState(issuer: u8[], serial: u8[], subject: u8[], pubkey: u8[]): i16; - setFullCRLiteFilter(filter: u8[], enrolledIssuers: string[], coverage: nsICRLiteCoverage[], callback: nsICertStorageCallback): void; - addCRLiteStash(stash: u8[], callback: nsICertStorageCallback): void; - addCRLiteDelta(delta: u8[], filename: string, callback: nsICertStorageCallback): void; - addCerts(certs: nsICertInfo[], callback: nsICertStorageCallback): void; - removeCertsByHashes(hashes: string[], callback: nsICertStorageCallback): void; - findCertsBySubject(subject: u8[]): u8[][]; - GetRemainingOperationCount(): i32; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertTree.idl - -interface nsICertTreeItem extends nsISupports { - readonly cert: nsIX509Cert; -} - -interface nsICertTree extends nsITreeView { - loadCertsFromCache(cache: nsIX509Cert[], type: u32): void; - getCert(index: u32): nsIX509Cert; - getTreeItem(index: u32): nsICertTreeItem; - deleteEntryObject(index: u32): void; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertificateDialogs.idl - -interface nsICertificateDialogs extends nsISupports { - confirmDownloadCACert(ctx: nsIInterfaceRequestor, cert: nsIX509Cert, trust: OutParam): boolean; - setPKCS12FilePassword(ctx: nsIInterfaceRequestor, password: OutParam): boolean; - getPKCS12FilePassword(ctx: nsIInterfaceRequestor, password: OutParam): boolean; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIClientAuthDialogService.idl - -type nsIClientAuthDialogCallback = Callable<{ - certificateChosen(cert: nsIX509Cert, rememberDecision: boolean): void; -}> - -interface nsIClientAuthDialogService extends nsISupports { - chooseCertificate(hostname: string, certArray: nsIX509Cert[], loadContext: nsILoadContext, callback: nsIClientAuthDialogCallback): void; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIClientAuthRememberService.idl - -interface nsIClientAuthRememberRecord extends nsISupports { - readonly asciiHost: string; - readonly dbKey: string; - readonly entryKey: string; -} - -interface nsIClientAuthRememberService extends nsISupports { - forgetRememberedDecision(key: string): void; - getDecisions(): nsIClientAuthRememberRecord[]; - rememberDecisionScriptable(aHostName: string, originAttributes: any, aClientCert: nsIX509Cert): void; - hasRememberedDecisionScriptable(aHostName: string, originAttributes: any, aCertDBKey: OutParam): boolean; - clearRememberedDecisions(): void; - deleteDecisionsByHost(aHostName: string, aOriginAttributes: any): void; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIContentSignatureVerifier.idl - -interface nsIContentSignatureVerifier extends nsISupports { - readonly ContentSignatureProdRoot: 1; - readonly ContentSignatureStageRoot: 2; - readonly ContentSignatureDevRoot: 3; - readonly ContentSignatureLocalRoot: 4; - - asyncVerifyContentSignature(aData: string, aContentSignatureHeader: string, aCertificateChain: string, aHostname: string, aTrustedRoot: AppTrustedRoot): Promise; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICryptoHash.idl - -interface nsICryptoHash extends nsISupports { - readonly MD5: 2; - readonly SHA1: 3; - readonly SHA256: 4; - readonly SHA384: 5; - readonly SHA512: 6; - - init(aAlgorithm: u32): void; - initWithString(aAlgorithm: string): void; - update(aData: u8[], aLen: u32): void; - updateFromStream(aStream: nsIInputStream, aLen: u32): void; - finish(aASCII: boolean): string; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIDataStorage.idl - -} // global - -declare namespace nsIDataStorageManager { - -enum DataStorage { - AlternateServices = 0, - ClientAuthRememberList = 1, - SiteSecurityServiceState = 2, -} - -} - -declare global { - -interface nsIDataStorageManager extends nsISupports, Enums { - get(dataStorage: nsIDataStorageManager.DataStorage): nsIDataStorage; -} - -} // global - -declare namespace nsIDataStorage { - -enum DataType { - Persistent = 0, - Private = 1, -} - -} - -declare global { - -interface nsIDataStorage extends nsISupports, Enums { - get(key: string, type: nsIDataStorage.DataType): string; - put(key: string, value: string, type: nsIDataStorage.DataType): void; - remove(key: string, type: nsIDataStorage.DataType): void; - clear(): void; - isReady(): boolean; - getAll(): nsIDataStorageItem[]; -} - -interface nsIDataStorageItem extends nsISupports { - readonly key: string; - readonly value: string; - readonly type: nsIDataStorage.DataType; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsINSSComponent.idl - -interface nsINSSComponent extends nsISupports { - getEnterpriseRoots(): u8[][]; - getEnterpriseRootsPEM(): string; - getEnterpriseIntermediates(): u8[][]; - getEnterpriseIntermediatesPEM(): string; - addEnterpriseIntermediate(intermediateBytes: u8[]): void; - clearSSLExternalAndInternalSessionCache(): void; - asyncClearSSLExternalAndInternalSessionCache(): Promise; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsINSSErrorsService.idl - -interface nsINSSErrorsService extends nsISupports { - readonly ERROR_CLASS_SSL_PROTOCOL: 1; - readonly ERROR_CLASS_BAD_CERT: 2; - readonly NSS_SEC_ERROR_BASE: -8192; - readonly NSS_SEC_ERROR_LIMIT: -7192; - readonly NSS_SSL_ERROR_BASE: -12288; - readonly NSS_SSL_ERROR_LIMIT: -11288; - readonly MOZILLA_PKIX_ERROR_BASE: -16384; - readonly MOZILLA_PKIX_ERROR_LIMIT: -15384; - - isNSSErrorCode(aNSPRCode: i32): boolean; - getXPCOMFromNSSError(aNSPRCode: i32): nsresult; - getErrorMessage(aXPCOMErrorCode: nsresult): string; - getErrorClass(aXPCOMErrorCode: nsresult): u32; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsINSSVersion.idl - -interface nsINSSVersion extends nsISupports { - readonly NSPR_MinVersion: string; - readonly NSS_MinVersion: string; - readonly NSSUTIL_MinVersion: string; - readonly NSSSSL_MinVersion: string; - readonly NSSSMIME_MinVersion: string; - readonly NSPR_Version: string; - readonly NSS_Version: string; - readonly NSSUTIL_Version: string; - readonly NSSSSL_Version: string; - readonly NSSSMIME_Version: string; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIOSKeyStore.idl - -interface nsIOSKeyStore extends nsISupports { - asyncGenerateSecret(label: string): Promise; - asyncSecretAvailable(label: string): Promise; - asyncRecoverSecret(label: string, recoveryPhrase: string): Promise; - asyncDeleteSecret(label: string): Promise; - asyncEncryptBytes(label: string, inBytes: u8[]): Promise; - asyncDecryptBytes(label: string, encryptedBase64Text: string): Promise; - asyncGetRecoveryPhrase(aLabel: string): Promise; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIOSReauthenticator.idl - -interface nsIOSReauthenticator extends nsISupports { - asyncReauthenticateUser(prompt: string, caption: string, parentWindow: mozIDOMWindow): Promise; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPK11Token.idl - -interface nsIPK11Token extends nsISupports { - readonly tokenName: string; - readonly isInternalKeyToken: boolean; - readonly tokenManID: string; - readonly tokenHWVersion: string; - readonly tokenFWVersion: string; - readonly tokenSerialNumber: string; - isLoggedIn(): boolean; - login(force: boolean): void; - logoutSimple(): void; - logoutAndDropAuthenticatedResources(): void; - needsLogin(): boolean; - readonly needsUserInit: boolean; - reset(): void; - checkPassword(password: string): boolean; - initPassword(initialPassword: string): void; - changePassword(oldPassword: string, newPassword: string): void; - readonly hasPassword: boolean; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPK11TokenDB.idl - -interface nsIPK11TokenDB extends nsISupports { - getInternalKeyToken(): nsIPK11Token; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPKCS11Module.idl - -interface nsIPKCS11Module extends nsISupports { - readonly name: string; - readonly libName: string; - listSlots(): nsISimpleEnumerator; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPKCS11ModuleDB.idl - -interface nsIPKCS11ModuleDB extends nsISupports { - deleteModule(moduleName: string): void; - addModule(moduleName: string, libraryFullPath: string, cryptoMechanismFlags: i32, cipherFlags: i32): void; - listModules(): nsISimpleEnumerator; - readonly canToggleFIPS: boolean; - toggleFIPSMode(): void; - readonly isFIPSEnabled: boolean; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPKCS11Slot.idl - -interface nsIPKCS11Slot extends nsISupports { - readonly SLOT_DISABLED: 0; - readonly SLOT_NOT_PRESENT: 1; - readonly SLOT_UNINITIALIZED: 2; - readonly SLOT_NOT_LOGGED_IN: 3; - readonly SLOT_LOGGED_IN: 4; - readonly SLOT_READY: 5; - - readonly name: string; - readonly desc: string; - readonly manID: string; - readonly HWVersion: string; - readonly FWVersion: string; - readonly status: u32; - getToken(): nsIPK11Token; - readonly tokenName: string; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPublicKeyPinningService.idl - -interface nsIPublicKeyPinningService extends nsISupports { - hostHasPins(aURI: nsIURI): boolean; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsISecretDecoderRing.idl - -interface nsISecretDecoderRing extends nsISupports { - encryptString(text: string): string; - asyncEncryptStrings(plaintexts: string[]): Promise; - decryptString(encryptedBase64Text: string): string; - asyncDecryptStrings(encryptedStrings: string[]): Promise; - changePassword(): void; - logout(): void; - logoutAndTeardown(): void; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsISecurityUITelemetry.idl - -interface nsISecurityUITelemetry extends nsISupports { - readonly WARNING_ADDON_ASKING_PREVENTED: 1; - readonly WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH: 2; - readonly WARNING_CONFIRM_ADDON_INSTALL: 3; - readonly WARNING_CONFIRM_ADDON_INSTALL_CLICK_THROUGH: 4; - readonly WARNING_CONFIRM_POST_TO_INSECURE_FROM_SECURE: 9; - readonly WARNING_CONFIRM_POST_TO_INSECURE_FROM_SECURE_CLICK_THROUGH: 10; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsISiteSecurityService.idl - -} // global - -declare namespace nsISiteSecurityService { - -enum ResetStateBy { - ExactDomain = 0, - RootDomain = 1, - BaseDomain = 2, -} - -} - -declare global { - -interface nsISiteSecurityService extends nsISupports, Enums { - readonly Success: 0; - readonly ERROR_UNKNOWN: 1; - readonly ERROR_COULD_NOT_PARSE_HEADER: 3; - readonly ERROR_NO_MAX_AGE: 4; - readonly ERROR_MULTIPLE_MAX_AGES: 5; - readonly ERROR_INVALID_MAX_AGE: 6; - readonly ERROR_MULTIPLE_INCLUDE_SUBDOMAINS: 7; - readonly ERROR_INVALID_INCLUDE_SUBDOMAINS: 8; - readonly ERROR_COULD_NOT_SAVE_STATE: 13; - - processHeader(aSourceURI: nsIURI, aHeader: string, aOriginAttributes?: any, aMaxAge?: OutParam, aIncludeSubdomains?: OutParam, aFailureResult?: OutParam): void; - resetState(aURI: nsIURI, aOriginAttributes?: any, aScope?: nsISiteSecurityService.ResetStateBy): void; - isSecureURI(aURI: nsIURI, aOriginAttributes?: any): boolean; - clearAll(): void; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsITLSSocketControl.idl - -interface nsITLSSocketControl extends nsISupports { - readonly KEY_EXCHANGE_UNKNOWN: -1; - readonly SSL_VERSION_3: 768; - readonly TLS_VERSION_1: 769; - readonly TLS_VERSION_1_1: 770; - readonly TLS_VERSION_1_2: 771; - readonly TLS_VERSION_1_3: 772; - readonly SSL_VERSION_UNKNOWN: -1; - readonly SSL_MAC_UNKNOWN: -1; - readonly SSL_MAC_NULL: 0; - readonly SSL_MAC_MD5: 1; - readonly SSL_MAC_SHA: 2; - readonly SSL_HMAC_MD5: 3; - readonly SSL_HMAC_SHA: 4; - readonly SSL_HMAC_SHA256: 5; - readonly SSL_MAC_AEAD: 6; - - asyncStartTLS(): Promise; - getAlpnEarlySelection(): string; - readonly earlyDataAccepted: boolean; - driveHandshake(): void; - joinConnection(npnProtocol: string, hostname: string, port: i32): boolean; - testJoinConnection(npnProtocol: string, hostname: string, port: i32): boolean; - isAcceptableForHost(hostname: string): boolean; - readonly KEAUsed: i16; - readonly KEAKeyBits: u32; - readonly providerFlags: u32; - readonly SSLVersionUsed: i16; - readonly SSLVersionOffered: i16; - readonly MACAlgorithmUsed: i16; - readonly clientCertSent: boolean; - readonly failedVerification: boolean; - esniTxt: string; - echConfig: string; - readonly retryEchConfig: string; - readonly peerId: string; - readonly securityInfo: nsITransportSecurityInfo; - asyncGetSecurityInfo(): Promise; - claim(): void; - browserId: u64; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsITokenPasswordDialogs.idl - -interface nsITokenPasswordDialogs extends nsISupports { - setPassword(ctx: nsIInterfaceRequestor, token: nsIPK11Token): boolean; -} - -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsITransportSecurityInfo.idl - -} // global - -declare namespace nsITransportSecurityInfo { - -enum OverridableErrorCategory { - ERROR_UNSET = 0, - ERROR_TRUST = 1, - ERROR_DOMAIN = 2, - ERROR_TIME = 3, -} - -} - -declare global { - -interface nsITransportSecurityInfo extends nsISupports, Enums { - readonly SSL_VERSION_3: 0; - readonly TLS_VERSION_1: 1; - readonly TLS_VERSION_1_1: 2; - readonly TLS_VERSION_1_2: 3; - readonly TLS_VERSION_1_3: 4; - readonly CERTIFICATE_TRANSPARENCY_NOT_APPLICABLE: 0; - readonly CERTIFICATE_TRANSPARENCY_POLICY_COMPLIANT: 5; - readonly CERTIFICATE_TRANSPARENCY_POLICY_NOT_ENOUGH_SCTS: 6; - readonly CERTIFICATE_TRANSPARENCY_POLICY_NOT_DIVERSE_SCTS: 7; - - readonly securityState: u32; - readonly errorCode: i32; - readonly errorCodeString: string; - readonly failedCertChain: nsIX509Cert[]; - readonly serverCert: nsIX509Cert; - readonly succeededCertChain: nsIX509Cert[]; - readonly cipherName: string; - readonly keyLength: u32; - readonly secretKeyLength: u32; - readonly keaGroupName: string; - readonly signatureSchemeName: string; - readonly protocolVersion: u16; - readonly certificateTransparencyStatus: u16; - readonly isAcceptedEch: boolean; - readonly isDelegatedCredential: boolean; - readonly overridableErrorCategory: nsITransportSecurityInfo.OverridableErrorCategory; - readonly madeOCSPRequests: boolean; - readonly usedPrivateDNS: boolean; - readonly isExtendedValidation: boolean; +// https://searchfox.org/mozilla-central/source/dom/bindings/nsIScriptError.idl + +interface nsIScriptErrorNote extends nsISupports { + readonly errorMessage: string; + readonly sourceName: string; + readonly sourceId: u32; + readonly lineNumber: u32; + readonly columnNumber: u32; toString(): string; - readonly negotiatedNPN: string; - readonly resumed: boolean; - readonly isBuiltCertChainRootBuiltInRoot: boolean; - readonly peerId: string; } -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIX509Cert.idl +interface nsIScriptError extends nsIConsoleMessage { + readonly errorFlag: 0; + readonly warningFlag: 1; + readonly infoFlag: 8; -interface nsIX509Cert extends nsISupports { - readonly UNKNOWN_CERT: 0; - readonly CA_CERT: 1; - readonly USER_CERT: 2; - readonly EMAIL_CERT: 4; - readonly SERVER_CERT: 8; - readonly ANY_CERT: 65535; + readonly errorMessage: string; + readonly sourceName: string; + readonly sourceId: u32; + readonly lineNumber: u32; + readonly columnNumber: u32; + readonly flags: u32; + readonly category: string; + readonly outerWindowID: u64; + readonly innerWindowID: u64; + readonly isFromPrivateWindow: boolean; + readonly isFromChromeContext: boolean; + readonly isPromiseRejection: boolean; + exception: any; + readonly hasException: boolean; + stack: any; + errorMessageName: string; + readonly notes: nsIArray; + cssSelectors: string; + init(message: string, sourceName: string, lineNumber: u32, columnNumber: u32, flags: u32, category: string, fromPrivateWindow?: boolean, fromChromeContext?: boolean): void; + initWithWindowID(message: string, sourceName: string, lineNumber: u32, columnNumber: u32, flags: u32, category: string, innerWindowID: u64, fromChromeContext?: boolean): void; + initWithSanitizedSource(message: string, sourceName: string, lineNumber: u32, columnNumber: u32, flags: u32, category: string, innerWindowID: u64, fromChromeContext?: boolean): void; + initWithSourceURI(message: string, sourceURI: nsIURI, lineNumber: u32, columnNumber: u32, flags: u32, category: string, innerWindowID: u64, fromChromeContext?: boolean): void; + initSourceId(sourceId: u32): void; +} - readonly emailAddress: string; - getEmailAddresses(): string[]; - containsEmailAddress(aEmailAddress: string): boolean; - readonly subjectName: string; - readonly commonName: string; +// https://searchfox.org/mozilla-central/source/dom/interfaces/events/nsIDOMEventListener.idl + +// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPosition.idl + +interface nsIDOMGeoPosition extends nsISupports { + readonly timestamp: EpochTimeStamp; + readonly coords: nsIDOMGeoPositionCoords; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPositionCallback.idl + +type nsIDOMGeoPositionCallback = Callable<{ + handleEvent(position: nsIDOMGeoPosition): void; +}> + +// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPositionCoords.idl + +interface nsIDOMGeoPositionCoords extends nsISupports { + readonly latitude: double; + readonly longitude: double; + readonly altitude: double; + readonly accuracy: double; + readonly altitudeAccuracy: double; + readonly heading: double; + readonly speed: double; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/geolocation/nsIDOMGeoPositionErrorCallback.idl + +type nsIDOMGeoPositionErrorCallback = Callable<{ + handleEvent(positionError: GeolocationPositionError): void; +}> + +// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsICredentialChooserService.idl + +interface nsICredentialChooserService extends nsISupports { + showCredentialChooser(browsingContext: BrowsingContext, credentials: any[], callback: nsICredentialChosenCallback): void; + cancelCredentialChooser(browsingContext: BrowsingContext): void; + fetchImageToDataURI(window: mozIDOMWindow, uri: nsIURI): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsICredentialChosenCallback.idl + +type nsICredentialChosenCallback = Callable<{ + notify(aChosenID: string): void; +}> + +// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsIIdentityCredentialPromptService.idl + +interface nsIIdentityCredentialPromptService extends nsISupports { + showProviderPrompt(browsingContext: BrowsingContext, identityProviders: any, identityManifests: any): Promise; + showPolicyPrompt(browsingContext: BrowsingContext, identityProvider: any, identityManifest: any, identityClientMetadata: any): Promise; + showAccountListPrompt(browsingContext: BrowsingContext, accountList: any, identityProvider: any, identityManifest: any): Promise; + close(browsingContext: BrowsingContext): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsIIdentityCredentialStorageService.idl + +interface nsIIdentityCredentialStorageService extends nsISupports { + setState(rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, credentialID: string, registered: boolean, allowLogout: boolean): void; + getState(rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, credentialID: string, registered: OutParam, allowLogout: OutParam): void; + delete(rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, credentialID: string): void; + clear(): void; + deleteFromBaseDomain(baseDomain: string): void; + deleteFromPrincipal(rpPrincipal: nsIPrincipal): void; + deleteFromTimeRange(aFrom: PRTime, aTo: PRTime): void; + deleteFromOriginAttributesPattern(aPattern: string): void; +} + +// https://searchfox.org/mozilla-central/source/dom/indexedDB/nsIIDBPermissionsRequest.idl + +interface nsIIDBPermissionsRequest extends nsISupports { + readonly browserElement: Element; + readonly responseObserver: nsIObserver; +} + +// https://searchfox.org/mozilla-central/source/dom/indexedDB/nsIIndexedDatabaseManager.idl + +interface nsIIndexedDatabaseManager extends nsISupports { + doMaintenance(): Promise; +} + +// https://searchfox.org/mozilla-central/source/dom/localstorage/nsILocalStorageManager.idl + +interface nsILocalStorageManager extends nsISupports { + readonly nextGenLocalStorageEnabled: boolean; + preload(aPrincipal: nsIPrincipal): Promise; + isPreloaded(aPrincipal: nsIPrincipal): Promise; + getState(aPrincipal: nsIPrincipal): Promise; +} + +// https://searchfox.org/mozilla-central/source/dom/media/nsIAudioDeviceInfo.idl + +interface nsIAudioDeviceInfo extends nsISupports { + readonly TYPE_UNKNOWN: 0; + readonly TYPE_INPUT: 1; + readonly TYPE_OUTPUT: 2; + readonly STATE_DISABLED: 0; + readonly STATE_UNPLUGGED: 1; + readonly STATE_ENABLED: 2; + readonly PREF_NONE: 0; + readonly PREF_MULTIMEDIA: 1; + readonly PREF_VOICE: 2; + readonly PREF_NOTIFICATION: 4; + readonly PREF_ALL: 15; + readonly FMT_S16LE: 16; + readonly FMT_S16BE: 32; + readonly FMT_F32LE: 4096; + readonly FMT_F32BE: 8192; + + readonly name: string; + readonly groupId: string; + readonly vendor: string; + readonly type: u16; + readonly state: u16; + readonly preferred: u16; + readonly supportedFormat: u16; + readonly defaultFormat: u16; + readonly maxChannels: u32; + readonly defaultRate: u32; + readonly maxRate: u32; + readonly minRate: u32; + readonly maxLatency: u32; + readonly minLatency: u32; +} + +// https://searchfox.org/mozilla-central/source/dom/media/nsIMediaDevice.idl + +interface nsIMediaDevice extends nsISupports { + readonly type: string; + readonly mediaSource: string; + readonly rawId: string; + readonly id: string; + readonly scary: boolean; + readonly canRequestOsLevelPrompt: boolean; + readonly rawName: string; +} + +// https://searchfox.org/mozilla-central/source/dom/media/nsIMediaManager.idl + +interface nsIMediaManagerService extends nsISupports { + readonly STATE_NOCAPTURE: 0; + readonly STATE_CAPTURE_ENABLED: 1; + readonly STATE_CAPTURE_DISABLED: 2; + + readonly activeMediaCaptureWindows: nsIArray; + mediaCaptureWindowState(aWindow: nsIDOMWindow, aCamera: OutParam, aMicrophone: OutParam, aScreenShare: OutParam, aWindowShare: OutParam, aBrowserShare: OutParam, devices: OutParam): void; + sanitizeDeviceIds(sinceWhen: i64): void; +} + +// https://searchfox.org/mozilla-central/source/dom/network/interfaces/nsITCPSocketCallback.idl + +interface nsITCPSocketCallback extends nsISupports { + readonly BUFFER_SIZE: 65536; + + fireErrorEvent(name: string, type: string, errorCode: nsresult): void; + fireDataStringEvent(type: string, data: string): void; + fireDataArrayEvent(type: string, data: u8[]): void; + fireEvent(type: string): void; + updateReadyState(readystate: u32): void; + updateBufferedAmount(bufferedAmount: u32, trackingNumber: u32): void; +} + +// https://searchfox.org/mozilla-central/source/dom/network/interfaces/nsIUDPSocketChild.idl + +interface nsIUDPSocketInternal extends nsISupports { + callListenerOpened(): void; + callListenerConnected(): void; + callListenerClosed(): void; + callListenerReceivedData(host: string, port: u16, data: u8[]): void; + callListenerError(message: string, filename: string, lineNumber: u32): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/notification/nsINotificationStorage.idl + +interface nsINotificationStorageCallback extends nsISupports { + handle(id: string, title: string, dir: string, lang: string, body: string, tag: string, icon: string, data: string, serviceWorkerRegistrationScope: string): void; + done(): void; +} + +interface nsINotificationStorage extends nsISupports { + put(origin: string, id: string, title: string, dir: string, lang: string, body: string, tag: string, icon: string, data: string, serviceWorkerRegistrationScope: string): void; + get(origin: string, tag: string, aCallback: nsINotificationStorageCallback): void; + delete(origin: string, id: string): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentActionResponse.idl + +interface nsIPaymentResponseData extends nsISupports { + readonly GENERAL_RESPONSE: 0; + readonly BASICCARD_RESPONSE: 1; + + readonly type: u32; + init(aType: u32): void; +} + +interface nsIGeneralResponseData extends nsIPaymentResponseData { + readonly data: string; + initData(aData: any): void; +} + +interface nsIBasicCardResponseData extends nsIPaymentResponseData { + readonly cardholderName: string; + readonly cardNumber: string; + readonly expiryMonth: string; + readonly expiryYear: string; + readonly cardSecurityCode: string; + readonly billingAddress: nsIPaymentAddress; + initData(aCardholderName: string, aCardNumber: string, aExpiryMonth: string, aExpiryYear: string, aCardSecurityCode: string, billingAddress: nsIPaymentAddress): void; +} + +interface nsIPaymentActionResponse extends nsISupports { + readonly NO_TYPE: 0; + readonly CANMAKE_ACTION: 2; + readonly SHOW_ACTION: 3; + readonly ABORT_ACTION: 4; + readonly COMPLETE_ACTION: 5; + readonly ABORT_SUCCEEDED: 1; + readonly ABORT_FAILED: 0; + readonly PAYMENT_REJECTED: 0; + readonly PAYMENT_ACCEPTED: 1; + readonly PAYMENT_NOTSUPPORTED: 2; + readonly COMPLETE_SUCCEEDED: 1; + readonly COMPLETE_FAILED: 0; + + readonly requestId: string; + readonly type: u32; +} + +interface nsIPaymentCanMakeActionResponse extends nsIPaymentActionResponse { + readonly result: boolean; + init(aRequestId: string, aResult: boolean): void; +} + +interface nsIPaymentShowActionResponse extends nsIPaymentActionResponse { + readonly acceptStatus: u32; + readonly methodName: string; + readonly data: nsIPaymentResponseData; + readonly payerName: string; + readonly payerEmail: string; + readonly payerPhone: string; + init(aRequestId: string, aAcceptStatus: u32, aMethodName: string, aData: nsIPaymentResponseData, aPayerName: string, aPayerEmail: string, aPayerPhone: string): void; +} + +interface nsIPaymentAbortActionResponse extends nsIPaymentActionResponse { + readonly abortStatus: u32; + init(aRequestId: string, aAbortStatus: u32): void; + isSucceeded(): boolean; +} + +interface nsIPaymentCompleteActionResponse extends nsIPaymentActionResponse { + readonly completeStatus: u32; + init(aRequestId: string, aCompleteStatus: u32): void; + isCompleted(): boolean; +} + +interface nsIMethodChangeDetails extends nsISupports { + readonly GENERAL_DETAILS: 0; + readonly BASICCARD_DETAILS: 1; + + readonly type: u32; + init(aType: u32): void; +} + +interface nsIGeneralChangeDetails extends nsIMethodChangeDetails { + readonly details: string; + initData(aDetails: any): void; +} + +interface nsIBasicCardChangeDetails extends nsIMethodChangeDetails { + readonly billingAddress: nsIPaymentAddress; + initData(billingAddress: nsIPaymentAddress): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentAddress.idl + +interface nsIPaymentAddress extends nsISupports { + readonly country: string; + readonly addressLine: nsIArray; + readonly region: string; + readonly regionCode: string; + readonly city: string; + readonly dependentLocality: string; + readonly postalCode: string; + readonly sortingCode: string; readonly organization: string; - readonly organizationalUnit: string; - readonly sha256Fingerprint: string; - readonly sha1Fingerprint: string; - readonly tokenName: string; - readonly issuerName: string; - readonly serialNumber: string; - readonly issuerCommonName: string; - readonly issuerOrganization: string; - readonly issuerOrganizationUnit: string; - readonly validity: nsIX509CertValidity; - readonly dbKey: string; - readonly displayName: string; - readonly certType: u32; - getRawDER(): u8[]; - getBase64DERString(): string; - readonly sha256SubjectPublicKeyInfoDigest: string; + readonly recipient: string; + readonly phone: string; + init(aCountry: string, aAddressLine: nsIArray, aRegion: string, aRegionCode: string, aCity: string, aDependentLocality: string, aPostalCode: string, aSortingCode: string, aOrganization: string, aRecipient: string, aPhone: string): void; } -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIX509CertDB.idl +// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentRequest.idl + +interface nsIPaymentMethodData extends nsISupports { + readonly supportedMethods: string; + readonly data: any; +} + +interface nsIPaymentCurrencyAmount extends nsISupports { + readonly currency: string; + readonly value: string; +} + +interface nsIPaymentItem extends nsISupports { + readonly label: string; + readonly amount: nsIPaymentCurrencyAmount; + readonly pending: boolean; +} + +interface nsIPaymentDetailsModifier extends nsISupports { + readonly supportedMethods: string; + readonly total: nsIPaymentItem; + readonly additionalDisplayItems: nsIArray; + readonly data: any; +} + +interface nsIPaymentShippingOption extends nsISupports { + readonly id: string; + readonly label: string; + readonly amount: nsIPaymentCurrencyAmount; + selected: boolean; +} + +interface nsIPaymentDetails extends nsISupports { + readonly id: string; + readonly totalItem: nsIPaymentItem; + readonly displayItems: nsIArray; + readonly shippingOptions: nsIArray; + readonly modifiers: nsIArray; + readonly error: string; + readonly shippingAddressErrors: any; + readonly payerErrors: any; + readonly paymentMethodErrors: any; +} + +interface nsIPaymentOptions extends nsISupports { + readonly requestPayerName: boolean; + readonly requestPayerEmail: boolean; + readonly requestPayerPhone: boolean; + readonly requestShipping: boolean; + readonly requestBillingAddress: boolean; + readonly shippingType: string; +} + +interface nsIPaymentRequest extends nsISupports { + readonly topOuterWindowId: u64; + readonly topLevelPrincipal: nsIPrincipal; + readonly requestId: string; + readonly completeStatus: string; + readonly paymentMethods: nsIArray; + readonly paymentDetails: nsIPaymentDetails; + readonly paymentOptions: nsIPaymentOptions; + readonly shippingOption: string; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentRequestService.idl + +interface nsIPaymentRequestService extends nsISupports { + getPaymentRequestById(aRequestId: string): nsIPaymentRequest; + enumerate(): nsISimpleEnumerator; + respondPayment(aResponse: nsIPaymentActionResponse): void; + changeShippingAddress(requestId: string, aAddress: nsIPaymentAddress): void; + changeShippingOption(requestId: string, option: string): void; + changePayerDetail(requestId: string, aPayerName: string, aPayerEmail: string, aPayerPhone: string): void; + changePaymentMethod(requestId: string, aMethodName: string, aMethodDetails: nsIMethodChangeDetails): void; + cleanup(): void; + setTestingUIService(aUIService: nsIPaymentUIService): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/payments/nsIPaymentUIService.idl + +interface nsIPaymentUIService extends nsISupports { + showPayment(requestId: string): void; + abortPayment(requestId: string): void; + completePayment(requestId: string): void; + updatePayment(requestId: string): void; + closePayment(requestId: string): void; +} + +// https://searchfox.org/mozilla-central/source/dom/power/nsIDOMWakeLockListener.idl + +type nsIDOMMozWakeLockListener = Callable<{ + callback(aTopic: string, aState: string): void; +}> + +// https://searchfox.org/mozilla-central/source/dom/power/nsIPowerManagerService.idl + +interface nsIPowerManagerService extends nsISupports { + addWakeLockListener(aListener: nsIDOMMozWakeLockListener): void; + removeWakeLockListener(aListener: nsIDOMMozWakeLockListener): void; + getWakeLockState(aTopic: string): string; + newWakeLock(aTopic: string, aWindow?: mozIDOMWindow): nsIWakeLock; +} + +// https://searchfox.org/mozilla-central/source/dom/power/nsIWakeLock.idl + +interface nsIWakeLock extends nsISupports { + unlock(): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/push/nsIPushErrorReporter.idl + +interface nsIPushErrorReporter extends nsISupports { + readonly ACK_DELIVERED: 0; + readonly ACK_DECRYPTION_ERROR: 1; + readonly ACK_NOT_DELIVERED: 2; + readonly UNSUBSCRIBE_MANUAL: 3; + readonly UNSUBSCRIBE_QUOTA_EXCEEDED: 4; + readonly UNSUBSCRIBE_PERMISSION_REVOKED: 5; + readonly DELIVERY_UNCAUGHT_EXCEPTION: 6; + readonly DELIVERY_UNHANDLED_REJECTION: 7; + readonly DELIVERY_INTERNAL_ERROR: 8; + + reportDeliveryError(messageId: string, reason?: u16): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/push/nsIPushNotifier.idl + +interface nsIPushNotifier extends nsISupports { + notifyPush(scope: string, principal: nsIPrincipal, messageId: string): void; + notifyPushWithData(scope: string, principal: nsIPrincipal, messageId: string, data: u8[]): void; + notifySubscriptionChange(scope: string, principal: nsIPrincipal, oldSubscription?: nsIPushSubscription): void; + notifySubscriptionModified(scope: string, principal: nsIPrincipal): void; + notifyError(scope: string, principal: nsIPrincipal, message: string, flags: u32): void; +} + +interface nsIPushData extends nsISupports { + text(): string; + json(): any; + binary(): u8[]; +} + +interface nsIPushMessage extends nsISupports { + readonly principal: nsIPrincipal; + readonly data: nsIPushData; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/push/nsIPushService.idl + +interface nsIPushSubscription extends nsISupports { + readonly endpoint: string; + readonly pushCount: i64; + readonly lastPush: i64; + readonly quota: i32; + readonly isSystemSubscription: boolean; + readonly p256dhPrivateKey: any; + quotaApplies(): boolean; + isExpired(): boolean; + getKey(name: string): u8[]; +} + +type nsIPushSubscriptionCallback = Callable<{ + onPushSubscription(status: nsresult, subscription: nsIPushSubscription): void; +}> + +type nsIUnsubscribeResultCallback = Callable<{ + onUnsubscribe(status: nsresult, success: boolean): void; +}> + +type nsIPushClearResultCallback = Callable<{ + onClear(status: nsresult): void; +}> + +interface nsIPushService extends nsISupports { + readonly pushTopic: string; + readonly subscriptionChangeTopic: string; + readonly subscriptionModifiedTopic: string; + subscribe(scope: string, principal: nsIPrincipal, callback: nsIPushSubscriptionCallback): void; + subscribeWithKey(scope: string, principal: nsIPrincipal, key: u8[], callback: nsIPushSubscriptionCallback): void; + unsubscribe(scope: string, principal: nsIPrincipal, callback: nsIUnsubscribeResultCallback): void; + getSubscription(scope: string, principal: nsIPrincipal, callback: nsIPushSubscriptionCallback): void; + clearForDomain(domain: string, originAttributesPattern: any, callback: nsIPushClearResultCallback): void; + clearForPrincipal(principal: nsIPrincipal, callback: nsIPushClearResultCallback): void; +} + +interface nsIPushQuotaManager extends nsISupports { + notificationForOriginShown(origin: string): void; + notificationForOriginClosed(origin: string): void; +} + +// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaArtificialFailure.idl } // global -declare namespace nsIAppSignatureInfo { +declare namespace nsIQuotaArtificialFailure { -enum SignatureAlgorithm { - PKCS7_WITH_SHA1 = 0, - PKCS7_WITH_SHA256 = 1, - COSE_WITH_SHA256 = 2, +enum Category { + CATEGORY_NONE = 0, + CATEGORY_INITIALIZE_ORIGIN = 1, + CATEGORY_OPEN_CLIENT_DIRECTORY = 2, + CATEGORY_CREATE_DIRECTORY_METADATA2 = 4, } } declare global { -interface nsIAppSignatureInfo extends nsISupports, Enums { - readonly signerCert: nsIX509Cert; - readonly signatureAlgorithm: nsIAppSignatureInfo.SignatureAlgorithm; +interface nsIQuotaArtificialFailure extends nsISupports, Enums { } -type nsIOpenSignedAppFileCallback = Callable<{ - openSignedAppFileFinished(rv: nsresult, aZipReader: nsIZipReader, aSignatureInfos: nsIAppSignatureInfo[]): void; +// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaCallbacks.idl + +type nsIQuotaUsageCallback = Callable<{ + onUsageResult(aRequest: nsIQuotaUsageRequest): void; }> -type nsIAsyncBoolCallback = Callable<{ - onResult(result: boolean): void; +type nsIQuotaCallback = Callable<{ + onComplete(aRequest: nsIQuotaRequest): void; }> -type nsICertVerificationCallback = Callable<{ - verifyCertFinished(aPRErrorCode: i32, aVerifiedChain: nsIX509Cert[], aHasEVPolicy: boolean): void; -}> +// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaManagerService.idl -interface nsIX509CertDB extends nsISupports { - readonly UNTRUSTED: 0; - readonly TRUSTED_SSL: 1; - readonly TRUSTED_EMAIL: 2; - readonly Success: 0; - readonly ERROR_UNKNOWN: 1; - readonly ERROR_PKCS12_NOSMARTCARD_EXPORT: 2; - readonly ERROR_PKCS12_RESTORE_FAILED: 3; - readonly ERROR_PKCS12_BACKUP_FAILED: 4; - readonly ERROR_PKCS12_CERT_COLLISION: 5; - readonly ERROR_BAD_PASSWORD: 6; - readonly ERROR_DECODE_ERROR: 7; - readonly ERROR_PKCS12_DUPLICATE_DATA: 8; - readonly AppXPCShellRoot: 6; - readonly AddonsPublicRoot: 7; - readonly AddonsStageRoot: 8; - readonly FLAG_LOCAL_ONLY: 1; - readonly FLAG_MUST_BE_EV: 2; - - findCertByDBKey(aDBkey: string): nsIX509Cert; - importCertificates(data: u8[], length: u32, type: u32, ctx: nsIInterfaceRequestor): void; - importEmailCertificate(data: u8[], length: u32, ctx: nsIInterfaceRequestor): void; - importUserCertificate(data: u8[], length: u32, ctx: nsIInterfaceRequestor): void; - deleteCertificate(aCert: nsIX509Cert): void; - setCertTrust(cert: nsIX509Cert, type: u32, trust: u32): void; - setCertTrustFromString(cert: nsIX509Cert, trustString: string): void; - isCertTrusted(cert: nsIX509Cert, certType: u32, trustType: u32): boolean; - importCertsFromFile(aFile: nsIFile, aType: u32): void; - importPKCS12File(aFile: nsIFile, aPassword: string): u32; - exportPKCS12File(aFile: nsIFile, aCerts: nsIX509Cert[], aPassword: string): u32; - constructX509FromBase64(base64: string): nsIX509Cert; - constructX509(certDER: u8[]): nsIX509Cert; - openSignedAppFileAsync(trustedRoot: AppTrustedRoot, aJarFile: nsIFile, callback: nsIOpenSignedAppFileCallback): void; - addCert(certDER: string, trust: string): nsIX509Cert; - asyncVerifyCertAtTime(aCert: nsIX509Cert, aUsage: i64, aFlags: u32, aHostname: string, aTime: u64, aCallback: nsICertVerificationCallback): void; - clearOCSPCache(): void; - addCertFromBase64(base64: string, trust: string): nsIX509Cert; - getCerts(): nsIX509Cert[]; - asPKCS7Blob(certList: nsIX509Cert[]): string; - asyncHasThirdPartyRoots(callback: nsIAsyncBoolCallback): void; - countTrustObjects(): u32; +interface nsIQuotaManagerService extends nsISupports { + storageName(): nsIQuotaRequest; + storageInitialized(): nsIQuotaRequest; + persistentStorageInitialized(): nsIQuotaRequest; + temporaryStorageInitialized(): nsIQuotaRequest; + temporaryGroupInitialized(aPrincipal: nsIPrincipal): nsIQuotaRequest; + persistentOriginInitialized(aPrincipal: nsIPrincipal): nsIQuotaRequest; + temporaryOriginInitialized(aPersistenceType: string, aPrincipal: nsIPrincipal): nsIQuotaRequest; + init(): nsIQuotaRequest; + initializePersistentStorage(): nsIQuotaRequest; + initTemporaryStorage(): nsIQuotaRequest; + initializeTemporaryGroup(aPrincipal: nsIPrincipal): nsIQuotaRequest; + initializePersistentOrigin(aPrincipal: nsIPrincipal): nsIQuotaRequest; + initializeTemporaryOrigin(aPersistenceType: string, aPrincipal: nsIPrincipal, aCreateIfNonExistent?: boolean): nsIQuotaRequest; + initializePersistentClient(aPrincipal: nsIPrincipal, aClientType: string): nsIQuotaRequest; + initializeTemporaryClient(aPersistenceType: string, aPrincipal: nsIPrincipal, aClientType: string): nsIQuotaRequest; + getFullOriginMetadata(aPersistenceType: string, aPrincipal: nsIPrincipal): nsIQuotaRequest; + getUsage(aCallback: nsIQuotaUsageCallback, aGetAll?: boolean): nsIQuotaUsageRequest; + getUsageForPrincipal(aPrincipal: nsIPrincipal, aCallback: nsIQuotaUsageCallback): nsIQuotaUsageRequest; + getCachedUsageForPrincipal(aPrincipal: nsIPrincipal): nsIQuotaRequest; + listOrigins(): nsIQuotaRequest; + listCachedOrigins(): nsIQuotaRequest; + clear(): nsIQuotaRequest; + clearStoragesForPrivateBrowsing(): nsIQuotaRequest; + clearStoragesForOriginAttributesPattern(aPattern: string): nsIQuotaRequest; + clearStoragesForPrincipal(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; + clearStoragesForClient(aPrincipal: nsIPrincipal, aClientType: string, aPersistenceType?: string): nsIQuotaRequest; + clearStoragesForOriginPrefix(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; + reset(): nsIQuotaRequest; + resetStoragesForPrincipal(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; + resetStoragesForClient(aPrincipal: nsIPrincipal, aClientType: string, aPersistenceType?: string): nsIQuotaRequest; + persisted(aPrincipal: nsIPrincipal): nsIQuotaRequest; + persist(aPrincipal: nsIPrincipal): nsIQuotaRequest; + estimate(aPrincipal: nsIPrincipal): nsIQuotaRequest; } -// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIX509CertValidity.idl +// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaManagerServiceInternal.idl -interface nsIX509CertValidity extends nsISupports { - readonly notBefore: PRTime; - readonly notAfter: PRTime; +interface nsIQuotaManagerServiceInternal extends nsISupports { + setThumbnailPrivateIdentityId(aThumbnailPrivateIdentityId: u32): void; } -// https://searchfox.org/mozilla-central/source/extensions/spellcheck/idl/mozIPersonalDictionary.idl +// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaRequests.idl -interface mozIPersonalDictionary extends nsISupports { - load(): void; - save(): void; - readonly wordList: nsIStringEnumerator; - check(word: string): boolean; - addWord(word: string): void; - removeWord(word: string): void; - ignoreWord(word: string): void; - endSession(): void; +interface nsIQuotaRequestBase extends nsISupports { + readonly principal: nsIPrincipal; + readonly resultCode: nsresult; + readonly resultName: string; } -// https://searchfox.org/mozilla-central/source/extensions/spellcheck/idl/mozISpellCheckingEngine.idl - -interface mozISpellCheckingEngine extends nsISupports { - dictionaries: string[]; - personalDictionary: mozIPersonalDictionary; - getDictionaryList(): string[]; - check(word: string): boolean; - suggest(word: string): string[]; - loadDictionariesFromDir(dir: nsIFile): void; - addDirectory(dir: nsIFile): void; - removeDirectory(dir: nsIFile): void; - addDictionary(lang: string, file: nsIURI): void; - removeDictionary(lang: string, file: nsIURI): boolean; +interface nsIQuotaUsageRequest extends nsIQuotaRequestBase { + readonly result: nsIVariant; + callback: nsIQuotaUsageCallback; + cancel(): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/cleardata/nsIClearBySiteEntry.idl - -interface nsIClearBySiteEntry extends nsISupports { - schemelessSite: string; - patternJSON: string; +interface nsIQuotaRequest extends nsIQuotaRequestBase { + readonly result: nsIVariant; + callback: nsIQuotaCallback; } -// https://searchfox.org/mozilla-central/source/toolkit/components/cleardata/nsIClearDataService.idl +// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaResults.idl -interface nsIClearDataService extends nsISupports { - readonly CLEAR_COOKIES: 1; - readonly CLEAR_NETWORK_CACHE: 2; - readonly CLEAR_IMAGE_CACHE: 4; - readonly CLEAR_JS_CACHE: 8; - readonly CLEAR_DOWNLOADS: 16; - readonly CLEAR_MEDIA_DEVICES: 64; - readonly CLEAR_DOM_QUOTA: 128; - readonly CLEAR_PREDICTOR_NETWORK_DATA: 256; - readonly CLEAR_DOM_PUSH_NOTIFICATIONS: 512; - readonly CLEAR_HISTORY: 1024; - readonly CLEAR_MESSAGING_LAYER_SECURITY_STATE: 2048; - readonly CLEAR_AUTH_TOKENS: 4096; - readonly CLEAR_AUTH_CACHE: 8192; - readonly CLEAR_SITE_PERMISSIONS: 16384; - readonly CLEAR_CONTENT_PREFERENCES: 32768; - readonly CLEAR_HSTS: 65536; - readonly CLEAR_EME: 131072; - readonly CLEAR_REPORTS: 262144; - readonly CLEAR_STORAGE_ACCESS: 524288; - readonly CLEAR_CERT_EXCEPTIONS: 1048576; - readonly CLEAR_CONTENT_BLOCKING_RECORDS: 2097152; - readonly CLEAR_CSS_CACHE: 4194304; - readonly CLEAR_PREFLIGHT_CACHE: 8388608; - readonly CLEAR_CLIENT_AUTH_REMEMBER_SERVICE: 16777216; - readonly CLEAR_CREDENTIAL_MANAGER_STATE: 33554432; - readonly CLEAR_COOKIE_BANNER_EXCEPTION: 67108864; - readonly CLEAR_COOKIE_BANNER_EXECUTED_RECORD: 134217728; - readonly CLEAR_FINGERPRINTING_PROTECTION_STATE: 268435456; - readonly CLEAR_BOUNCE_TRACKING_PROTECTION_STATE: 536870912; - readonly CLEAR_STORAGE_PERMISSIONS: 1073741824; - readonly CLEAR_SHUTDOWN_EXCEPTIONS: 2147483648; - readonly CLEAR_ALL: 4294967295; - readonly CLEAR_PERMISSIONS: 2147500032; - readonly CLEAR_ALL_CACHES: 12648462; - readonly CLEAR_DOM_STORAGES: 262784; - readonly CLEAR_FORGET_ABOUT_SITE: 3218591647; - readonly CLEAR_COOKIES_AND_SITE_DATA: 2013739649; - readonly CLEAR_STATE_FOR_TRACKER_PURGING: 2043624143; - - deleteDataFromLocalFiles(aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; - deleteDataFromHost(aHost: string, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; - deleteDataFromSite(aSchemelessSite: string, aOriginAttributesPattern: any, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; - deleteDataFromSiteAndOriginAttributesPatternString(aSchemelessSite: string, aOriginAttributesPatternString: string, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; - deleteDataFromPrincipal(aPrincipal: nsIPrincipal, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; - deleteDataInTimeRange(aFrom: PRTime, aTo: PRTime, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; - deleteData(aFlags: u32, aCallback: nsIClearDataCallback): void; - deleteDataFromOriginAttributesPattern(aOriginAttributesPattern: any, aCallback?: nsIClearDataCallback): void; - deleteUserInteractionForClearingHistory(aPrincipalsWithStorage: nsIPrincipal[], aFrom?: PRTime, aCallback?: nsIClearDataCallback): void; - cleanupAfterDeletionAtShutdown(aFlags: u32, aCallback: nsIClearDataCallback): void; - hostMatchesSite(aHost: string, aOriginAttributes: any, aSchemelessSite: string, aOriginAttributesPattern?: any): boolean; +interface nsIQuotaFullOriginMetadataResult extends nsISupports { + readonly suffix: string; + readonly group: string; + readonly origin: string; + readonly storageOrigin: string; + readonly persistenceType: string; + readonly persisted: boolean; + readonly lastAccessTime: i64; } -type nsIClearDataCallback = Callable<{ - onDataDeleted(aFailedFlags: u32): void; -}> - -// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIFingerprintingWebCompatService.idl - -interface nsIFingerprintingOverride extends nsISupports { - readonly firstPartyDomain: string; - readonly thirdPartyDomain: string; - readonly overrides: string; +interface nsIQuotaUsageResult extends nsISupports { + readonly origin: string; + readonly persisted: boolean; + readonly usage: u64; + readonly lastAccessed: u64; } -interface nsIFingerprintingWebCompatService extends nsISupports { - init(): void; - shutdown(): void; +interface nsIQuotaOriginUsageResult extends nsISupports { + readonly databaseUsage: u64; + readonly fileUsage: u64; + readonly usage: u64; + readonly databaseUsageIsExplicit: boolean; + readonly fileUsageIsExplicit: boolean; + readonly totalUsageIsExplicit: boolean; } -// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIRFPService.idl - -interface nsIRFPService extends nsISupports { - setFingerprintingOverrides(aOverrides: nsIFingerprintingOverride[]): void; - getFingerprintingOverrides(aDomainKey: string): nsIRFPTargetSetIDL; - cleanAllOverrides(): void; - readonly enabledFingerprintingProtections: nsIRFPTargetSetIDL; - cleanAllRandomKeys(): void; - cleanRandomKeyByPrincipal(aPrincipal: nsIPrincipal): void; - cleanRandomKeyBySite(aSchemelessSite: string, originAttributes: any): void; - cleanRandomKeyByHost(aHost: string, aPattern: string): void; - cleanRandomKeyByOriginAttributesPattern(aPattern: string): void; - testGenerateRandomKey(aChannel: nsIChannel): u8[]; +interface nsIQuotaEstimateResult extends nsISupports { + readonly usage: u64; + readonly limit: u64; } -// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIRFPTargetSetIDL.idl +// https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaUtilsService.idl -interface nsIRFPTargetSetIDL extends nsISupports { - low: u64; - high: u64; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIUserCharacteristicsPageService.idl - -interface nsIUserCharacteristicsPageService extends nsISupports { - createContentPage(principal: nsIPrincipal): Promise; - pageLoaded(browsingContext: BrowsingContext, data: any): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLine.idl - -interface nsICommandLine extends nsISupports { - readonly STATE_INITIAL_LAUNCH: 0; - readonly STATE_REMOTE_AUTO: 1; - readonly STATE_REMOTE_EXPLICIT: 2; - - readonly length: i32; - getArgument(aIndex: i32): string; - findFlag(aFlag: string, aCaseSensitive: boolean): i32; - removeArguments(aStart: i32, aEnd: i32): void; - handleFlag(aFlag: string, aCaseSensitive: boolean): boolean; - handleFlagWithParam(aFlag: string, aCaseSensitive: boolean): string; - readonly state: u32; - preventDefault: boolean; - readonly workingDirectory: nsIFile; - resolveFile(aArgument: string): nsIFile; - resolveURI(aArgument: string): nsIURI; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineHandler.idl - -interface nsICommandLineHandler extends nsISupports { - handle(aCommandLine: nsICommandLine): void; - readonly helpInfo: string; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineRunner.idl - -// https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineValidator.idl - -interface nsICommandLineValidator extends nsISupports { - validate(aCommandLine: nsICommandLine): void; +interface nsIQuotaUtilsService extends nsISupports { + getPrivateIdentityId(aName: string): u32; } // https://searchfox.org/mozilla-central/source/dom/interfaces/security/nsIContentSecurityManager.idl @@ -9145,6 +3830,817 @@ interface nsIHttpsOnlyModePermission extends nsISupports { readonly HTTPSFIRST_LOAD_INSECURE_ALLOW: 10; } +// https://searchfox.org/mozilla-central/source/dom/serializers/nsIDocumentEncoder.idl + +interface nsIDocumentEncoderNodeFixup extends nsISupports { + fixupNode(aNode: Node, aSerializeCloneKids: OutParam): Node; +} + +interface nsIDocumentEncoder extends nsISupports { + readonly OutputSelectionOnly: 1; + readonly OutputFormatted: 2; + readonly OutputRaw: 4; + readonly OutputBodyOnly: 8; + readonly OutputPreformatted: 16; + readonly OutputWrap: 32; + readonly OutputFormatFlowed: 64; + readonly OutputAbsoluteLinks: 128; + readonly OutputCRLineBreak: 512; + readonly OutputLFLineBreak: 1024; + readonly OutputNoScriptContent: 2048; + readonly OutputNoFramesContent: 4096; + readonly OutputNoFormattingInPre: 8192; + readonly OutputEncodeBasicEntities: 16384; + readonly OutputPersistNBSP: 131072; + readonly OutputDontRewriteEncodingDeclaration: 262144; + readonly SkipInvisibleContent: 524288; + readonly OutputFormatDelSp: 1048576; + readonly OutputDropInvisibleBreak: 2097152; + readonly OutputIgnoreMozDirty: 4194304; + readonly OutputForPlainTextClipboardCopy: 33554432; + readonly OutputRubyAnnotation: 67108864; + readonly OutputDisallowLineBreaking: 134217728; + readonly RequiresReinitAfterOutput: 268435456; + readonly AllowCrossShadowBoundary: 536870912; + + init(aDocument: Document, aMimeType: string, aFlags: u32): void; + setSelection(aSelection: Selection): void; + setRange(aRange: Range): void; + setNode(aNode: Node): void; + setContainerNode(aContainer: Node): void; + setCharset(aCharset: string): void; + setWrapColumn(aWrapColumn: u32): void; + readonly mimeType: string; + encodeToStream(aStream: nsIOutputStream): void; + encodeToString(): string; + encodeToStringWithContext(aContextString: OutParam, aInfoString: OutParam): string; + encodeToStringWithMaxLength(aMaxLength: u32): string; + setNodeFixup(aFixup: nsIDocumentEncoderNodeFixup): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/sidebar/nsIWebProtocolHandlerRegistrar.idl + +interface nsIWebProtocolHandlerRegistrar extends nsISupports { + registerProtocolHandler(protocol: string, uri: nsIURI, title: string, documentURI: nsIURI, windowOrBrowser: nsISupports): void; + removeProtocolHandler(protocol: string, uri: string): void; +} + +// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBCallbacks.idl + +type nsISDBCallback = Callable<{ + onComplete(aRequest: nsISDBRequest): void; +}> + +type nsISDBCloseCallback = Callable<{ + onClose(aConnection: nsISDBConnection): void; +}> + +// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBConnection.idl + +interface nsISDBConnection extends nsISupports { + init(aPrincipal: nsIPrincipal, aPersistenceType?: string): void; + open(aName: string): nsISDBRequest; + seek(offset: u64): nsISDBRequest; + read(size: u64): nsISDBRequest; + write(value: any): nsISDBRequest; + close(): nsISDBRequest; + closeCallback: nsISDBCloseCallback; +} + +// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBRequest.idl + +interface nsISDBRequest extends nsISupports { + readonly result: nsIVariant; + readonly resultCode: nsresult; + readonly resultName: string; + callback: nsISDBCallback; +} + +// https://searchfox.org/mozilla-central/source/dom/simpledb/nsISDBResults.idl + +interface nsISDBResult extends nsISupports { + getAsArray(): u8[]; + getAsArrayBuffer(): any; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/storage/nsIDOMStorageManager.idl + +interface nsIDOMStorageManager extends nsISupports { + precacheStorage(aPrincipal: nsIPrincipal, aStoragePrincipal: nsIPrincipal): Storage; + createStorage(aWindow: mozIDOMWindow, aPrincipal: nsIPrincipal, aStoragePrincipal: nsIPrincipal, aDocumentURI: string, aPrivate?: boolean): Storage; + getStorage(aWindow: mozIDOMWindow, aPrincipal: nsIPrincipal, aStoragePrincipal: nsIPrincipal, aPrivate?: boolean): Storage; + cloneStorage(aStorageToCloneFrom: Storage): void; + checkStorage(aPrincipal: nsIPrincipal, aStorage: Storage): boolean; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/storage/nsIStorageActivityService.idl + +interface nsIStorageActivityService extends nsISupports { + getActiveOrigins(from: PRTime, to: PRTime): nsIArray; + moveOriginInTime(origin: nsIPrincipal, when: PRTime): void; + testOnlyReset(): void; +} + +// https://searchfox.org/mozilla-central/source/dom/storage/nsISessionStorageService.idl + +interface nsISessionStorageService extends nsISupports { + clearStoragesForOrigin(aPrincipal: nsIPrincipal): void; +} + +// https://searchfox.org/mozilla-central/source/dom/system/nsIOSPermissionRequest.idl + +interface nsIOSPermissionRequest extends nsISupports { + readonly PERMISSION_STATE_NOTDETERMINED: 0; + readonly PERMISSION_STATE_RESTRICTED: 1; + readonly PERMISSION_STATE_DENIED: 2; + readonly PERMISSION_STATE_AUTHORIZED: 3; + + getMediaCapturePermissionState(aVideo: OutParam, aAudio: OutParam): void; + getAudioCapturePermissionState(aAudio: OutParam): void; + getVideoCapturePermissionState(aVideo: OutParam): void; + getScreenCapturePermissionState(aScreen: OutParam): void; + requestVideoCapturePermission(): Promise; + requestAudioCapturePermission(): Promise; + maybeRequestScreenCapturePermission(): void; +} + +// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnArgs.idl + +// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnAttObj.idl + +// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnPromise.idl + +// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnResult.idl + +// https://searchfox.org/mozilla-central/source/dom/webauthn/nsIWebAuthnService.idl + +interface nsICredentialParameters extends nsISupports { + readonly credentialId: string; + readonly isResidentCredential: boolean; + readonly rpId: string; + readonly privateKey: string; + readonly userHandle: string; + readonly signCount: u32; +} + +interface nsIWebAuthnAutoFillEntry extends nsISupports { + readonly PROVIDER_UNKNOWN: 0; + readonly PROVIDER_TEST_TOKEN: 1; + readonly PROVIDER_PLATFORM_WINDOWS: 2; + readonly PROVIDER_PLATFORM_MACOS: 3; + readonly PROVIDER_PLATFORM_ANDROID: 4; + + readonly provider: u8; + readonly userName: string; + readonly rpId: string; + readonly credentialId: u8[]; +} + +interface nsIWebAuthnService extends nsISupports { + readonly isUVPAA: boolean; + cancel(aTransactionId: u64): void; + hasPendingConditionalGet(aBrowsingContextId: u64, aOrigin: string): u64; + getAutoFillEntries(aTransactionId: u64): nsIWebAuthnAutoFillEntry[]; + selectAutoFillEntry(aTransactionId: u64, aCredentialId: u8[]): void; + resumeConditionalGet(aTransactionId: u64): void; + pinCallback(aTransactionId: u64, aPin: string): void; + setHasAttestationConsent(aTransactionId: u64, aHasConsent: boolean): void; + selectionCallback(aTransactionId: u64, aIndex: u64): void; + addVirtualAuthenticator(protocol: string, transport: string, hasResidentKey: boolean, hasUserVerification: boolean, isUserConsenting: boolean, isUserVerified: boolean): u64; + removeVirtualAuthenticator(authenticatorId: u64): void; + addCredential(authenticatorId: u64, credentialId: string, isResidentCredential: boolean, rpId: string, privateKey: string, userHandle: string, signCount: u32): void; + getCredentials(authenticatorId: u64): nsICredentialParameters[]; + removeCredential(authenticatorId: u64, credentialId: string): void; + removeAllCredentials(authenticatorId: u64): void; + setUserVerified(authenticatorId: u64, isUserVerified: boolean): void; + listen(): void; + runCommand(aCommand: string): void; +} + +// https://searchfox.org/mozilla-central/source/dom/media/webspeech/recognition/nsISpeechRecognitionService.idl + +// https://searchfox.org/mozilla-central/source/dom/media/webspeech/synth/nsISpeechService.idl + +interface nsISpeechTaskCallback extends nsISupports { + onPause(): void; + onResume(): void; + onCancel(): void; + onVolumeChanged(aVolume: float): void; +} + +interface nsISpeechTask extends nsISupports { + setup(aCallback: nsISpeechTaskCallback): void; + dispatchStart(): void; + dispatchEnd(aElapsedTime: float, aCharIndex: u32): void; + dispatchPause(aElapsedTime: float, aCharIndex: u32): void; + dispatchResume(aElapsedTime: float, aCharIndex: u32): void; + dispatchError(aElapsedTime: float, aCharIndex: u32): void; + dispatchBoundary(aName: string, aElapsedTime: float, aCharIndex: u32, aCharLength?: u32): void; + dispatchMark(aName: string, aElapsedTime: float, aCharIndex: u32): void; +} + +interface nsISpeechService extends nsISupports { + speak(aText: string, aUri: string, aVolume: float, aRate: float, aPitch: float, aTask: nsISpeechTask): void; +} + +// https://searchfox.org/mozilla-central/source/dom/media/webspeech/synth/nsISynthVoiceRegistry.idl + +interface nsISynthVoiceRegistry extends nsISupports { + addVoice(aService: nsISpeechService, aUri: string, aName: string, aLang: string, aLocalService: boolean, aQueuesUtterances: boolean): void; + removeVoice(aService: nsISpeechService, aUri: string): void; + notifyVoicesChanged(): void; + notifyVoicesError(aError: string): void; + setDefaultVoice(aUri: string, aIsDefault: boolean): void; + readonly voiceCount: u32; + getVoice(aIndex: u32): string; + isDefaultVoice(aUri: string): boolean; + isLocalVoice(aUri: string): boolean; + getVoiceLang(aUri: string): string; + getVoiceName(aUri: string): string; +} + +// https://searchfox.org/mozilla-central/source/dom/workers/nsIWorkerChannelInfo.idl + +interface nsIWorkerChannelLoadInfo extends nsISupports { + workerAssociatedBrowsingContextID: u64; + readonly workerAssociatedBrowsingContext: BrowsingContext; +} + +interface nsIWorkerChannelInfo extends nsISupports { + loadInfo: nsIWorkerChannelLoadInfo; + readonly channelId: u64; +} + +// https://searchfox.org/mozilla-central/source/dom/workers/nsIWorkerDebugger.idl + +interface nsIWorkerDebuggerListener extends nsISupports { + onClose(): void; + onError(filename: string, lineno: u32, message: string): void; + onMessage(message: string): void; +} + +interface nsIWorkerDebugger extends nsISupports { + readonly TYPE_DEDICATED: 0; + readonly TYPE_SHARED: 1; + readonly TYPE_SERVICE: 2; + + readonly isClosed: boolean; + readonly isChrome: boolean; + readonly isInitialized: boolean; + readonly parent: nsIWorkerDebugger; + readonly type: u32; + readonly url: string; + readonly window: mozIDOMWindow; + readonly windowIDs: u64[]; + readonly principal: nsIPrincipal; + readonly serviceWorkerID: u32; + readonly id: string; + readonly name: string; + initialize(url: string): void; + postMessage(message: string): void; + addListener(listener: nsIWorkerDebuggerListener): void; + removeListener(listener: nsIWorkerDebuggerListener): void; + setDebuggerReady(ready: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/dom/workers/nsIWorkerDebuggerManager.idl + +interface nsIWorkerDebuggerManagerListener extends nsISupports { + onRegister(aDebugger: nsIWorkerDebugger): void; + onUnregister(aDebugger: nsIWorkerDebugger): void; +} + +interface nsIWorkerDebuggerManager extends nsISupports { + getWorkerDebuggerEnumerator(): nsISimpleEnumerator; + addListener(listener: nsIWorkerDebuggerManagerListener): void; + removeListener(listener: nsIWorkerDebuggerManagerListener): void; +} + +// https://searchfox.org/mozilla-central/source/dom/xslt/xslt/txIEXSLTFunctions.idl + +interface txIEXSLTFunctions extends nsISupports { + match(str: string, regex: string, flags: string, doc: Document): DocumentFragment; + replace(str: string, regex: string, flags: string, replace: string): string; + test(str: string, regex: string, flags: string): boolean; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULButtonElement.idl + +interface nsIDOMXULButtonElement extends nsIDOMXULControlElement { + type: string; + open: boolean; + checked: boolean; + group: string; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl + +interface nsIDOMXULCommandDispatcher extends nsISupports { + focusedElement: Element; + focusedWindow: mozIDOMWindowProxy; + addCommandUpdater(updater: Element, events: string, targets: string): void; + removeCommandUpdater(updater: Element): void; + updateCommands(eventName: string): void; + getControllerForCommand(command: string): nsIController; + getControllers(): nsIControllers; + advanceFocus(): void; + rewindFocus(): void; + advanceFocusIntoSubtree(elt: Element): void; + lock(): void; + unlock(): void; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULContainerElement.idl + +interface nsIDOMXULContainerItemElement extends nsISupports { + readonly parentContainer: Element; +} + +interface nsIDOMXULContainerElement extends nsIDOMXULContainerItemElement { +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULControlElement.idl + +interface nsIDOMXULControlElement extends nsISupports { + disabled: boolean; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULMenuListElement.idl + +interface nsIDOMXULMenuListElement extends nsIDOMXULSelectControlElement { + editable: boolean; + open: boolean; + readonly label: string; + image: string; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl + +interface nsIDOMXULMultiSelectControlElement extends nsIDOMXULSelectControlElement { + selType: string; + currentItem: Element; + currentIndex: i32; + readonly selectedItems: NodeList; + addItemToSelection(item: nsIDOMXULSelectControlItemElement): void; + removeItemFromSelection(item: nsIDOMXULSelectControlItemElement): void; + toggleItemSelection(item: nsIDOMXULSelectControlItemElement): void; + selectItem(item: nsIDOMXULSelectControlItemElement): void; + selectItemRange(startItem: nsIDOMXULSelectControlItemElement, item: nsIDOMXULSelectControlItemElement): void; + selectAll(): void; + clearSelection(): void; + readonly selectedCount: i32; + getSelectedItem(index: i32): Element; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULRadioGroupElement.idl + +interface nsIDOMXULRadioGroupElement extends nsISupports { + focusedItem: Element; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULRelatedElement.idl + +interface nsIDOMXULRelatedElement extends nsISupports { + getRelatedElement(aElement: Node): Element; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idl + +interface nsIDOMXULSelectControlElement extends nsIDOMXULControlElement { + selectedItem: Element; + selectedIndex: i32; + value: string; + readonly itemCount: u32; + getIndexOfItem(item: nsIDOMXULSelectControlItemElement): i32; + getItemAtIndex(index: i32): Element; +} + +// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idl + +interface nsIDOMXULSelectControlItemElement extends nsISupports { + disabled: boolean; + image: string; + label: string; + accessKey: string; + command: string; + value: string; + readonly selected: boolean; + readonly control: Element; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/downloads/mozIDownloadPlatform.idl + +interface mozIDownloadPlatform extends nsISupports { + readonly ZONE_MY_COMPUTER: 0; + readonly ZONE_INTRANET: 1; + readonly ZONE_TRUSTED: 2; + readonly ZONE_INTERNET: 3; + readonly ZONE_RESTRICTED: 4; + + downloadDone(aSource: nsIURI, aReferrer: nsIURI, aTarget: nsIFile, aContentType: string, aIsPrivate: boolean): Promise; + mapUrlToZone(aURL: string): u32; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIDocumentStateListener.idl + +interface nsIDocumentStateListener extends nsISupports { + NotifyDocumentWillBeDestroyed(): void; + NotifyDocumentStateChanged(aNowDirty: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIEditActionListener.idl + +interface nsIEditActionListener extends nsISupports { + DidDeleteNode(aChild: Node, aResult: nsresult): void; + DidInsertText(aTextNode: CharacterData, aOffset: i32, aString: string, aResult: nsresult): void; + WillDeleteText(aTextNode: CharacterData, aOffset: i32, aLength: i32): void; + WillDeleteRanges(aRangesToDelete: Range[]): void; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIEditor.idl + +interface nsIEditor extends nsISupports { + readonly eNone: 0; + readonly eNext: 1; + readonly ePrevious: 2; + readonly eNextWord: 3; + readonly ePreviousWord: 4; + readonly eToBeginningOfLine: 5; + readonly eToEndOfLine: 6; + readonly eStrip: 0; + readonly eNoStrip: 1; + readonly eEditorPlaintextMask: 1; + readonly eEditorSingleLineMask: 2; + readonly eEditorPasswordMask: 4; + readonly eEditorReadonlyMask: 8; + readonly eEditorMailMask: 32; + readonly eEditorEnableWrapHackMask: 64; + readonly eEditorAllowInteraction: 512; + readonly eEditorRightToLeft: 2048; + readonly eEditorLeftToRight: 4096; + readonly eEditorSkipSpellCheck: 8192; + readonly eNewlinesPasteIntact: 0; + readonly eNewlinesPasteToFirst: 1; + readonly eNewlinesReplaceWithSpaces: 2; + readonly eNewlinesStrip: 3; + readonly eNewlinesReplaceWithCommas: 4; + readonly eNewlinesStripSurroundingWhitespace: 5; + + readonly selection: Selection; + setAttributeOrEquivalent(element: Element, sourceAttrName: string, sourceAttrValue: string, aSuppressTransaction: boolean): void; + removeAttributeOrEquivalent(element: Element, sourceAttrName: string, aSuppressTransaction: boolean): void; + flags: u32; + contentsMIMEType: string; + readonly isDocumentEditable: boolean; + readonly isSelectionEditable: boolean; + readonly document: Document; + readonly rootElement: Element; + readonly selectionController: nsISelectionController; + deleteSelection(action: i16, stripWrappers: i16): void; + readonly documentIsEmpty: boolean; + readonly documentModified: boolean; + documentCharacterSet: string; + resetModificationCount(): void; + getModificationCount(): i32; + incrementModificationCount(aModCount: i32): void; + enableUndo(enable: boolean): void; + readonly undoRedoEnabled: boolean; + readonly canUndo: boolean; + readonly canRedo: boolean; + clearUndoRedo(): void; + undo(): void; + undoAll(): void; + redo(): void; + beginTransaction(): void; + endTransaction(): void; + getInlineSpellChecker(autoCreate: boolean): nsIInlineSpellChecker; + setSpellcheckUserOverride(enable: boolean): void; + cut(): void; + canCut(): boolean; + copy(): void; + canCopy(): boolean; + paste(aClipboardType: nsIClipboard.ClipboardType): void; + pasteTransferable(aTransferable: nsITransferable): void; + canPaste(aClipboardType: nsIClipboard.ClipboardType): boolean; + selectAll(): void; + beginningOfDocument(): void; + endOfDocument(): void; + setAttribute(aElement: Element, attributestr: string, attvalue: string): void; + removeAttribute(aElement: Element, aAttribute: string): void; + cloneAttributes(aDestElement: Element, aSourceElement: Element): void; + insertNode(node: Node, parent: Node, aPosition: u32, aPreserveSelection?: boolean): void; + deleteNode(child: Node, aPreserveSelection?: boolean): void; + outputToString(formatType: string, flags: u32): string; + addEditActionListener(listener: nsIEditActionListener): void; + removeEditActionListener(listener: nsIEditActionListener): void; + addDocumentStateListener(listener: nsIDocumentStateListener): void; + removeDocumentStateListener(listener: nsIDocumentStateListener): void; + forceCompositionEnd(): void; + readonly composing: boolean; + unmask(aStart?: u32, aEnd?: i64, aTimeout?: u32): void; + mask(): void; + readonly unmaskedStart: u32; + readonly unmaskedEnd: u32; + readonly autoMaskingEnabled: boolean; + readonly passwordMask: string; + readonly textLength: u32; + newlineHandling: i32; + insertText(aStringToInsert: string): void; + insertLineBreak(): void; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIEditorMailSupport.idl + +interface nsIEditorMailSupport extends nsISupports { + insertAsCitedQuotation(aQuotedText: string, aCitation: string, aInsertHTML: boolean): Node; + rewrap(aRespectNewlines: boolean): void; + insertTextWithQuotations(aStringToInsert: string): void; + wrapWidth: i32; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIEditorSpellCheck.idl + +interface nsIEditorSpellCheck extends nsISupports { + readonly FILTERTYPE_NORMAL: 1; + readonly FILTERTYPE_MAIL: 2; + + canSpellCheck(): boolean; + InitSpellChecker(editor: nsIEditor, enableSelectionChecking: boolean, callback?: nsIEditorSpellCheckCallback): void; + GetNextMisspelledWord(): string; + GetSuggestedWord(): string; + CheckCurrentWord(suggestedWord: string): boolean; + suggest(aCheckingWorkd: string, aMaxCount: u32): Promise; + ReplaceWord(misspelledWord: string, replaceWord: string, allOccurrences: boolean): void; + IgnoreWordAllOccurrences(word: string): void; + AddWordToDictionary(word: string): void; + RemoveWordFromDictionary(word: string): void; + GetDictionaryList(): string[]; + getCurrentDictionaries(): string[]; + setCurrentDictionaries(dictionaries: string[]): Promise; + UninitSpellChecker(): void; + setFilterType(filterType: u32): void; + UpdateCurrentDictionary(callback?: nsIEditorSpellCheckCallback): void; +} + +type nsIEditorSpellCheckCallback = Callable<{ + editorSpellCheckDone(): void; +}> + +// https://searchfox.org/mozilla-central/source/editor/nsIHTMLAbsPosEditor.idl + +interface nsIHTMLAbsPosEditor extends nsISupports { + absolutePositioningEnabled: boolean; + readonly isAbsolutePositioningActive: boolean; + snapToGridEnabled: boolean; + gridSize: u32; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIHTMLEditor.idl + +interface nsIHTMLEditor extends nsISupports { + readonly eLeft: 0; + readonly eCenter: 1; + readonly eRight: 2; + readonly eJustify: 3; + + setInlineProperty(aProperty: string, aAttribute: string, aValue: string): void; + getInlinePropertyWithAttrValue(aProperty: string, aAttribute: string, aValue: string, aFirst: OutParam, aAny: OutParam, aAll: OutParam): string; + removeInlineProperty(aProperty: string, aAttribute: string): void; + nodeIsBlock(aNode: Node): boolean; + insertHTML(aInputString: string): void; + rebuildDocumentFromSource(aSourceString: string): void; + insertElementAtSelection(aElement: Element, aDeleteSelection: boolean): void; + updateBaseURL(): void; + selectElement(aElement: Element): void; + getParagraphState(aMixed: OutParam): string; + getFontFaceState(aMixed: OutParam): string; + getHighlightColorState(aMixed: OutParam): string; + getListState(aMixed: OutParam, aOL: OutParam, aUL: OutParam, aDL: OutParam): void; + getListItemState(aMixed: OutParam, aLI: OutParam, aDT: OutParam, aDD: OutParam): void; + getAlignment(aMixed: OutParam, aAlign: OutParam): void; + makeOrChangeList(aListType: string, entireList: boolean, aBulletType: string): void; + removeList(aListType: string): void; + getElementOrParentByTagName(aTagName: string, aNode: Node): Element; + getSelectedElement(aTagName: string): nsISupports; + createElementWithDefaults(aTagName: string): Element; + insertLinkAroundSelection(aAnchorElement: Element): void; + setBackgroundColor(aColor: string): void; + isCSSEnabled: boolean; + checkSelectionStateForAnonymousButtons(): void; + isAnonymousElement(aElement: Element): boolean; + returnInParagraphCreatesNewParagraph: boolean; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIHTMLInlineTableEditor.idl + +interface nsIHTMLInlineTableEditor extends nsISupports { + inlineTableEditingEnabled: boolean; + readonly isInlineTableEditingActive: boolean; +} + +// https://searchfox.org/mozilla-central/source/editor/nsIHTMLObjectResizer.idl + +interface nsIHTMLObjectResizer extends nsISupports { + readonly eTopLeft: 0; + readonly eTop: 1; + readonly eTopRight: 2; + readonly eLeft: 3; + readonly eRight: 4; + readonly eBottomLeft: 5; + readonly eBottom: 6; + readonly eBottomRight: 7; + + objectResizingEnabled: boolean; + readonly isObjectResizingActive: boolean; + hideResizers(): void; +} + +// https://searchfox.org/mozilla-central/source/editor/nsITableEditor.idl + +interface nsITableEditor extends nsISupports { + readonly eNoSearch: 0; + readonly ePreviousColumn: 1; + readonly ePreviousRow: 2; + + insertTableCell(aNumberOfColumnsToInsert: i32, aInsertAfterSelectedCell: boolean): void; + insertTableColumn(aNumberOfColumnsToInsert: i32, aInsertAfterSelectedCell: boolean): void; + insertTableRow(aNumberOfRowsToInsert: i32, aInsertAfterSelectedCell: boolean): void; + deleteTable(): void; + deleteTableCellContents(): void; + deleteTableCell(aNumberOfCellsToDelete: i32): void; + deleteTableColumn(aNumberOfColumnsToDelete: i32): void; + deleteTableRow(aNumberOfRowsToDelete: i32): void; + selectTableCell(): void; + selectTableRow(): void; + selectTableColumn(): void; + selectTable(): void; + selectAllTableCells(): void; + switchTableCellHeaderType(aSourceCell: Element): Element; + joinTableCells(aMergeNonContiguousContents: boolean): void; + splitTableCell(): void; + normalizeTable(aTable: Element): void; + getCellIndexes(aCellElement: Element, aRowIndex: OutParam, aColumnIndex: OutParam): void; + getTableSize(aTableOrElementInTable: Element, aRowCount: OutParam, aColCount: OutParam): void; + getCellAt(aTableElement: Element, aRowIndex: i32, aColumnIndex: i32): Element; + getCellDataAt(aTableElement: Element, aRowIndex: i32, aColumnIndex: i32, aCellElement: OutParam, aStartRowIndex: OutParam, aStartColumnIndex: OutParam, aRowSpan: OutParam, aColSpan: OutParam, aEffectiveRowSpan: OutParam, aEffectiveColSpan: OutParam, aIsSelected: OutParam): void; + getFirstRow(aTableElement: Element): Element; + getSelectedOrParentTableElement(aTagName: OutParam, aCount: OutParam): Element; + getSelectedCellsType(aElement: Element): u32; + getFirstSelectedCellInTable(aRowIndex: OutParam, aColIndex: OutParam): Element; + getSelectedCells(): Element[]; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/enterprisepolicies/nsIEnterprisePolicies.idl + +interface nsIEnterprisePolicies extends nsISupports { + readonly UNINITIALIZED: -1; + readonly INACTIVE: 0; + readonly ACTIVE: 1; + readonly FAILED: 2; + + readonly status: i16; + readonly isEnterprise: boolean; + isAllowed(feature: string): boolean; + getActivePolicies(): any; + getSupportMenu(): any; + getExtensionPolicy(extensionID: string): any; + getExtensionSettings(extensionID: string): any; + mayInstallAddon(addon: any): boolean; + allowedInstallSource(uri: nsIURI): boolean; + isExemptExecutableExtension(url: string, extension: string): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/amIAddonManagerStartup.idl + +interface amIAddonManagerStartup extends nsISupports { + readStartupData(): any; + registerChrome(manifestURI: nsIURI, entries: any): nsIJSRAIIHelper; + encodeBlob(value: any): any; + decodeBlob(value: any): any; + enumerateJAR(uri: nsIURI, pattern: string): string[]; + enumerateJARSubtree(uri: nsIURI): string[]; + initializeURLPreloader(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/amIWebInstallPrompt.idl + +interface amIWebInstallPrompt extends nsISupports { + confirm(aBrowser: Element, aUri: nsIURI, aInstalls: nsIVariant[]): void; +} + +// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsCExternalHandlerService.idl + +// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIContentDispatchChooser.idl + +interface nsIContentDispatchChooser extends nsISupports { + handleURI(aHandler: nsIHandlerInfo, aURI: nsIURI, aTriggeringPrincipal: nsIPrincipal, aBrowsingContext: BrowsingContext, aWasTriggeredExternally?: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIExternalHelperAppService.idl + +interface nsIExternalHelperAppService extends nsISupports { + doContent(aMimeContentType: string, aChannel: nsIChannel, aContentContext: nsIInterfaceRequestor, aForceSave: boolean, aWindowContext?: nsIInterfaceRequestor): nsIStreamListener; + createListener(aMimeContentType: string, aChannel: nsIChannel, aContentContext: BrowsingContext, aForceSave: boolean, aWindowContext?: nsIInterfaceRequestor): nsIStreamListener; + applyDecodingForExtension(aExtension: string, aEncodingType: string): boolean; + getPreferredDownloadsDirectory(): nsIFile; +} + +interface nsPIExternalAppLauncher extends nsISupports { + deleteTemporaryFileOnExit(aTemporaryFile: nsIFile): void; + deleteTemporaryPrivateFileWhenPossible(aTemporaryFile: nsIFile): void; +} + +interface nsIHelperAppLauncher extends nsICancelable { + readonly MIMEInfo: nsIMIMEInfo; + readonly source: nsIURI; + readonly suggestedFileName: string; + promptForSaveDestination(): void; + setDownloadToLaunch(aHandleInternally: boolean, aFile: nsIFile): void; + launchLocalFile(): void; + saveDestinationAvailable(aFile: nsIFile, aDialogWasShown?: boolean): void; + setWebProgressListener(aWebProgressListener: nsIWebProgressListener2): void; + readonly targetFile: nsIFile; + readonly targetFileIsExecutable: boolean; + readonly timeDownloadStarted: PRTime; + readonly contentLength: i64; + readonly browsingContextId: u64; +} + +// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIExternalProtocolService.idl + +interface nsIExternalProtocolService extends nsISupports { + externalProtocolHandlerExists(aProtocolScheme: string): boolean; + isExposedProtocol(aProtocolScheme: string): boolean; + getProtocolHandlerInfo(aProtocolScheme: string): nsIHandlerInfo; + getProtocolHandlerInfoFromOS(aProtocolScheme: string, aFound: OutParam): nsIHandlerInfo; + setProtocolHandlerDefaults(aHandlerInfo: nsIHandlerInfo, aOSHandlerExists: boolean): void; + loadURI(aURI: nsIURI, aTriggeringPrincipal?: nsIPrincipal, aRedirectPrincipal?: nsIPrincipal, aBrowsingContext?: BrowsingContext, aWasTriggeredExternally?: boolean, aHasValidUserGestureActivation?: boolean, aNewWindowTarget?: boolean): void; + getApplicationDescription(aScheme: string): string; + isCurrentAppOSDefaultForProtocol(aScheme: string): boolean; +} + +// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIHandlerService.idl + +interface nsIHandlerService extends nsISupports { + asyncInit(): void; + enumerate(): nsISimpleEnumerator; + fillHandlerInfo(aHandlerInfo: nsIHandlerInfo, aOverrideType: string): void; + store(aHandlerInfo: nsIHandlerInfo): void; + exists(aHandlerInfo: nsIHandlerInfo): boolean; + remove(aHandlerInfo: nsIHandlerInfo): void; + getTypeFromExtension(aFileExtension: string): string; + existsForProtocolOS(aProtocolScheme: string): boolean; + existsForProtocol(aProtocolScheme: string): boolean; + getApplicationDescription(aProtocolScheme: string): string; +} + +// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsIHelperAppLauncherDialog.idl + +interface nsIHelperAppLauncherDialog extends nsISupports { + readonly REASON_CANTHANDLE: 0; + readonly REASON_SERVERREQUEST: 1; + readonly REASON_TYPESNIFFED: 2; + + show(aLauncher: nsIHelperAppLauncher, aWindowContext: nsIInterfaceRequestor, aReason: u32): void; + promptForSaveToFileAsync(aLauncher: nsIHelperAppLauncher, aWindowContext: nsIInterfaceRequestor, aDefaultFileName: string, aSuggestedFileExtension: string, aForcePrompt: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/uriloader/exthandler/nsISharingHandlerApp.idl + +interface nsISharingHandlerApp extends nsIHandlerApp { + share(data: string, title?: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/typeaheadfind/nsITypeAheadFind.idl + +interface nsITypeAheadFind extends nsISupports { + readonly FIND_INITIAL: 0; + readonly FIND_NEXT: 1; + readonly FIND_PREVIOUS: 2; + readonly FIND_FIRST: 3; + readonly FIND_LAST: 4; + readonly FIND_FOUND: 0; + readonly FIND_NOTFOUND: 1; + readonly FIND_WRAPPED: 2; + readonly FIND_PENDING: 3; + + init(aDocShell: nsIDocShell): void; + find(aSearchString: string, aLinksOnly: boolean, aMode: u32, aDontIterateFrames: boolean): u16; + getFoundRange(): Range; + setDocShell(aDocShell: nsIDocShell): void; + setSelectionModeAndRepaint(toggle: i16): void; + collapseSelection(): void; + isRangeVisible(aRange: Range, aMustBeInViewPort: boolean): boolean; + isRangeRendered(aRange: Range): boolean; + readonly searchString: string; + caseSensitive: boolean; + matchDiacritics: boolean; + entireWord: boolean; + readonly foundLink: Element; + readonly foundEditable: Element; + readonly currentWindow: mozIDOMWindow; +} + // https://searchfox.org/mozilla-central/source/toolkit/components/glean/xpcom/nsIFOG.idl interface nsIFOG extends nsISupports { @@ -9176,35 +4672,962 @@ interface nsIGleanPing extends nsISupports { setEnabled(aValue: boolean): void; } -// https://searchfox.org/mozilla-central/source/dom/interfaces/storage/nsIDOMStorageManager.idl +// https://searchfox.org/mozilla-central/source/gfx/src/nsIFontEnumerator.idl -interface nsIDOMStorageManager extends nsISupports { - precacheStorage(aPrincipal: nsIPrincipal, aStoragePrincipal: nsIPrincipal): Storage; - createStorage(aWindow: mozIDOMWindow, aPrincipal: nsIPrincipal, aStoragePrincipal: nsIPrincipal, aDocumentURI: string, aPrivate?: boolean): Storage; - getStorage(aWindow: mozIDOMWindow, aPrincipal: nsIPrincipal, aStoragePrincipal: nsIPrincipal, aPrivate?: boolean): Storage; - cloneStorage(aStorageToCloneFrom: Storage): void; - checkStorage(aPrincipal: nsIPrincipal, aStorage: Storage): boolean; +interface nsIFontEnumerator extends nsISupports { + EnumerateAllFonts(): string[]; + EnumerateFonts(aLangGroup: string, aGeneric: string): string[]; + EnumerateAllFontsAsync(): any; + EnumerateFontsAsync(aLangGroup: string, aGeneric: string): any; + HaveFontFor(aLangGroup: string): OutParam; + getDefaultFont(aLangGroup: string, aGeneric: string): string; + getStandardFamilyName(aName: string): string; } -// https://searchfox.org/mozilla-central/source/dom/interfaces/storage/nsIStorageActivityService.idl +// https://searchfox.org/mozilla-central/source/gfx/thebes/nsIFontLoadCompleteCallback.idl -interface nsIStorageActivityService extends nsISupports { - getActiveOrigins(from: PRTime, to: PRTime): nsIArray; - moveOriginInTime(origin: nsIPrincipal, when: PRTime): void; - testOnlyReset(): void; +// https://searchfox.org/mozilla-central/source/parser/html/nsIParserUtils.idl + +interface nsIParserUtils extends nsISupports { + readonly SanitizerAllowComments: 1; + readonly SanitizerAllowStyle: 2; + readonly SanitizerCidEmbedsOnly: 4; + readonly SanitizerDropNonCSSPresentation: 8; + readonly SanitizerDropForms: 16; + readonly SanitizerDropMedia: 32; + readonly SanitizerLogRemovals: 64; + + sanitize(src: string, flags: u32): string; + removeConditionalCSS(src: string): string; + convertToPlainText(src: string, flags: u32, wrapCol: u32): string; + parseFragment(fragment: string, flags: u32, isXML: boolean, baseURI: nsIURI, element: Element): DocumentFragment; } -// https://searchfox.org/mozilla-central/source/dom/storage/nsISessionStorageService.idl +// https://searchfox.org/mozilla-central/source/parser/htmlparser/nsIExpatSink.idl -interface nsISessionStorageService extends nsISupports { - clearStoragesForOrigin(aPrincipal: nsIPrincipal): void; +interface nsIExpatSink extends nsISupports { + HandleStartElement(aName: string, aAtts: string[], aAttsCount: u32, aLineNumber: u32, aColumnNumber: u32): void; + HandleEndElement(aName: string): void; + HandleComment(aCommentText: string): void; + HandleCDataSection(aData: string, aLength: u32): void; + HandleDoctypeDecl(aSubset: string, aName: string, aSystemId: string, aPublicId: string, aCatalogData: nsISupports): void; + HandleCharacterData(aData: string, aLength: u32): void; + HandleProcessingInstruction(aTarget: string, aData: string): void; + HandleXMLDeclaration(aVersion: string, aEncoding: string, aStandalone: i32): void; + ReportError(aErrorText: string, aSourceText: string, aError: nsIScriptError): boolean; } -// https://searchfox.org/mozilla-central/source/dom/audiochannel/nsIAudioChannelAgent.idl +// https://searchfox.org/mozilla-central/source/netwerk/base/http-sfv/nsIStructuredFieldValues.idl -interface nsISuspendedTypes extends nsISupports { - readonly NONE_SUSPENDED: 0; - readonly SUSPENDED_BLOCK: 1; +interface nsISFVBareItem extends nsISupports { + readonly BOOL: 1; + readonly STRING: 2; + readonly DECIMAL: 3; + readonly INTEGER: 4; + readonly TOKEN: 5; + readonly BYTE_SEQUENCE: 6; + + readonly type: i32; +} + +interface nsISFVInteger extends nsISFVBareItem { + value: i64; +} + +interface nsISFVString extends nsISFVBareItem { + value: string; +} + +interface nsISFVBool extends nsISFVBareItem { + value: boolean; +} + +interface nsISFVDecimal extends nsISFVBareItem { + value: double; +} + +interface nsISFVToken extends nsISFVBareItem { + value: string; +} + +interface nsISFVByteSeq extends nsISFVBareItem { + value: string; +} + +interface nsISFVParams extends nsISupports { + get(key: string): nsISFVBareItem; + set(key: string, item: nsISFVBareItem): void; + delete(key: string): void; + keys(): string[]; +} + +interface nsISFVParametrizable extends nsISupports { + readonly params: nsISFVParams; +} + +interface nsISFVItemOrInnerList extends nsISFVParametrizable { +} + +interface nsISFVSerialize extends nsISupports { + serialize(): string; +} + +interface nsISFVItem extends nsISFVItemOrInnerList { + readonly value: nsISFVBareItem; + serialize(): string; +} + +interface nsISFVInnerList extends nsISFVItemOrInnerList { + items: nsISFVItem[]; +} + +interface nsISFVList extends nsISFVSerialize { + members: nsISFVItemOrInnerList[]; + parseMore(header: string): void; +} + +interface nsISFVDictionary extends nsISFVSerialize { + get(key: string): nsISFVItemOrInnerList; + set(key: string, member_value: nsISFVItemOrInnerList): void; + delete(key: string): void; + keys(): string[]; + parseMore(header: string): void; +} + +interface nsISFVService extends nsISupports { + parseDictionary(header: string): nsISFVDictionary; + parseList(header: string): nsISFVList; + parseItem(header: string): nsISFVItem; + newInteger(value: i64): nsISFVInteger; + newBool(value: boolean): nsISFVBool; + newDecimal(value: double): nsISFVDecimal; + newString(value: string): nsISFVString; + newByteSequence(value: string): nsISFVByteSeq; + newToken(value: string): nsISFVToken; + newParameters(): nsISFVParams; + newInnerList(items: nsISFVItem[], params: nsISFVParams): nsISFVInnerList; + newItem(value: nsISFVBareItem, params: nsISFVParams): nsISFVItem; + newList(members: nsISFVItemOrInnerList[]): nsISFVList; + newDictionary(): nsISFVDictionary; +} + +// https://searchfox.org/mozilla-central/source/image/imgICache.idl + +interface imgICache extends nsISupports { + clearCache(chrome?: any): void; + removeEntriesFromPrincipalInAllProcesses(aPrincipal: nsIPrincipal): void; + removeEntriesFromSiteInAllProcesses(aBaseDomain: string, OriginAttributesPattern: any): void; + findEntryProperties(uri: nsIURI, doc?: Document): nsIProperties; + respectPrivacyNotifications(): void; +} + +// https://searchfox.org/mozilla-central/source/image/imgIContainer.idl + +} // global + +declare namespace imgIContainer { + +enum DecodeResult { + DECODE_SURFACE_AVAILABLE = 0, + DECODE_REQUESTED = 1, + DECODE_REQUEST_FAILED = 2, +} + +} + +declare global { + +interface imgIContainer extends nsISupports, Enums { + readonly TYPE_RASTER: 0; + readonly TYPE_VECTOR: 1; + readonly TYPE_REQUEST: 2; + readonly FLAG_NONE: 0; + readonly FLAG_SYNC_DECODE: 1; + readonly FLAG_SYNC_DECODE_IF_FAST: 2; + readonly FLAG_ASYNC_NOTIFY: 4; + readonly FLAG_DECODE_NO_PREMULTIPLY_ALPHA: 8; + readonly FLAG_DECODE_NO_COLORSPACE_CONVERSION: 16; + readonly FLAG_CLAMP: 32; + readonly FLAG_HIGH_QUALITY_SCALING: 64; + readonly FLAG_BYPASS_SURFACE_CACHE: 128; + readonly FLAG_FORCE_PRESERVEASPECTRATIO_NONE: 256; + readonly FLAG_FORCE_UNIFORM_SCALING: 512; + readonly FLAG_AVOID_REDECODE_FOR_SIZE: 1024; + readonly FLAG_DECODE_TO_SRGB_COLORSPACE: 2048; + readonly FLAG_RECORD_BLOB: 4096; + readonly DECODE_FLAGS_DEFAULT: 0; + readonly DECODE_FLAGS_FOR_REENCODE: 2056; + readonly FRAME_FIRST: 0; + readonly FRAME_CURRENT: 1; + readonly FRAME_MAX_VALUE: 1; + readonly kNormalAnimMode: 0; + readonly kDontAnimMode: 1; + readonly kLoopOnceAnimMode: 2; + + readonly width: i32; + readonly height: i32; + readonly hotspotX: i32; + readonly hotspotY: i32; + readonly type: u16; + readonly animated: boolean; + readonly providerId: u32; + lockImage(): void; + unlockImage(): void; + requestDiscard(): void; + animationMode: u16; + resetAnimation(): void; +} + +// https://searchfox.org/mozilla-central/source/image/imgIContainerDebug.idl + +interface imgIContainerDebug extends nsISupports { + readonly framesNotified: u32; +} + +// https://searchfox.org/mozilla-central/source/image/imgIEncoder.idl + +interface imgIEncoder extends nsIAsyncInputStream { + readonly INPUT_FORMAT_RGB: 0; + readonly INPUT_FORMAT_RGBA: 1; + readonly INPUT_FORMAT_HOSTARGB: 2; + + initFromData(data: u8[], length: u32, width: u32, height: u32, stride: u32, inputFormat: u32, outputOptions: string): void; + startImageEncode(width: u32, height: u32, inputFormat: u32, outputOptions: string): void; + addImageFrame(data: u8[], length: u32, width: u32, height: u32, stride: u32, frameFormat: u32, frameOptions: string): void; + endImageEncode(): void; +} + +// https://searchfox.org/mozilla-central/source/image/imgILoader.idl + +interface imgILoader extends nsISupports { + readonly LOAD_CORS_ANONYMOUS: 65536; + readonly LOAD_CORS_USE_CREDENTIALS: 131072; + + loadImageXPCOM(aURI: nsIURI, aInitialDocumentURL: nsIURI, aReferrerInfo: nsIReferrerInfo, aLoadingPrincipal: nsIPrincipal, aLoadGroup: nsILoadGroup, aObserver: imgINotificationObserver, aLoadingDocument: Document, aLoadFlags: nsLoadFlags, cacheKey: nsISupports, aContentPolicyType?: nsContentPolicyType): imgIRequest; + loadImageWithChannelXPCOM(aChannel: nsIChannel, aObserver: imgINotificationObserver, aLoadingDocument: Document, aListener: OutParam): imgIRequest; +} + +// https://searchfox.org/mozilla-central/source/image/imgINotificationObserver.idl + +interface imgINotificationObserver extends nsISupports { + readonly SIZE_AVAILABLE: 1; + readonly FRAME_UPDATE: 2; + readonly FRAME_COMPLETE: 3; + readonly LOAD_COMPLETE: 4; + readonly DECODE_COMPLETE: 5; + readonly DISCARD: 6; + readonly UNLOCKED_DRAW: 7; + readonly IS_ANIMATED: 8; + readonly HAS_TRANSPARENCY: 9; +} + +// https://searchfox.org/mozilla-central/source/image/imgIRequest.idl + +interface imgIRequest extends nsIRequest { + readonly STATUS_NONE: 0; + readonly STATUS_SIZE_AVAILABLE: 1; + readonly STATUS_LOAD_COMPLETE: 2; + readonly STATUS_ERROR: 4; + readonly STATUS_FRAME_COMPLETE: 8; + readonly STATUS_DECODE_COMPLETE: 16; + readonly STATUS_IS_ANIMATED: 32; + readonly STATUS_HAS_TRANSPARENCY: 64; + readonly CATEGORY_FRAME_INIT: 1; + readonly CATEGORY_FRAME_STYLE: 2; + readonly CATEGORY_SIZE_QUERY: 4; + readonly CATEGORY_DISPLAY: 8; + + readonly image: imgIContainer; + readonly providerId: u32; + readonly triggeringPrincipal: nsIPrincipal; + readonly imageStatus: u32; + readonly URI: nsIURI; + readonly finalURI: nsIURI; + readonly notificationObserver: imgINotificationObserver; + readonly mimeType: string; + readonly fileName: string; + clone(aObserver: imgINotificationObserver): imgIRequest; + readonly imagePrincipal: nsIPrincipal; + readonly hadCrossOriginRedirects: boolean; + readonly multipart: boolean; + readonly CORSMode: i32; + readonly referrerInfo: nsIReferrerInfo; + cancelAndForgetObserver(aStatus: nsresult): void; + startDecoding(aFlags: u32): void; + lockImage(): void; + unlockImage(): void; + requestDiscard(): void; + getStaticRequest(): imgIRequest; + incrementAnimationConsumers(): void; + decrementAnimationConsumers(): void; + boostPriority(aCategory: u32): void; +} + +// https://searchfox.org/mozilla-central/source/image/imgIScriptedNotificationObserver.idl + +interface imgIScriptedNotificationObserver extends nsISupports { + sizeAvailable(aRequest: imgIRequest): void; + frameUpdate(aRequest: imgIRequest): void; + frameComplete(aRequest: imgIRequest): void; + loadComplete(aRequest: imgIRequest): void; + decodeComplete(aRequest: imgIRequest): void; + discard(aRequest: imgIRequest): void; + isAnimated(aRequest: imgIRequest): void; + hasTransparency(aRequest: imgIRequest): void; +} + +// https://searchfox.org/mozilla-central/source/image/imgITools.idl + +interface imgITools extends nsISupports { + decodeImageFromBuffer(aBuffer: string, aSize: u32, aMimeType: string): imgIContainer; + decodeImageFromArrayBuffer(aArrayBuffer: any, aMimeType: string): imgIContainer; + decodeImageFromChannelAsync(aURI: nsIURI, aChannel: nsIChannel, aCallback: imgIContainerCallback, aObserver: imgINotificationObserver): void; + decodeImageAsync(aStream: nsIInputStream, aMimeType: string, aCallback: imgIContainerCallback, aEventTarget: nsIEventTarget): void; + encodeImage(aContainer: imgIContainer, aMimeType: string, outputOptions?: string): nsIInputStream; + encodeScaledImage(aContainer: imgIContainer, aMimeType: string, aWidth: i32, aHeight: i32, outputOptions?: string): nsIInputStream; + getImgLoaderForDocument(doc: Document): imgILoader; + getImgCacheForDocument(doc: Document): imgICache; + encodeCroppedImage(aContainer: imgIContainer, aMimeType: string, aOffsetX: i32, aOffsetY: i32, aWidth: i32, aHeight: i32, outputOptions?: string): nsIInputStream; + createScriptedObserver(aObserver: imgIScriptedNotificationObserver): imgINotificationObserver; +} + +type imgIContainerCallback = Callable<{ + onImageReady(aImage: imgIContainer, aStatus: nsresult): void; +}> + +// https://searchfox.org/mozilla-central/source/image/nsIIconURI.idl + +interface nsIMozIconURI extends nsIURI { + readonly iconURL: nsIURL; + readonly imageSize: u32; + readonly stockIcon: string; + readonly iconSize: string; + readonly iconState: string; + readonly contentType: string; + readonly fileExtension: string; +} + +// https://searchfox.org/mozilla-central/source/layout/inspector/inIDeepTreeWalker.idl + +interface inIDeepTreeWalker extends nsISupports { + showAnonymousContent: boolean; + showSubDocuments: boolean; + showDocumentsAsNodes: boolean; + init(aRoot: Node): void; + readonly root: Node; + currentNode: Node; + parentNode(): Node; + firstChild(): Node; + lastChild(): Node; + previousSibling(): Node; + nextSibling(): Node; + previousNode(): Node; + nextNode(): Node; +} + +// https://searchfox.org/mozilla-central/source/intl/strres/nsIStringBundle.idl + +interface nsIStringBundle extends nsISupports { + GetStringFromID(aID: i32): string; + GetStringFromName(aName: string): string; + formatStringFromID(aID: i32, params: string[]): string; + formatStringFromName(aName: string, params: string[]): string; + getSimpleEnumeration(): nsISimpleEnumerator; + asyncPreload(): void; +} + +interface nsIStringBundleService extends nsISupports { + createBundle(aURLSpec: string): nsIStringBundle; + formatStatusMessage(aStatus: nsresult, aStatusArg: string): string; + flushBundles(): void; +} + +// https://searchfox.org/mozilla-central/source/modules/libjar/nsIJARChannel.idl + +interface nsIJARChannel extends nsIChannel { + jarFile: nsIFile; + readonly zipEntry: nsIZipEntry; + ensureCached(): boolean; +} + +// https://searchfox.org/mozilla-central/source/modules/libjar/nsIJARURI.idl + +interface nsIJARURI extends nsIURL { + readonly JARFile: nsIURI; + readonly JAREntry: string; +} + +// https://searchfox.org/mozilla-central/source/modules/libjar/nsIZipReader.idl + +interface nsIZipEntry extends nsISupports { + readonly compression: u16; + readonly size: u32; + readonly realSize: u32; + readonly CRC32: u32; + readonly isDirectory: boolean; + readonly lastModifiedTime: PRTime; + readonly isSynthetic: boolean; + readonly permissions: u32; +} + +interface nsIZipReader extends nsISupports { + open(zipFile: nsIFile): void; + openInner(zipReader: nsIZipReader, zipEntry: string): void; + readonly file: nsIFile; + close(): void; + test(aEntryName: string): void; + extract(zipEntry: string, outFile: nsIFile): void; + getEntry(zipEntry: string): nsIZipEntry; + hasEntry(zipEntry: string): boolean; + findEntries(aPattern: string): nsIUTF8StringEnumerator; + getInputStream(zipEntry: string): nsIInputStream; +} + +interface nsIZipReaderCache extends nsISupports { + init(cacheSize: u32): void; + getZip(zipFile: nsIFile): nsIZipReader; + getZipIfCached(zipFile: nsIFile): nsIZipReader; + isCached(zipFile: nsIFile): boolean; + getInnerZip(zipFile: nsIFile, zipEntry: string): nsIZipReader; +} + +// https://searchfox.org/mozilla-central/source/devtools/platform/IJSDebugger.idl + +interface IJSDebugger extends nsISupports { + addClass(global: any): void; +} + +// https://searchfox.org/mozilla-central/source/devtools/platform/nsIJSInspector.idl + +interface nsIJSInspector extends nsISupports { + enterNestedEventLoop(requestor: any): u32; + exitNestedEventLoop(): u32; + readonly eventLoopNestLevel: u32; + readonly lastNestRequestor: any; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/kvstore/nsIKeyValue.idl + +} // global + +declare namespace nsIKeyValueService { + +enum RecoveryStrategy { + ERROR = 0, + DISCARD = 1, + RENAME = 2, +} + +} + +declare global { + +interface nsIKeyValueService extends nsISupports, Enums { + getOrCreate(callback: nsIKeyValueDatabaseCallback, path: string, name: string): void; + getOrCreateWithOptions(callback: nsIKeyValueDatabaseCallback, path: string, name: string, recoveryStrategy?: nsIKeyValueService.RecoveryStrategy): void; + createImporter(type: string, path: string): nsIKeyValueImporter; +} + +interface nsIKeyValueImportSourceSpec extends nsISupports { + readonly path: string; + addDatabase(name: string): nsIKeyValueDatabaseImportOptions; + addAllDatabases(): nsIKeyValueDatabaseImportOptions; +} + +} // global + +declare namespace nsIKeyValueImporter { + +enum ConflictPolicy { + ERROR_ON_CONFLICT = 0, + IGNORE_ON_CONFLICT = 1, + REPLACE_ON_CONFLICT = 2, +} + +enum CleanupPolicy { + KEEP_AFTER_IMPORT = 0, + DELETE_AFTER_IMPORT = 1, +} + +} + +declare global { + +interface nsIKeyValueImporter extends nsIKeyValueImportSourceSpec, Enums { + readonly type: string; + addPath(path: string): nsIKeyValueImportSourceSpec; + import(callback: nsIKeyValueVoidCallback): void; +} + +interface nsIKeyValueDatabaseImportOptions extends nsISupports { + setConflictPolicy(conflictPolicy: nsIKeyValueImporter.ConflictPolicy): nsIKeyValueDatabaseImportOptions; + setCleanupPolicy(cleanupPolicy: nsIKeyValueImporter.CleanupPolicy): nsIKeyValueDatabaseImportOptions; +} + +interface nsIKeyValueDatabase extends nsISupports { + isEmpty(callback: nsIKeyValueVariantCallback): void; + count(callback: nsIKeyValueVariantCallback): void; + size(callback: nsIKeyValueVariantCallback): void; + put(callback: nsIKeyValueVoidCallback, key: string, value: nsIVariant): void; + writeMany(callback: nsIKeyValueVoidCallback, pairs: nsIKeyValuePair[]): void; + get(callback: nsIKeyValueVariantCallback, key: string, defaultValue?: nsIVariant): void; + has(callback: nsIKeyValueVariantCallback, key: string): void; + delete(callback: nsIKeyValueVoidCallback, key: string): void; + deleteRange(callback: nsIKeyValueVoidCallback, fromKey?: string, toKey?: string): void; + clear(callback: nsIKeyValueVoidCallback): void; + enumerate(callback: nsIKeyValueEnumeratorCallback, fromKey?: string, toKey?: string): void; + close(callback: nsIKeyValueVoidCallback): void; +} + +interface nsIKeyValuePair extends nsISupports { + readonly key: string; + readonly value: nsIVariant; +} + +interface nsIKeyValueEnumerator extends nsISupports { + hasMoreElements(): boolean; + getNext(): nsIKeyValuePair; +} + +interface nsIKeyValueDatabaseCallback extends nsISupports { + resolve(database: nsIKeyValueDatabase): void; + reject(message: string): void; +} + +interface nsIKeyValueEnumeratorCallback extends nsISupports { + resolve(enumerator: nsIKeyValueEnumerator): void; + reject(message: string): void; +} + +interface nsIKeyValuePairCallback extends nsISupports { + resolve(pair: nsIKeyValuePair): void; + reject(message: string): void; +} + +interface nsIKeyValueVariantCallback extends nsISupports { + resolve(result: nsIVariant): void; + reject(message: string): void; +} + +interface nsIKeyValueVoidCallback extends nsISupports { + resolve(): void; + reject(message: string): void; +} + +// https://searchfox.org/mozilla-central/source/layout/base/nsILayoutHistoryState.idl + +interface nsILayoutHistoryState extends nsISupports { + readonly hasStates: boolean; + getKeys(): string[]; + getPresState(aKey: string, aScrollX: OutParam, aScrollY: OutParam, aAllowScrollOriginDowngrade: OutParam, aRes: OutParam): void; + addNewPresState(aKey: string, aScrollX: float, aScrollY: float, aAllowScrollOriginDowngrade: boolean, aRes: float): void; +} + +// https://searchfox.org/mozilla-central/source/layout/base/nsIPreloadedStyleSheet.idl + +interface nsIPreloadedStyleSheet extends nsISupports { +} + +// https://searchfox.org/mozilla-central/source/layout/base/nsISVGPaintContext.idl + +interface nsISVGPaintContext extends nsISupports { + readonly fillColor: string; + readonly strokeColor: string; + readonly fillOpacity: float; + readonly strokeOpacity: float; +} + +// https://searchfox.org/mozilla-central/source/layout/base/nsIStyleSheetService.idl + +interface nsIStyleSheetService extends nsISupports { + readonly AGENT_SHEET: 0; + readonly USER_SHEET: 1; + readonly AUTHOR_SHEET: 2; + + loadAndRegisterSheet(sheetURI: nsIURI, type: u32): void; + sheetRegistered(sheetURI: nsIURI, type: u32): boolean; + preloadSheet(sheetURI: nsIURI, type: u32): nsIPreloadedStyleSheet; + preloadSheetAsync(sheetURI: nsIURI, type: u32): any; + unregisterSheet(sheetURI: nsIURI, type: u32): void; +} + +// https://searchfox.org/mozilla-central/source/layout/xul/tree/nsITreeSelection.idl + +interface nsITreeSelection extends nsISupports { + tree: XULTreeElement; + readonly single: boolean; + readonly count: i32; + isSelected(index: i32): boolean; + select(index: i32): void; + timedSelect(index: i32, delay: i32): void; + toggleSelect(index: i32): void; + rangedSelect(startIndex: i32, endIndex: i32, augment: boolean): void; + clearRange(startIndex: i32, endIndex: i32): void; + clearSelection(): void; + selectAll(): void; + getRangeCount(): i32; + getRangeAt(i: i32, min: OutParam, max: OutParam): void; + invalidateSelection(): void; + adjustSelection(index: i32, count: i32): void; + selectEventsSuppressed: boolean; + currentIndex: i32; + readonly shiftSelectPivot: i32; +} + +// https://searchfox.org/mozilla-central/source/layout/xul/tree/nsITreeView.idl + +interface nsITreeView extends nsISupports { + readonly DROP_BEFORE: -1; + readonly DROP_ON: 0; + readonly DROP_AFTER: 1; + + readonly rowCount: i32; + selection: nsITreeSelection; + getRowProperties(index: i32): string; + getCellProperties(row: i32, col: TreeColumn): string; + getColumnProperties(col: TreeColumn): string; + isContainer(index: i32): boolean; + isContainerOpen(index: i32): boolean; + isContainerEmpty(index: i32): boolean; + isSeparator(index: i32): boolean; + isSorted(): boolean; + canDrop(index: i32, orientation: i32, dataTransfer: DataTransfer): boolean; + drop(row: i32, orientation: i32, dataTransfer: DataTransfer): void; + getParentIndex(rowIndex: i32): i32; + hasNextSibling(rowIndex: i32, afterIndex: i32): boolean; + getLevel(index: i32): i32; + getImageSrc(row: i32, col: TreeColumn): string; + getCellValue(row: i32, col: TreeColumn): string; + getCellText(row: i32, col: TreeColumn): string; + setTree(tree: XULTreeElement): void; + toggleOpenState(index: i32): void; + cycleHeader(col: TreeColumn): void; + selectionChanged(): void; + cycleCell(row: i32, col: TreeColumn): void; + isEditable(row: i32, col: TreeColumn): boolean; + setCellValue(row: i32, col: TreeColumn, value: string): void; + setCellText(row: i32, col: TreeColumn, value: string): void; +} + +// https://searchfox.org/mozilla-central/source/intl/locale/mozILocaleService.idl + +interface mozILocaleService extends nsISupports { + readonly langNegStrategyFiltering: 0; + readonly langNegStrategyMatching: 1; + readonly langNegStrategyLookup: 2; + + readonly defaultLocale: string; + readonly lastFallbackLocale: string; + readonly appLocalesAsLangTags: string[]; + readonly appLocalesAsBCP47: string[]; + readonly regionalPrefsLocales: string[]; + readonly webExposedLocales: string[]; + negotiateLanguages(aRequested: string[], aAvailable: string[], aDefaultLocale?: string, langNegStrategy?: i32): string[]; + readonly appLocaleAsLangTag: string; + readonly appLocaleAsBCP47: string; + requestedLocales: string[]; + readonly requestedLocale: string; + availableLocales: string[]; + readonly isAppLocaleRTL: boolean; + readonly packagedLocales: string[]; +} + +// https://searchfox.org/mozilla-central/source/intl/locale/mozIOSPreferences.idl + +interface mozIOSPreferences extends nsISupports { + readonly dateTimeFormatStyleNone: 0; + readonly dateTimeFormatStyleShort: 1; + readonly dateTimeFormatStyleMedium: 2; + readonly dateTimeFormatStyleLong: 3; + readonly dateTimeFormatStyleFull: 4; + + readonly systemLocales: string[]; + readonly regionalPrefsLocales: string[]; + readonly systemLocale: string; + getDateTimePattern(timeFormatStyle: i32, dateFormatStyle: i32, locale?: string): string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginInfo.idl + +interface nsILoginInfo extends nsISupports { + readonly displayOrigin: string; + origin: string; + hostname: string; + formActionOrigin: string; + formSubmitURL: string; + httpRealm: string; + username: string; + usernameField: string; + password: string; + passwordField: string; + unknownFields: string; + everSynced: boolean; + syncCounter: i32; + init(aOrigin: string, aFormActionOrigin: string, aHttpRealm: string, aUsername: string, aPassword: string, aUsernameField?: string, aPasswordField?: string): void; + equals(aLoginInfo: nsILoginInfo): boolean; + matches(aLoginInfo: nsILoginInfo, ignorePassword: boolean): boolean; + clone(): nsILoginInfo; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginManager.idl + +interface nsILoginSearchCallback extends nsISupports { + onSearchComplete(aLogins: nsILoginInfo[]): void; +} + +interface nsILoginManager extends nsISupports { + readonly initializationPromise: Promise; + addLogin(aLogin: nsILoginInfo): nsILoginInfo; + addLoginAsync(aLogin: nsILoginInfo): Promise; + addLogins(aLogins: any): Promise; + removeLogin(aLogin: nsILoginInfo): void; + modifyLogin(oldLogin: nsILoginInfo, newLoginData: nsISupports): void; + recordPasswordUse(aLogin: nsILoginInfo, aPrivateContextWithoutExplicitConsent: boolean, aLoginType: string, aFilled: boolean): void; + removeAllUserFacingLogins(): void; + removeAllLogins(): void; + getAllLogins(): Promise; + getAllLoginsWithCallback(aCallback: nsILoginSearchCallback): void; + getAllDisabledHosts(): string[]; + getLoginSavingEnabled(aHost: string): boolean; + setLoginSavingEnabled(aHost: string, isEnabled: boolean): void; + findLogins(aOrigin: string, aActionOrigin: string, aHttpRealm: string): nsILoginInfo[]; + countLogins(aOrigin: string, aActionOrigin: string, aHttpRealm: string): u32; + searchLoginsAsync(matchData: any): Promise; + searchLogins(matchData: nsIPropertyBag): nsILoginInfo[]; + getSyncID(): Promise; + setSyncID(syncID: string): Promise; + getLastSync(): Promise; + setLastSync(timestamp: double): Promise; + ensureCurrentSyncID(newSyncID: string): Promise; + readonly uiBusy: boolean; + readonly isLoggedIn: boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginManagerAuthPrompter.idl + +interface nsILoginManagerAuthPrompter extends nsISupports { + init(aWindow: nsIDOMWindow): void; + browser: Element; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginManagerCrypto.idl + +interface nsILoginManagerCrypto extends nsISupports { + readonly ENCTYPE_BASE64: 0; + readonly ENCTYPE_SDR: 1; + + encrypt(plainText: string): string; + encryptMany(plainTexts: any): Promise; + decrypt(cipherText: string): string; + decryptMany(cipherTexts: any): Promise; + readonly uiBusy: boolean; + readonly isLoggedIn: boolean; + readonly defaultEncType: u32; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginManagerPrompter.idl + +interface nsILoginManagerPrompter extends nsISupports { + promptToSavePassword(aBrowser: Element, aLogin: nsILoginInfo, dismissed?: boolean, notifySaved?: boolean, autoFilledLoginGuid?: string, possibleValues?: any): nsIPromptInstance; + promptToChangePassword(aBrowser: Element, aOldLogin: nsILoginInfo, aNewLogin: nsILoginInfo, dismissed?: boolean, notifySaved?: boolean, autoSavedLoginGuid?: string, autoFilledLoginGuid?: string, possibleValues?: any): nsIPromptInstance; + promptToChangePasswordWithUsernames(aBrowser: Element, logins: nsILoginInfo[], aNewLogin: nsILoginInfo): nsIPromptInstance; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginMetaInfo.idl + +interface nsILoginMetaInfo extends nsISupports { + guid: string; + timeCreated: u64; + timeLastUsed: u64; + timePasswordChanged: u64; + timesUsed: u32; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsIPromptInstance.idl + +interface nsIPromptInstance extends nsISupports { + dismiss(): void; +} + +// https://searchfox.org/mozilla-central/source/browser/components/migration/nsIEdgeMigrationUtils.idl + +interface nsIEdgeMigrationUtils extends nsISupports { + isDbLocked(aFile: nsIFile): Promise; +} + +// https://searchfox.org/mozilla-central/source/netwerk/mime/nsIMIMEHeaderParam.idl + +interface nsIMIMEHeaderParam extends nsISupports { + getParameter(aHeaderVal: string, aParamName: string, aFallbackCharset: string, aTryLocaleCharset: boolean, aLang: OutParam): string; + getParameterHTTP(aHeaderVal: string, aParamName: string, aFallbackCharset: string, aTryLocaleCharset: boolean, aLang: OutParam): string; + decodeRFC5987Param(aParamVal: string, aLang: OutParam): string; +} + +// https://searchfox.org/mozilla-central/source/netwerk/mime/nsIMIMEInfo.idl + +interface nsIHandlerInfo extends nsISupports { + readonly saveToDisk: 0; + readonly alwaysAsk: 1; + readonly useHelperApp: 2; + readonly handleInternally: 3; + readonly useSystemDefault: 4; + + readonly type: string; + description: string; + preferredApplicationHandler: nsIHandlerApp; + readonly possibleApplicationHandlers: nsIMutableArray; + readonly hasDefaultHandler: boolean; + readonly defaultDescription: string; + readonly defaultExecutable: nsIFile; + launchWithURI(aURI: nsIURI, aBrowsingContext?: BrowsingContext): void; + preferredAction: nsHandlerInfoAction; + alwaysAskBeforeHandling: boolean; +} + +interface nsIMIMEInfo extends nsIHandlerInfo { + getFileExtensions(): nsIUTF8StringEnumerator; + setFileExtensions(aExtensions: string): void; + extensionExists(aExtension: string): boolean; + appendExtension(aExtension: string): void; + primaryExtension: string; + readonly MIMEType: string; + equals(aMIMEInfo: nsIMIMEInfo): boolean; + readonly possibleLocalHandlers: nsIArray; + launchWithFile(aFile: nsIFile): void; + isCurrentAppOSDefault(): boolean; +} + +interface nsIHandlerApp extends nsISupports { + name: string; + detailedDescription: string; + equals(aHandlerApp: nsIHandlerApp): boolean; + launchWithURI(aURI: nsIURI, aBrowsingContext?: BrowsingContext): void; +} + +interface nsILocalHandlerApp extends nsIHandlerApp { + executable: nsIFile; + readonly parameterCount: u32; + prettyNameAsync(): Promise; + clearParameters(): void; + appendParameter(param: string): void; + getParameter(parameterIndex: u32): string; + parameterExists(param: string): boolean; +} + +interface nsIWebHandlerApp extends nsIHandlerApp { + uriTemplate: string; +} + +interface nsIDBusHandlerApp extends nsIHandlerApp { + service: string; + objectPath: string; + dBusInterface: string; + method: string; +} + +// https://searchfox.org/mozilla-central/source/netwerk/mime/nsIMIMEService.idl + +interface nsIMIMEService extends nsISupports { + readonly VALIDATE_DEFAULT: 0; + readonly VALIDATE_SANITIZE_ONLY: 1; + readonly VALIDATE_DONT_COLLAPSE_WHITESPACE: 2; + readonly VALIDATE_DONT_TRUNCATE: 4; + readonly VALIDATE_GUESS_FROM_EXTENSION: 8; + readonly VALIDATE_ALLOW_EMPTY: 16; + readonly VALIDATE_NO_DEFAULT_FILENAME: 32; + readonly VALIDATE_FORCE_APPEND_EXTENSION: 64; + readonly VALIDATE_ALLOW_INVALID_FILENAMES: 128; + readonly VALIDATE_ALLOW_DIRECTORY_NAMES: 256; + + getFromTypeAndExtension(aMIMEType: string, aFileExt: string): nsIMIMEInfo; + getTypeFromExtension(aFileExt: string): string; + getTypeFromURI(aURI: nsIURI): string; + getDefaultTypeFromURI(aURI: nsIURI): string; + getTypeFromFile(aFile: nsIFile): string; + getPrimaryExtension(aMIMEType: string, aFileExt: string): string; + getMIMEInfoFromOS(aType: string, aFileExtension: string, aFound: OutParam): nsIMIMEInfo; + updateDefaultAppInfo(aMIMEInfo: nsIMIMEInfo): void; + getValidFileName(aChannel: nsIChannel, aType: string, aOriginalURI: nsIURI, aFlags: u32): string; + validateFileNameForSaving(aFileName: string, aType: string, aFlags: u32): string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/ml/nsIMLUtils.idl + +interface nsIMLUtils extends nsISupports { + hasEnoughMemoryToInfer(aModelSizeInMemory: u64, aThresholdPercentage: u32, aMinMemoryRequirement: u64): boolean; + getOptimalCPUConcurrency(): u8; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/find/nsIFind.idl + +interface nsIFind extends nsISupports { + findBackwards: boolean; + caseSensitive: boolean; + entireWord: boolean; + matchDiacritics: boolean; + Find(aPatText: string, aSearchRange: Range, aStartPoint: Range, aEndPoint: Range): Range; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/find/nsIFindService.idl + +interface nsIFindService extends nsISupports { + searchString: string; + replaceString: string; + findBackwards: boolean; + wrapFind: boolean; + entireWord: boolean; + matchCase: boolean; + matchDiacritics: boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/find/nsIWebBrowserFind.idl + +interface nsIWebBrowserFind extends nsISupports { + findNext(): boolean; + searchString: string; + findBackwards: boolean; + wrapFind: boolean; + entireWord: boolean; + matchCase: boolean; + matchDiacritics: boolean; + searchFrames: boolean; +} + +interface nsIWebBrowserFindInFrames extends nsISupports { + currentSearchFrame: mozIDOMWindowProxy; + rootSearchFrame: mozIDOMWindowProxy; + searchSubframes: boolean; + searchParentFrames: boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIMozIntl.idl + +interface mozIMozIntl extends nsISupports { + getCalendarInfo(locales?: any): any; + getDisplayNamesDeprecated(locales?: any, options?: any): any; + getAvailableLocaleDisplayNames(type: any): any; + getLanguageDisplayNames(locales: any, langCodes: any): any; + getRegionDisplayNames(locales: any, regionCodes: any): any; + getLocaleDisplayNames(locales: any, localeCodes: any, options?: any): any; + getScriptDirection(locale: any): any; + stringHasRTLChars(str: any): boolean; + readonly Collator: any; + readonly DateTimeFormat: any; + readonly DisplayNames: any; + readonly ListFormat: any; + readonly Locale: any; + readonly NumberFormat: any; + readonly PluralRules: any; + readonly RelativeTimeFormat: any; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/mozintl/mozIMozIntlHelper.idl + +interface mozIMozIntlHelper extends nsISupports { + addGetCalendarInfo(intlObject: any): void; + addDateTimeFormatConstructor(intlObject: any): void; + addDisplayNamesConstructor(intlObject: any): void; + stringHasRTLChars(str: any): boolean; } // https://searchfox.org/mozilla-central/source/netwerk/base/mozIThirdPartyUtil.idl @@ -11085,513 +7508,317 @@ interface nsPISocketTransportService extends nsIRoutedSocketTransportService { readonly keepaliveProbeCount: i32; } -// https://searchfox.org/mozilla-central/source/dom/workers/nsIWorkerChannelInfo.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/about/nsIAboutModule.idl -interface nsIWorkerChannelLoadInfo extends nsISupports { - workerAssociatedBrowsingContextID: u64; - readonly workerAssociatedBrowsingContext: BrowsingContext; +interface nsIAboutModule extends nsISupports { + readonly URI_SAFE_FOR_UNTRUSTED_CONTENT: 1; + readonly ALLOW_SCRIPT: 2; + readonly HIDE_FROM_ABOUTABOUT: 4; + readonly ENABLE_INDEXED_DB: 8; + readonly URI_CAN_LOAD_IN_CHILD: 16; + readonly URI_MUST_LOAD_IN_CHILD: 32; + readonly MAKE_UNLINKABLE: 64; + readonly MAKE_LINKABLE: 128; + readonly URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS: 256; + readonly URI_MUST_LOAD_IN_EXTENSION_PROCESS: 512; + readonly IS_SECURE_CHROME_UI: 1024; + + newChannel(aURI: nsIURI, aLoadInfo: nsILoadInfo): nsIChannel; + getURIFlags(aURI: nsIURI): u32; + getChromeURI(aURI: nsIURI): nsIURI; } -interface nsIWorkerChannelInfo extends nsISupports { - loadInfo: nsIWorkerChannelLoadInfo; - readonly channelId: u64; +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheEntry.idl + +interface nsICacheEntry extends nsISupports { + readonly CONTENT_TYPE_UNKNOWN: 0; + readonly CONTENT_TYPE_OTHER: 1; + readonly CONTENT_TYPE_JAVASCRIPT: 2; + readonly CONTENT_TYPE_IMAGE: 3; + readonly CONTENT_TYPE_MEDIA: 4; + readonly CONTENT_TYPE_STYLESHEET: 5; + readonly CONTENT_TYPE_WASM: 6; + readonly CONTENT_TYPE_LAST: 7; + readonly NO_EXPIRATION_TIME: 4294967295; + + readonly key: string; + readonly cacheEntryId: u64; + readonly persistent: boolean; + readonly fetchCount: u32; + readonly lastFetched: u32; + readonly lastModified: u32; + readonly expirationTime: u32; + setExpirationTime(expirationTime: u32): void; + readonly onStartTime: u64; + readonly onStopTime: u64; + setNetworkTimes(onStartTime: u64, onStopTime: u64): void; + setContentType(contentType: u8): void; + forceValidFor(aSecondsToTheFuture: u32): void; + readonly isForcedValid: boolean; + markForcedValidUse(): void; + openInputStream(offset: i64): nsIInputStream; + openOutputStream(offset: i64, predictedSize: i64): nsIOutputStream; + securityInfo: nsITransportSecurityInfo; + readonly storageDataSize: u32; + asyncDoom(listener: nsICacheEntryDoomCallback): void; + getMetaDataElement(key: string): string; + setMetaDataElement(key: string, value: string): void; + visitMetaData(visitor: nsICacheEntryMetaDataVisitor): void; + metaDataReady(): void; + setValid(): void; + dismiss(): void; + readonly diskStorageSizeInKB: u32; + recreate(aMemoryOnly?: boolean): nsICacheEntry; + readonly dataSize: i64; + readonly altDataSize: i64; + readonly altDataType: string; + openAlternativeOutputStream(type: string, predictedSize: i64): nsIAsyncOutputStream; + openAlternativeInputStream(type: string): nsIInputStream; + readonly loadContextInfo: nsILoadContextInfo; } -// https://searchfox.org/mozilla-central/source/dom/workers/nsIWorkerDebugger.idl - -interface nsIWorkerDebuggerListener extends nsISupports { - onClose(): void; - onError(filename: string, lineno: u32, message: string): void; - onMessage(message: string): void; +interface nsICacheEntryMetaDataVisitor extends nsISupports { + onMetaDataElement(key: string, value: string): void; } -interface nsIWorkerDebugger extends nsISupports { - readonly TYPE_DEDICATED: 0; - readonly TYPE_SHARED: 1; - readonly TYPE_SERVICE: 2; +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheEntryDoomCallback.idl + +interface nsICacheEntryDoomCallback extends nsISupports { + onCacheEntryDoomed(aResult: nsresult): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheEntryOpenCallback.idl + +interface nsICacheEntryOpenCallback extends nsISupports { + readonly ENTRY_WANTED: 0; + readonly RECHECK_AFTER_WRITE_FINISHED: 1; + readonly ENTRY_NEEDS_REVALIDATION: 2; + readonly ENTRY_NOT_WANTED: 3; + + onCacheEntryCheck(aEntry: nsICacheEntry): u32; + onCacheEntryAvailable(aEntry: nsICacheEntry, aNew: boolean, aResult: nsresult): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICachePurgeLock.idl + +interface nsICachePurgeLock extends nsISupports { + lock(profileName: string): void; + isOtherInstanceRunning(): boolean; + unlock(): void; + getLockFile(profileName: string): nsIFile; +} + +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheStorage.idl + +interface nsICacheStorage extends nsISupports { + readonly OPEN_NORMALLY: 0; + readonly OPEN_TRUNCATE: 1; + readonly OPEN_READONLY: 2; + readonly OPEN_PRIORITY: 4; + readonly OPEN_BYPASS_IF_BUSY: 8; + readonly CHECK_MULTITHREADED: 16; + readonly OPEN_SECRETLY: 32; + readonly OPEN_INTERCEPTED: 64; + + asyncOpenURI(aURI: nsIURI, aIdExtension: string, aFlags: u32, aCallback: nsICacheEntryOpenCallback): void; + openTruncate(aURI: nsIURI, aIdExtension: string): nsICacheEntry; + exists(aURI: nsIURI, aIdExtension: string): boolean; + getCacheIndexEntryAttrs(aURI: nsIURI, aIdExtension: string, aHasAltData: OutParam, aSizeInKB: OutParam): void; + asyncDoomURI(aURI: nsIURI, aIdExtension: string, aCallback: nsICacheEntryDoomCallback): void; + asyncEvictStorage(aCallback: nsICacheEntryDoomCallback): void; + asyncVisitStorage(aVisitor: nsICacheStorageVisitor, aVisitEntries: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheStorageService.idl + +interface nsICacheStorageService extends nsISupports { + readonly PURGE_DISK_DATA_ONLY: 1; + readonly PURGE_DISK_ALL: 2; + readonly PURGE_EVERYTHING: 3; + + memoryCacheStorage(aLoadContextInfo: nsILoadContextInfo): nsICacheStorage; + diskCacheStorage(aLoadContextInfo: nsILoadContextInfo): nsICacheStorage; + pinningCacheStorage(aLoadContextInfo: nsILoadContextInfo): nsICacheStorage; + clearOrigin(aPrincipal: nsIPrincipal): void; + clearBaseDomain(aBaseDomain: string): void; + clearOriginAttributes(aOriginAttributes: string): void; + clear(): void; + purgeFromMemory(aWhat: u32): void; + readonly ioTarget: nsIEventTarget; + asyncGetDiskConsumption(aObserver: nsICacheStorageConsumptionObserver): void; + asyncVisitAllStorages(aVisitor: nsICacheStorageVisitor, aVisitEntries: boolean): void; +} + +interface nsICacheStorageConsumptionObserver extends nsISupports { + onNetworkCacheDiskConsumption(aDiskSize: i64): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheStorageVisitor.idl + +interface nsICacheStorageVisitor extends nsISupports { + onCacheStorageInfo(aEntryCount: u32, aConsumption: u64, aCapacity: u64, aDiskDirectory: nsIFile): void; + onCacheEntryInfo(aURI: nsIURI, aIdEnhance: string, aDataSize: i64, aAltDataSize: i64, aFetchCount: u32, aLastModifiedTime: u32, aExpirationTime: u32, aPinned: boolean, aInfo: nsILoadContextInfo): void; + onCacheEntryVisitCompleted(): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheTesting.idl + +interface nsICacheTesting extends nsISupports { + suspendCacheIOThread(aLevel: u32): void; + resumeCacheIOThread(): void; + flush(aObserver: nsIObserver): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookie.idl + +} // global + +declare namespace nsICookie { + +enum schemeType { + SCHEME_UNSET = 0, + SCHEME_HTTP = 1, + SCHEME_HTTPS = 2, + SCHEME_FILE = 4, +} + +} + +declare global { + +interface nsICookie extends nsISupports, Enums { + readonly SAMESITE_NONE: 0; + readonly SAMESITE_LAX: 1; + readonly SAMESITE_STRICT: 2; - readonly isClosed: boolean; - readonly isChrome: boolean; - readonly isInitialized: boolean; - readonly parent: nsIWorkerDebugger; - readonly type: u32; - readonly url: string; - readonly window: mozIDOMWindow; - readonly windowIDs: u64[]; - readonly principal: nsIPrincipal; - readonly serviceWorkerID: u32; - readonly id: string; readonly name: string; - initialize(url: string): void; - postMessage(message: string): void; - addListener(listener: nsIWorkerDebuggerListener): void; - removeListener(listener: nsIWorkerDebuggerListener): void; - setDebuggerReady(ready: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/dom/workers/nsIWorkerDebuggerManager.idl - -interface nsIWorkerDebuggerManagerListener extends nsISupports { - onRegister(aDebugger: nsIWorkerDebugger): void; - onUnregister(aDebugger: nsIWorkerDebugger): void; -} - -interface nsIWorkerDebuggerManager extends nsISupports { - getWorkerDebuggerEnumerator(): nsISimpleEnumerator; - addListener(listener: nsIWorkerDebuggerManagerListener): void; - removeListener(listener: nsIWorkerDebuggerManagerListener): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIDialogParamBlock.idl - -interface nsIDialogParamBlock extends nsISupports { - GetInt(inIndex: i32): i32; - SetInt(inIndex: i32, inInt: i32): void; - SetNumberStrings(inNumStrings: i32): void; - GetString(inIndex: i32): string; - SetString(inIndex: i32, inString: string): void; - objects: nsIMutableArray; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl - -interface nsIOpenWindowInfo extends nsISupports { - readonly parent: BrowsingContext; - readonly isRemote: boolean; - readonly forceNoOpener: boolean; - readonly isForPrinting: boolean; - readonly isForWindowDotPrint: boolean; - readonly isTopLevelCreatedByWebContent: boolean; - readonly hasValidUserGestureActivation: boolean; - readonly textDirectiveUserActivation: boolean; + readonly value: string; + readonly isDomain: boolean; + readonly host: string; + readonly rawHost: string; + readonly path: string; + readonly isSecure: boolean; + readonly expires: u64; + readonly expiry: i64; readonly originAttributes: any; - cancel(): void; + readonly isSession: boolean; + readonly isHttpOnly: boolean; + readonly creationTime: i64; + readonly lastAccessed: i64; + readonly sameSite: i32; + readonly schemeMap: nsICookie.schemeType; + readonly isPartitioned: boolean; } -// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptCollection.idl +// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieJarSettings.idl -interface nsIPromptCollection extends nsISupports { - asyncBeforeUnloadCheck(aBrowsingContext: BrowsingContext): Promise; - confirmRepost(aBrowsingContext: BrowsingContext): boolean; - confirmFolderUpload(aBrowsingContext: BrowsingContext, aDirectoryName: string): boolean; +interface nsICookieJarSettings extends nsISerializable { + readonly cookieBehavior: u32; + readonly isFirstPartyIsolated: boolean; + readonly shouldResistFingerprinting: boolean; + readonly rejectThirdPartyContexts: boolean; + readonly limitForeignContexts: boolean; + readonly blockingAllThirdPartyContexts: boolean; + readonly blockingAllContexts: boolean; + partitionForeign: boolean; + readonly isOnContentBlockingAllowList: boolean; + readonly partitionKey: string; + readonly fingerprintingRandomizationKey: u8[]; + cookiePermission(aPrincipal: nsIPrincipal): u32; + initWithURI(aURI: nsIURI, aIsPrivate: boolean): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptFactory.idl +// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieManager.idl -interface nsIPromptFactory extends nsISupports { - getPrompt(aParent: mozIDOMWindowProxy, iid: T): nsQIResult; +interface nsICookieManager extends nsISupports { + removeAll(): void; + readonly cookies: nsICookie[]; + readonly sessionCookies: nsICookie[]; + getCookieBehavior(aIsPrivate: boolean): u32; + remove(aHost: string, aName: string, aPath: string, aOriginAttributes: any): void; + add(aHost: string, aPath: string, aName: string, aValue: string, aIsSecure: boolean, aIsHttpOnly: boolean, aIsSession: boolean, aExpiry: i64, aOriginAttributes: any, aSameSite: i32, aSchemeMap: nsICookie.schemeType, aIsPartitioned?: boolean): void; + cookieExists(aHost: string, aPath: string, aName: string, aOriginAttributes: any): boolean; + countCookiesFromHost(aHost: string): u32; + getCookiesFromHost(aHost: string, aOriginAttributes: any, aSorted?: boolean): nsICookie[]; + getCookiesWithOriginAttributes(aPattern: string, aHost?: string, aSorted?: boolean): nsICookie[]; + removeCookiesWithOriginAttributes(aPattern: string, aHost?: string): void; + removeCookiesFromExactHost(aHost: string, aPattern: string): void; + removeAllSince(aSinceWhen: i64): Promise; + getCookiesSince(aSinceWhen: i64): nsICookie[]; + addThirdPartyCookieBlockingExceptions(aExcpetions: nsIThirdPartyCookieExceptionEntry[]): void; + removeThirdPartyCookieBlockingExceptions(aExceptions: nsIThirdPartyCookieExceptionEntry[]): void; + testGet3PCBExceptions(): string[]; } -// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptService.idl +// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieNotification.idl -interface nsIPromptService extends nsISupports { - readonly BUTTON_POS_0: 1; - readonly BUTTON_POS_1: 256; - readonly BUTTON_POS_2: 65536; - readonly BUTTON_TITLE_OK: 1; - readonly BUTTON_TITLE_CANCEL: 2; - readonly BUTTON_TITLE_YES: 3; - readonly BUTTON_TITLE_NO: 4; - readonly BUTTON_TITLE_SAVE: 5; - readonly BUTTON_TITLE_DONT_SAVE: 6; - readonly BUTTON_TITLE_REVERT: 7; - readonly BUTTON_TITLE_IS_STRING: 127; - readonly BUTTON_POS_0_DEFAULT: 0; - readonly BUTTON_POS_1_DEFAULT: 16777216; - readonly BUTTON_POS_2_DEFAULT: 33554432; - readonly BUTTON_DELAY_ENABLE: 67108864; - readonly SHOW_SPINNER: 134217728; - readonly BUTTON_NONE_ENABLE_BIT: 268435456; - readonly BUTTON_NONE: 268435583; - readonly BUTTON_POS_1_IS_SECONDARY: 536870912; - readonly STD_OK_CANCEL_BUTTONS: 513; - readonly STD_YES_NO_BUTTONS: 1027; - readonly MODAL_TYPE_CONTENT: 1; - readonly MODAL_TYPE_TAB: 2; - readonly MODAL_TYPE_WINDOW: 3; - readonly MODAL_TYPE_INTERNAL_WINDOW: 4; +} // global - alert(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string): void; - alertBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): void; - asyncAlert(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): Promise; - alertCheck(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): void; - alertCheckBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): void; - asyncAlertCheck(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: boolean): Promise; - confirm(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string): boolean; - confirmBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): boolean; - asyncConfirm(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): Promise; - confirmCheck(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): boolean; - confirmCheckBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): boolean; - asyncConfirmCheck(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: boolean): Promise; - confirmEx(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aButtonFlags: u32, aButton0Title: string, aButton1Title: string, aButton2Title: string, aCheckMsg: string, aCheckState: InOutParam): i32; - confirmExBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aButtonFlags: u32, aButton0Title: string, aButton1Title: string, aButton2Title: string, aCheckMsg: string, aCheckState: InOutParam): i32; - asyncConfirmEx(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aButtonFlags: u32, aButton0Title: string, aButton1Title: string, aButton2Title: string, aCheckMsg: string, aCheckState: boolean, aExtraArgs?: any): Promise; - prompt(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aValue: InOutParam, aCheckMsg: string, aCheckState: InOutParam): boolean; - promptBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aValue: InOutParam, aCheckMsg: string, aCheckState: InOutParam): boolean; - asyncPrompt(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aValue: string, aCheckMsg: string, aCheckState: boolean): Promise; - promptUsernameAndPassword(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aUsername: InOutParam, aPassword: InOutParam): boolean; - promptUsernameAndPasswordBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aUsername: InOutParam, aPassword: InOutParam): boolean; - asyncPromptUsernameAndPassword(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aUsername: string, aPassword: string): Promise; - promptPassword(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aPassword: InOutParam): boolean; - promptPasswordBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aPassword: InOutParam): boolean; - asyncPromptPassword(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aPassword: string): Promise; - select(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aSelectList: string[], aOutSelection: OutParam): boolean; - selectBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aSelectList: string[], aOutSelection: OutParam): boolean; - asyncSelect(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aSelectList: string[]): Promise; - promptAuth(aParent: mozIDOMWindowProxy, aChannel: nsIChannel, level: u32, authInfo: nsIAuthInformation): boolean; - promptAuthBC(aBrowsingContext: BrowsingContext, modalType: u32, aChannel: nsIChannel, level: u32, authInfo: nsIAuthInformation): boolean; - asyncPromptAuth(aBrowsingContext: BrowsingContext, modalType: u32, aChannel: nsIChannel, level: u32, authInfo: nsIAuthInformation): Promise; - confirmUserPaste(aWindow: WindowGlobalParent): Promise; +declare namespace nsICookieNotification { + +enum Action { + COOKIE_DELETED = 0, + COOKIE_ADDED = 1, + COOKIE_CHANGED = 2, + ALL_COOKIES_CLEARED = 3, + COOKIES_BATCH_DELETED = 4, } -// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIWindowWatcher.idl - -interface nsIWindowWatcher extends nsISupports { - openWindow(aParent: mozIDOMWindowProxy, aUrl: string, aName: string, aFeatures: string, aArguments: nsISupports): mozIDOMWindowProxy; - registerNotification(aObserver: nsIObserver): void; - unregisterNotification(aObserver: nsIObserver): void; - getWindowEnumerator(): nsISimpleEnumerator; - getNewPrompter(aParent: mozIDOMWindowProxy): nsIPrompt; - getNewAuthPrompter(aParent: mozIDOMWindowProxy): nsIAuthPrompt; - setWindowCreator(creator: nsIWindowCreator): void; - hasWindowCreator(): boolean; - getChromeForWindow(aWindow: mozIDOMWindowProxy): nsIWebBrowserChrome; - getWindowByName(aTargetName: string): mozIDOMWindowProxy; - readonly activeWindow: mozIDOMWindowProxy; } -// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsPIWindowWatcher.idl +declare global { -// https://searchfox.org/mozilla-central/source/layout/base/nsILayoutHistoryState.idl - -interface nsILayoutHistoryState extends nsISupports { - readonly hasStates: boolean; - getKeys(): string[]; - getPresState(aKey: string, aScrollX: OutParam, aScrollY: OutParam, aAllowScrollOriginDowngrade: OutParam, aRes: OutParam): void; - addNewPresState(aKey: string, aScrollX: float, aScrollY: float, aAllowScrollOriginDowngrade: boolean, aRes: float): void; -} - -// https://searchfox.org/mozilla-central/source/layout/base/nsIPreloadedStyleSheet.idl - -interface nsIPreloadedStyleSheet extends nsISupports { -} - -// https://searchfox.org/mozilla-central/source/layout/base/nsISVGPaintContext.idl - -interface nsISVGPaintContext extends nsISupports { - readonly fillColor: string; - readonly strokeColor: string; - readonly fillOpacity: float; - readonly strokeOpacity: float; -} - -// https://searchfox.org/mozilla-central/source/layout/base/nsIStyleSheetService.idl - -interface nsIStyleSheetService extends nsISupports { - readonly AGENT_SHEET: 0; - readonly USER_SHEET: 1; - readonly AUTHOR_SHEET: 2; - - loadAndRegisterSheet(sheetURI: nsIURI, type: u32): void; - sheetRegistered(sheetURI: nsIURI, type: u32): boolean; - preloadSheet(sheetURI: nsIURI, type: u32): nsIPreloadedStyleSheet; - preloadSheetAsync(sheetURI: nsIURI, type: u32): any; - unregisterSheet(sheetURI: nsIURI, type: u32): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/downloads/mozIDownloadPlatform.idl - -interface mozIDownloadPlatform extends nsISupports { - readonly ZONE_MY_COMPUTER: 0; - readonly ZONE_INTRANET: 1; - readonly ZONE_TRUSTED: 2; - readonly ZONE_INTERNET: 3; - readonly ZONE_RESTRICTED: 4; - - downloadDone(aSource: nsIURI, aReferrer: nsIURI, aTarget: nsIFile, aContentType: string, aIsPrivate: boolean): Promise; - mapUrlToZone(aURL: string): u32; -} - -// https://searchfox.org/mozilla-central/source/intl/uconv/nsIScriptableUConv.idl - -interface nsIScriptableUnicodeConverter extends nsISupports { - ConvertFromUnicode(aSrc: string): string; - Finish(): string; - ConvertToUnicode(aSrc: string): string; - charset: string; - isInternal: boolean; -} - -// https://searchfox.org/mozilla-central/source/intl/uconv/nsITextToSubURI.idl - -interface nsITextToSubURI extends nsISupports { - ConvertAndEscape(charset: string, text: string): string; - UnEscapeAndConvert(charset: string, text: string): string; - unEscapeURIForUI(aURIFragment: string, aDontEscape?: boolean): string; - unEscapeNonAsciiURI(aCharset: string, aURIFragment: string): string; -} - -// https://searchfox.org/mozilla-central/source/devtools/platform/IJSDebugger.idl - -interface IJSDebugger extends nsISupports { - addClass(global: any): void; -} - -// https://searchfox.org/mozilla-central/source/devtools/platform/nsIJSInspector.idl - -interface nsIJSInspector extends nsISupports { - enterNestedEventLoop(requestor: any): u32; - exitNestedEventLoop(): u32; - readonly eventLoopNestLevel: u32; - readonly lastNestRequestor: any; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/typeaheadfind/nsITypeAheadFind.idl - -interface nsITypeAheadFind extends nsISupports { - readonly FIND_INITIAL: 0; - readonly FIND_NEXT: 1; - readonly FIND_PREVIOUS: 2; - readonly FIND_FIRST: 3; - readonly FIND_LAST: 4; - readonly FIND_FOUND: 0; - readonly FIND_NOTFOUND: 1; - readonly FIND_WRAPPED: 2; - readonly FIND_PENDING: 3; - - init(aDocShell: nsIDocShell): void; - find(aSearchString: string, aLinksOnly: boolean, aMode: u32, aDontIterateFrames: boolean): u16; - getFoundRange(): Range; - setDocShell(aDocShell: nsIDocShell): void; - setSelectionModeAndRepaint(toggle: i16): void; - collapseSelection(): void; - isRangeVisible(aRange: Range, aMustBeInViewPort: boolean): boolean; - isRangeRendered(aRange: Range): boolean; - readonly searchString: string; - caseSensitive: boolean; - matchDiacritics: boolean; - entireWord: boolean; - readonly foundLink: Element; - readonly foundEditable: Element; - readonly currentWindow: mozIDOMWindow; -} - -// https://searchfox.org/mozilla-central/source/docshell/shistory/nsIBFCacheEntry.idl - -interface nsIBFCacheEntry extends nsISupports { - RemoveFromBFCacheSync(): void; - RemoveFromBFCacheAsync(): void; -} - -// https://searchfox.org/mozilla-central/source/docshell/shistory/nsISHEntry.idl - -interface nsISHEntry extends nsISupports { - URI: nsIURI; - originalURI: nsIURI; - resultPrincipalURI: nsIURI; - unstrippedURI: nsIURI; - loadReplace: boolean; - title: string; - name: string; - isSubFrame: boolean; - hasUserInteraction: boolean; - hasUserActivation: boolean; - referrerInfo: nsIReferrerInfo; - documentViewer: nsIDocumentViewer; - readonly isInBFCache: boolean; - sticky: boolean; - windowState: nsISupports; - refreshURIList: nsIMutableArray; - postData: nsIInputStream; - readonly hasPostData: boolean; - layoutHistoryState: nsILayoutHistoryState; - parent: nsISHEntry; - loadType: u32; - ID: u32; - cacheKey: u32; - saveLayoutStateFlag: boolean; - contentType: string; - URIWasModified: boolean; - triggeringPrincipal: nsIPrincipal; - principalToInherit: nsIPrincipal; - partitionedPrincipalToInherit: nsIPrincipal; - csp: nsIContentSecurityPolicy; - stateData: nsIStructuredCloneContainer; - docshellID: nsID; - readonly isSrcdocEntry: boolean; - srcdocData: string; - baseURI: nsIURI; - scrollRestorationIsManual: boolean; - readonly loadedInThisProcess: boolean; - readonly childCount: i32; - persist: boolean; - setScrollPosition(x: i32, y: i32): void; - getScrollPosition(x: OutParam, y: OutParam): void; - initLayoutHistoryState(): nsILayoutHistoryState; - clone(): nsISHEntry; - hasDynamicallyAddedChild(): boolean; - adoptBFCacheEntry(aEntry: nsISHEntry): void; - abandonBFCacheEntry(): void; - sharesDocumentWith(aEntry: nsISHEntry): boolean; - setLoadTypeAsHistory(): void; - AddChild(aChild: nsISHEntry, aOffset: i32, aUseRemoteSubframes?: boolean): void; - GetChildAt(aIndex: i32): nsISHEntry; - readonly bfcacheID: u64; - wireframe: any; -} - -// https://searchfox.org/mozilla-central/source/docshell/shistory/nsISHistory.idl - -interface nsISHistory extends nsISupports { - readonly count: i32; - index: i32; - readonly requestedIndex: i32; - getEntryAtIndex(aIndex: i32): nsISHEntry; - purgeHistory(aNumEntries: i32): void; - addSHistoryListener(aListener: nsISHistoryListener): void; - removeSHistoryListener(aListener: nsISHistoryListener): void; - reloadCurrentEntry(): void; - addEntry(aEntry: nsISHEntry, aPersist: boolean): void; - updateIndex(): void; - replaceEntry(aIndex: i32, aReplaceEntry: nsISHEntry): void; - notifyOnHistoryReload(): boolean; - evictOutOfRangeDocumentViewers(aIndex: i32): void; - evictAllDocumentViewers(): void; - reload(aReloadFlags: u32): void; - createEntry(): nsISHEntry; - canGoBackFromEntryAtIndex(aIndex: i32): boolean; -} - -// https://searchfox.org/mozilla-central/source/docshell/shistory/nsISHistoryListener.idl - -interface nsISHistoryListener extends nsISupports { - OnHistoryNewEntry(aNewURI: nsIURI, aOldIndex: i32): void; - OnHistoryReload(): boolean; - OnHistoryGotoIndex(): void; - OnHistoryPurge(aNumEntries: i32): void; - OnHistoryTruncate(aNumEntries: i32): void; - OnHistoryReplaceEntry(): void; - OnDocumentViewerEvicted(aNumEvicted: u32): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/sessionstore/nsISessionStoreFunctions.idl - -interface nsISessionStoreFunctions extends nsISupports { - UpdateSessionStore(aBrowser: Element, aBrowsingContext: BrowsingContext, aPermanentKey: any, aEpoch: u32, aCollectSHistory: boolean, aData: any): void; - UpdateSessionStoreForStorage(aBrowser: Element, aBrowsingContext: BrowsingContext, aPermanentKey: any, aEpoch: u32, aData: any): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/sessionstore/nsISessionStoreRestoreData.idl - -interface nsISessionStoreRestoreData extends nsISupports { - url: string; - innerHTML: string; - scroll: string; - addTextField(aIsXPath: boolean, aIdOrXPath: string, aValue: string): void; - addCheckbox(aIsXPath: boolean, aIdOrXPath: string, aValue: boolean): void; - addFileList(aIsXPath: boolean, aIdOrXPath: string, aType: string, aFileList: string[]): void; - addSingleSelect(aIsXPath: boolean, aIdOrXPath: string, aSelectedIndex: u32, aValue: string): void; - addMultipleSelect(aIsXPath: boolean, aIdOrXPath: string, aValues: string[]): void; - addCustomElement(aIsXPath: boolean, aIdOrXPath: string, aValue: any, aState: any): void; - addChild(aChild: nsISessionStoreRestoreData, aIndex: u32): void; -} - -// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIAppShellService.idl - -interface nsIAppShellService extends nsISupports { - readonly SIZE_TO_CONTENT: -1; - - createTopLevelWindow(aParent: nsIAppWindow, aUrl: nsIURI, aChromeMask: u32, aInitialWidth: i32, aInitialHeight: i32): nsIAppWindow; - createWindowlessBrowser(aIsChrome?: boolean, aChromeMask?: u32): nsIWindowlessBrowser; - readonly hiddenWindow: nsIAppWindow; - readonly hiddenDOMWindow: mozIDOMWindowProxy; - registerTopLevelWindow(aWindow: nsIAppWindow): void; - unregisterTopLevelWindow(aWindow: nsIAppWindow): void; - readonly hasHiddenWindow: boolean; -} - -// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIAppWindow.idl - -interface nsIAppWindow extends nsISupports { - readonly docShell: nsIDocShell; - intrinsicallySized: boolean; - readonly primaryContentShell: nsIDocShellTreeItem; - readonly primaryRemoteTab: nsIRemoteTab; - readonly primaryContentBrowsingContext: BrowsingContext; - remoteTabAdded(aTab: nsIRemoteTab, aPrimary: boolean): void; - remoteTabRemoved(aTab: nsIRemoteTab): void; - readonly outerToInnerHeightDifferenceInCSSPixels: u32; - readonly outerToInnerWidthDifferenceInCSSPixels: u32; - center(aRelative: nsIAppWindow, aScreen: boolean, aAlert: boolean): void; - showModal(): void; - lockAspectRatio(aShouldLock: boolean): void; - chromeFlags: u32; - assumeChromeFlagsAreFrozen(): void; - createNewWindow(aChromeFlags: i32, aOpenWindowInfo: nsIOpenWindowInfo): nsIAppWindow; - XULBrowserWindow: nsIXULBrowserWindow; - readonly initialOpenWindowInfo: nsIOpenWindowInfo; - needFastSnaphot(): void; - rollupAllPopups(): void; -} - -// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIWindowMediator.idl - -interface nsIWindowMediator extends nsISupports { - getEnumerator(aWindowType: string): nsISimpleEnumerator; - getAppWindowEnumerator(aWindowType: string): nsISimpleEnumerator; - getZOrderAppWindowEnumerator(aWindowType: string, aFrontToBack: boolean): nsISimpleEnumerator; - getMostRecentWindow(aWindowType: string): mozIDOMWindowProxy; - getMostRecentBrowserWindow(): mozIDOMWindowProxy; - getMostRecentNonPBWindow(aWindowType: string): mozIDOMWindowProxy; - getOuterWindowWithId(aOuterWindowID: u64): mozIDOMWindowProxy; - getCurrentInnerWindowWithId(aInnerWindowID: u64): mozIDOMWindow; - addListener(aListener: nsIWindowMediatorListener): void; - removeListener(aListener: nsIWindowMediatorListener): void; -} - -// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIWindowMediatorListener.idl - -interface nsIWindowMediatorListener extends nsISupports { - onOpenWindow(window: nsIAppWindow): void; - onCloseWindow(window: nsIAppWindow): void; -} - -// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIWindowlessBrowser.idl - -interface nsIWindowlessBrowser extends nsIWebNavigation { - close(): void; - readonly docShell: nsIDocShell; +interface nsICookieNotification extends nsISupports, Enums { + readonly action: nsICookieNotification.Action; + readonly cookie: nsICookie; + readonly baseDomain: string; + readonly isThirdParty: boolean; + readonly batchDeletedCookies: nsIArray; + readonly browsingContextId: u64; readonly browsingContext: BrowsingContext; + readonly operationID: nsID; } -// https://searchfox.org/mozilla-central/source/xpfe/appshell/nsIXULBrowserWindow.idl +// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookiePermission.idl -interface nsIXULBrowserWindow extends nsISupports { - setOverLink(link: string): void; - onBeforeLinkTraversal(originalTarget: string, linkURI: nsIURI, linkNode: Node, isAppTab: boolean): string; - showTooltip(x: i32, y: i32, tooltip: string, direction: string, browser: Element): void; - hideTooltip(): void; - getTabCount(): u32; +interface nsICookiePermission extends nsISupports { + readonly ACCESS_DEFAULT: 0; + readonly ACCESS_ALLOW: 1; + readonly ACCESS_DENY: 2; + readonly ACCESS_SESSION: 8; } -// https://searchfox.org/mozilla-central/source/dom/media/webvtt/nsIWebVTTListener.idl +// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsICookieService.idl -interface nsIWebVTTListener extends nsISupports { - onCue(cue: any): void; - onRegion(region: any): void; - onParsingError(errorCode: i32): void; +type nsICookieTransactionCallback = Callable<{ + callback(): void; +}> + +interface nsICookieService extends nsISupports { + readonly BEHAVIOR_ACCEPT: 0; + readonly BEHAVIOR_REJECT_FOREIGN: 1; + readonly BEHAVIOR_REJECT: 2; + readonly BEHAVIOR_LIMIT_FOREIGN: 3; + readonly BEHAVIOR_REJECT_TRACKER: 4; + readonly BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN: 5; + readonly BEHAVIOR_LAST: 5; + + getCookieStringFromHttp(aURI: nsIURI, aChannel: nsIChannel): string; + setCookieStringFromHttp(aURI: nsIURI, aCookie: string, aChannel: nsIChannel): void; + runInTransaction(aCallback: nsICookieTransactionCallback): void; } -// https://searchfox.org/mozilla-central/source/dom/media/webvtt/nsIWebVTTParserWrapper.idl +// https://searchfox.org/mozilla-central/source/netwerk/cookie/nsIThirdPartyCookieBlockingExceptionListService.idl -interface nsIWebVTTParserWrapper extends nsISupports { - loadParser(window: mozIDOMWindow): void; - parse(data: string): void; - flush(): void; - watch(callback: nsIWebVTTListener): void; - cancel(): void; - convertCueToDOMTree(window: mozIDOMWindow, cue: nsISupports): DocumentFragment; - processCues(window: mozIDOMWindow, cues: nsIVariant, overlay: nsISupports, controls: nsISupports): void; +interface nsIThirdPartyCookieBlockingExceptionListService extends nsISupports { + init(): Promise; + shutdown(): void; +} + +interface nsIThirdPartyCookieExceptionEntry extends nsISupports { + readonly firstPartySite: string; + readonly thirdPartySite: string; + serialize(): string; } // https://searchfox.org/mozilla-central/source/netwerk/dns/nsIDNSAdditionalInfo.idl @@ -11882,176 +8109,386 @@ interface nsPIDNSService extends nsIDNSService { prefetchEnabled: boolean; } -// https://searchfox.org/mozilla-central/source/dom/media/nsIAudioDeviceInfo.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/file/nsIFileChannel.idl -interface nsIAudioDeviceInfo extends nsISupports { - readonly TYPE_UNKNOWN: 0; - readonly TYPE_INPUT: 1; - readonly TYPE_OUTPUT: 2; - readonly STATE_DISABLED: 0; - readonly STATE_UNPLUGGED: 1; - readonly STATE_ENABLED: 2; - readonly PREF_NONE: 0; - readonly PREF_MULTIMEDIA: 1; - readonly PREF_VOICE: 2; - readonly PREF_NOTIFICATION: 4; - readonly PREF_ALL: 15; - readonly FMT_S16LE: 16; - readonly FMT_S16BE: 32; - readonly FMT_F32LE: 4096; - readonly FMT_F32BE: 8192; - - readonly name: string; - readonly groupId: string; - readonly vendor: string; - readonly type: u16; - readonly state: u16; - readonly preferred: u16; - readonly supportedFormat: u16; - readonly defaultFormat: u16; - readonly maxChannels: u32; - readonly defaultRate: u32; - readonly maxRate: u32; - readonly minRate: u32; - readonly maxLatency: u32; - readonly minLatency: u32; +interface nsIFileChannel extends nsISupports { + readonly file: nsIFile; } -// https://searchfox.org/mozilla-central/source/dom/media/nsIMediaDevice.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/file/nsIFileProtocolHandler.idl -interface nsIMediaDevice extends nsISupports { - readonly type: string; - readonly mediaSource: string; - readonly rawId: string; - readonly id: string; - readonly scary: boolean; - readonly canRequestOsLevelPrompt: boolean; - readonly rawName: string; +interface nsIFileProtocolHandler extends nsIProtocolHandler { + newFileURI(aFile: nsIFile): nsIURI; + newFileURIMutator(file: nsIFile): nsIURIMutator; + getURLSpecFromActualFile(file: nsIFile): string; + getURLSpecFromDir(file: nsIFile): string; + getFileFromURLSpec(url: string): nsIFile; + readURLFile(file: nsIFile): nsIURI; + readShellLink(file: nsIFile): nsIURI; } -// https://searchfox.org/mozilla-central/source/dom/media/nsIMediaManager.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/data/nsIDataChannel.idl -interface nsIMediaManagerService extends nsISupports { - readonly STATE_NOCAPTURE: 0; - readonly STATE_CAPTURE_ENABLED: 1; - readonly STATE_CAPTURE_DISABLED: 2; - - readonly activeMediaCaptureWindows: nsIArray; - mediaCaptureWindowState(aWindow: nsIDOMWindow, aCamera: OutParam, aMicrophone: OutParam, aScreenShare: OutParam, aWindowShare: OutParam, aBrowserShare: OutParam, devices: OutParam): void; - sanitizeDeviceIds(sinceWhen: i64): void; +interface nsIDataChannel extends nsISupports { } -// https://searchfox.org/mozilla-central/source/remote/components/nsIMarionette.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIBackgroundChannelRegistrar.idl -interface nsIMarionette extends nsISupports { - readonly running: boolean; +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIBinaryHttp.idl + +interface nsIBinaryHttpRequest extends nsISupports { + readonly method: string; + readonly scheme: string; + readonly authority: string; + readonly path: string; + readonly headerNames: string[]; + readonly headerValues: string[]; + readonly content: u8[]; } -// https://searchfox.org/mozilla-central/source/remote/components/nsIRemoteAgent.idl - -interface nsIRemoteAgent extends nsISupports { - readonly debuggerAddress: string; - readonly running: boolean; +interface nsIBinaryHttpResponse extends nsISupports { + readonly status: u16; + readonly headerNames: string[]; + readonly headerValues: string[]; + readonly content: u8[]; } -// https://searchfox.org/mozilla-central/source/dom/serializers/nsIDocumentEncoder.idl - -interface nsIDocumentEncoderNodeFixup extends nsISupports { - fixupNode(aNode: Node, aSerializeCloneKids: OutParam): Node; +interface nsIBinaryHttp extends nsISupports { + encodeRequest(request: nsIBinaryHttpRequest): u8[]; + decodeRequest(request: u8[]): nsIBinaryHttpRequest; + decodeResponse(response: u8[]): nsIBinaryHttpResponse; + encodeResponse(response: nsIBinaryHttpResponse): u8[]; } -interface nsIDocumentEncoder extends nsISupports { - readonly OutputSelectionOnly: 1; - readonly OutputFormatted: 2; - readonly OutputRaw: 4; - readonly OutputBodyOnly: 8; - readonly OutputPreformatted: 16; - readonly OutputWrap: 32; - readonly OutputFormatFlowed: 64; - readonly OutputAbsoluteLinks: 128; - readonly OutputCRLineBreak: 512; - readonly OutputLFLineBreak: 1024; - readonly OutputNoScriptContent: 2048; - readonly OutputNoFramesContent: 4096; - readonly OutputNoFormattingInPre: 8192; - readonly OutputEncodeBasicEntities: 16384; - readonly OutputPersistNBSP: 131072; - readonly OutputDontRewriteEncodingDeclaration: 262144; - readonly SkipInvisibleContent: 524288; - readonly OutputFormatDelSp: 1048576; - readonly OutputDropInvisibleBreak: 2097152; - readonly OutputIgnoreMozDirty: 4194304; - readonly OutputForPlainTextClipboardCopy: 33554432; - readonly OutputRubyAnnotation: 67108864; - readonly OutputDisallowLineBreaking: 134217728; - readonly RequiresReinitAfterOutput: 268435456; - readonly AllowCrossShadowBoundary: 536870912; +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsICORSPreflightCache.idl - init(aDocument: Document, aMimeType: string, aFlags: u32): void; - setSelection(aSelection: Selection): void; - setRange(aRange: Range): void; - setNode(aNode: Node): void; - setContainerNode(aContainer: Node): void; - setCharset(aCharset: string): void; - setWrapColumn(aWrapColumn: u32): void; - readonly mimeType: string; - encodeToStream(aStream: nsIOutputStream): void; - encodeToString(): string; - encodeToStringWithContext(aContextString: OutParam, aInfoString: OutParam): string; - encodeToStringWithMaxLength(aMaxLength: u32): string; - setNodeFixup(aFixup: nsIDocumentEncoderNodeFixup): void; +interface nsICORSPreflightCache extends nsISupports { + getEntries(principal: nsIPrincipal): nsICORSPreflightCacheEntry[]; + clearEntry(entry: nsICORSPreflightCacheEntry): void; } -// https://searchfox.org/mozilla-central/source/intl/locale/mozILocaleService.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsICORSPreflightCacheEntry.idl -interface mozILocaleService extends nsISupports { - readonly langNegStrategyFiltering: 0; - readonly langNegStrategyMatching: 1; - readonly langNegStrategyLookup: 2; - - readonly defaultLocale: string; - readonly lastFallbackLocale: string; - readonly appLocalesAsLangTags: string[]; - readonly appLocalesAsBCP47: string[]; - readonly regionalPrefsLocales: string[]; - readonly webExposedLocales: string[]; - negotiateLanguages(aRequested: string[], aAvailable: string[], aDefaultLocale?: string, langNegStrategy?: i32): string[]; - readonly appLocaleAsLangTag: string; - readonly appLocaleAsBCP47: string; - requestedLocales: string[]; - readonly requestedLocale: string; - availableLocales: string[]; - readonly isAppLocaleRTL: boolean; - readonly packagedLocales: string[]; +interface nsICORSPreflightCacheEntry extends nsISupports { + readonly key: string; + readonly URI: nsIURI; + readonly originAttributes: any; + readonly principal: nsIPrincipal; + readonly privateBrowsing: boolean; + readonly withCredentials: boolean; } -// https://searchfox.org/mozilla-central/source/intl/locale/mozIOSPreferences.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIEarlyHintObserver.idl -interface mozIOSPreferences extends nsISupports { - readonly dateTimeFormatStyleNone: 0; - readonly dateTimeFormatStyleShort: 1; - readonly dateTimeFormatStyleMedium: 2; - readonly dateTimeFormatStyleLong: 3; - readonly dateTimeFormatStyleFull: 4; - - readonly systemLocales: string[]; - readonly regionalPrefsLocales: string[]; - readonly systemLocale: string; - getDateTimePattern(timeFormatStyle: i32, dateFormatStyle: i32, locale?: string): string; +interface nsIEarlyHintObserver extends nsISupports { + earlyHint(linkHeader: string, referrerPolicy: string, cspHeader: string): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundhangmonitor/nsIHangDetails.idl +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpActivityObserver.idl -interface nsIHangDetails extends nsISupports { - readonly wasPersisted: boolean; - readonly duration: double; - readonly thread: string; - readonly runnableName: string; - readonly process: string; - readonly remoteType: string; - readonly stack: any; - readonly modules: any; - readonly annotations: any; +interface nsIHttpActivityObserver extends nsISupports { + readonly ACTIVITY_TYPE_SOCKET_TRANSPORT: 1; + readonly ACTIVITY_TYPE_HTTP_TRANSACTION: 2; + readonly ACTIVITY_TYPE_HTTP_CONNECTION: 3; + readonly ACTIVITY_SUBTYPE_REQUEST_HEADER: 20481; + readonly ACTIVITY_SUBTYPE_REQUEST_BODY_SENT: 20482; + readonly ACTIVITY_SUBTYPE_RESPONSE_START: 20483; + readonly ACTIVITY_SUBTYPE_RESPONSE_HEADER: 20484; + readonly ACTIVITY_SUBTYPE_RESPONSE_COMPLETE: 20485; + readonly ACTIVITY_SUBTYPE_TRANSACTION_CLOSE: 20486; + readonly ACTIVITY_SUBTYPE_PROXY_RESPONSE_HEADER: 20487; + readonly ACTIVITY_SUBTYPE_DNSANDSOCKET_CREATED: 20488; + readonly ACTIVITY_SUBTYPE_SPECULATIVE_DNSANDSOCKET_CREATED: 20489; + readonly ACTIVITY_SUBTYPE_ECH_SET: 20490; + readonly ACTIVITY_SUBTYPE_CONNECTION_CREATED: 20491; + readonly ACTIVITY_SUBTYPE_EARLYHINT_RESPONSE_HEADER: 20492; + + observeActivity(aHttpChannel: nsISupports, aActivityType: u32, aActivitySubtype: u32, aTimestamp: PRTime, aExtraSizeData: u64, aExtraStringData: string): void; + readonly isActive: boolean; + observeConnectionActivity(aHost: string, aPort: i32, aSSL: boolean, aHasECH: boolean, aIsHttp3: boolean, aActivityType: u32, aActivitySubtype: u32, aTimestamp: PRTime, aExtraStringData: string): void; +} + +interface nsIHttpActivityDistributor extends nsIHttpActivityObserver { + addObserver(aObserver: nsIHttpActivityObserver): void; + removeObserver(aObserver: nsIHttpActivityObserver): void; + observeProxyResponse: boolean; + observeConnection: boolean; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpAuthManager.idl + +interface nsIHttpAuthManager extends nsISupports { + getAuthIdentity(aScheme: string, aHost: string, aPort: i32, aAuthType: string, aRealm: string, aPath: string, aUserDomain: OutParam, aUserName: OutParam, aUserPassword: OutParam, aIsPrivate?: boolean, aPrincipal?: nsIPrincipal): void; + setAuthIdentity(aScheme: string, aHost: string, aPort: i32, aAuthType: string, aRealm: string, aPath: string, aUserDomain: string, aUserName: string, aUserPassword: string, aIsPrivate?: boolean, aPrincipal?: nsIPrincipal): void; + clearAll(): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpAuthenticableChannel.idl + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpAuthenticator.idl + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannel.idl + +interface nsIHttpChannel extends nsIIdentChannel { + requestMethod: string; + referrerInfo: nsIReferrerInfo; + readonly protocolVersion: string; + readonly transferSize: u64; + readonly requestSize: u64; + readonly decodedBodySize: u64; + readonly encodedBodySize: u64; + getRequestHeader(aHeader: string): string; + setRequestHeader(aHeader: string, aValue: string, aMerge: boolean): void; + setNewReferrerInfo(aUrl: string, aPolicy: nsIReferrerInfo.ReferrerPolicyIDL, aSendReferrer: boolean): void; + setEmptyRequestHeader(aHeader: string): void; + visitRequestHeaders(aVisitor: nsIHttpHeaderVisitor): void; + visitNonDefaultRequestHeaders(aVisitor: nsIHttpHeaderVisitor): void; + ShouldStripRequestBodyHeader(aMethod: string): boolean; + allowSTS: boolean; + redirectionLimit: u32; + readonly responseStatus: u32; + readonly responseStatusText: string; + readonly requestSucceeded: boolean; + isMainDocumentChannel: boolean; + getResponseHeader(header: string): string; + setResponseHeader(header: string, value: string, merge: boolean): void; + visitResponseHeaders(aVisitor: nsIHttpHeaderVisitor): void; + getOriginalResponseHeader(aHeader: string, aVisitor: nsIHttpHeaderVisitor): void; + visitOriginalResponseHeaders(aVisitor: nsIHttpHeaderVisitor): void; + isNoStoreResponse(): boolean; + isNoCacheResponse(): boolean; + isPrivateResponse(): boolean; + redirectTo(aTargetURI: nsIURI): void; + upgradeToSecure(): void; + topLevelContentWindowId: u64; + browserId: u64; + logBlockedCORSRequest(aMessage: string, aCategory: string, aIsWarning: boolean): void; + logMimeTypeMismatch(aMessageName: string, aWarning: boolean, aURL: string, aContentType: string): void; + classicScriptHintCharset: string; + documentCharacterSet: string; + requestObserversCalled: boolean; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannelAuthProvider.idl + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannelChild.idl + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpChannelInternal.idl + +interface nsIHttpUpgradeListener extends nsISupports { + onTransportAvailable(aTransport: nsISocketTransport, aSocketIn: nsIAsyncInputStream, aSocketOut: nsIAsyncOutputStream): void; + onUpgradeFailed(aErrorCode: nsresult): void; +} + +interface nsIHttpChannelInternal extends nsISupports { + readonly THIRD_PARTY_FORCE_ALLOW: 1; + readonly TLS_FLAG_CONFIGURE_AS_RETRY: 65536; + readonly REDIRECT_MODE_FOLLOW: 0; + readonly REDIRECT_MODE_ERROR: 1; + readonly REDIRECT_MODE_MANUAL: 2; + readonly FETCH_CACHE_MODE_DEFAULT: 0; + readonly FETCH_CACHE_MODE_NO_STORE: 1; + readonly FETCH_CACHE_MODE_RELOAD: 2; + readonly FETCH_CACHE_MODE_NO_CACHE: 3; + readonly FETCH_CACHE_MODE_FORCE_CACHE: 4; + readonly FETCH_CACHE_MODE_ONLY_IF_CACHED: 5; + + documentURI: nsIURI; + getRequestVersion(major: OutParam, minor: OutParam): void; + getResponseVersion(major: OutParam, minor: OutParam): void; + setCookieHeaders(aCookieHeaders: string[]): void; + thirdPartyFlags: u32; + forceAllowThirdPartyCookie: boolean; + channelIsForDownload: boolean; + readonly localAddress: string; + readonly localPort: i32; + readonly remoteAddress: string; + readonly remotePort: i32; + HTTPUpgrade(aProtocolName: string, aListener: nsIHttpUpgradeListener): void; + setConnectOnly(tlsTunnel: boolean): void; + readonly onlyConnect: boolean; + allowSpdy: boolean; + allowHttp3: boolean; + responseTimeoutEnabled: boolean; + initialRwin: u32; + readonly apiRedirectToURI: nsIURI; + allowAltSvc: boolean; + beConservative: boolean; + bypassProxy: boolean; + readonly isResolvedByTRR: boolean; + readonly effectiveTRRMode: nsIRequest.TRRMode; + readonly trrSkipReason: nsITRRSkipReason.value; + readonly isLoadedBySocketProcess: boolean; + isOCSP: boolean; + tlsFlags: u32; + readonly lastModifiedTime: PRTime; + corsIncludeCredentials: boolean; + redirectMode: u32; + fetchCacheMode: u32; + readonly topWindowURI: nsIURI; + setTopWindowURIIfUnknown(topWindowURI: nsIURI): void; + readonly proxyURI: nsIURI; + blockAuthPrompt: boolean; + integrityMetadata: string; + readonly connectionInfoHashKey: string; + setIPv4Disabled(): void; + setIPv6Disabled(): void; + readonly crossOriginOpenerPolicy: nsILoadInfo.CrossOriginOpenerPolicy; + readonly supportsHTTP3: boolean; + readonly hasHTTPSRR: boolean; + setEarlyHintObserver(aObserver: nsIEarlyHintObserver): void; + earlyHintPreloaderId: u64; + readonly isProxyUsed: boolean; + setWebTransportSessionEventListener(aListener: WebTransportSessionEventListener): void; + earlyHintLinkType: u32; + isUserAgentHeaderModified: boolean; + setResponseOverride(aReplacedHttpResponse: nsIReplacedHttpResponse): void; + setResponseStatus(aStatus: u32, aStatusText: string): void; + readonly lastTransportStatus: nsresult; + transparentRedirectTo(aTargetURI: nsIURI): void; + readonly caps: u32; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpHeaderVisitor.idl + +type nsIHttpHeaderVisitor = Callable<{ + visitHeader(aHeader: string, aValue: string): void; +}> + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpProtocolHandler.idl + +interface nsIHttpProtocolHandler extends nsIProxiedProtocolHandler { + readonly userAgent: string; + readonly rfpUserAgent: string; + readonly appName: string; + readonly appVersion: string; + readonly platform: string; + readonly oscpu: string; + readonly misc: string; + readonly altSvcCacheKeys: string[]; + readonly authCacheKeys: string[]; + EnsureHSTSDataReady(): Promise; + clearCORSPreflightCache(): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsINetworkErrorLogging.idl + +interface nsINetworkErrorLogging extends nsISupports { + registerPolicy(aChannel: nsIHttpChannel): void; + generateNELReport(aChannel: nsIHttpChannel): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIObliviousHttp.idl + +interface nsIObliviousHttpClientResponse extends nsISupports { + decapsulate(encResponse: u8[]): u8[]; +} + +interface nsIObliviousHttpClientRequest extends nsISupports { + readonly encRequest: u8[]; + readonly response: nsIObliviousHttpClientResponse; +} + +interface nsIObliviousHttpServerResponse extends nsISupports { + readonly request: u8[]; + encapsulate(response: u8[]): u8[]; +} + +interface nsIObliviousHttpServer extends nsISupports { + readonly encodedConfig: u8[]; + decapsulate(encRequest: u8[]): nsIObliviousHttpServerResponse; +} + +interface nsIObliviousHttp extends nsISupports { + encapsulateRequest(encodedConfig: u8[], request: u8[]): nsIObliviousHttpClientRequest; + server(): nsIObliviousHttpServer; + decodeConfigList(encodedConfigList: u8[]): u8[][]; +} + +interface nsIObliviousHttpService extends nsISupports { + newChannel(relayURI: nsIURI, targetURI: nsIURI, encodedConfig: u8[]): nsIChannel; + getTRRSettings(relayURI: OutParam, encodedConfig: OutParam): void; + clearTRRConfig(): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIObliviousHttpChannel.idl + +interface nsIObliviousHttpChannel extends nsIHttpChannel { + readonly relayChannel: nsIHttpChannel; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIRaceCacheWithNetwork.idl + +interface nsIRaceCacheWithNetwork extends nsISupports { + allowRacing: boolean; + test_triggerNetwork(timeout: i32): void; + test_delayCacheEntryOpeningBy(timeout: i32): void; + test_triggerDelayedOpenCacheEntry(): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIReplacedHttpResponse.idl + +interface nsIReplacedHttpResponse extends nsISupports { + init(): void; + responseBody: string; + responseStatus: u32; + responseStatusText: string; + visitResponseHeaders(visitor: nsIHttpHeaderVisitor): void; + setResponseHeader(header: string, value: string, merge: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsITlsHandshakeListener.idl + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIWellKnownOpportunisticUtils.idl + +interface nsIWellKnownOpportunisticUtils extends nsISupports { + verify(aJSON: string, aOrigin: string): void; + readonly valid: boolean; +} + +// https://searchfox.org/mozilla-central/source/netwerk/streamconv/converters/nsICompressConvStats.idl + +interface nsICompressConvStats extends nsISupports { + readonly decodedDataLength: u64; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/res/nsIResProtocolHandler.idl + +interface nsIResProtocolHandler extends nsISubstitutingProtocolHandler { + allowContentToAccess(url: nsIURI): boolean; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/res/nsISubstitutingProtocolHandler.idl + +interface nsISubstitutingProtocolHandler extends nsIProtocolHandler { + readonly ALLOW_CONTENT_ACCESS: 1; + readonly RESOLVE_JAR_URI: 2; + + setSubstitution(root: string, baseURI: nsIURI): void; + setSubstitutionWithFlags(root: string, baseURI: nsIURI, flags: u32): void; + getSubstitution(root: string): nsIURI; + hasSubstitution(root: string): boolean; + resolveURI(resURI: nsIURI): string; +} + +// https://searchfox.org/mozilla-central/source/netwerk/socket/nsISocketProvider.idl + +interface nsISocketProvider extends nsISupports { + readonly PROXY_RESOLVES_HOST: 1; + readonly ANONYMOUS_CONNECT: 2; + readonly NO_PERMANENT_STORAGE: 4; + readonly BE_CONSERVATIVE: 8; + readonly ANONYMOUS_CONNECT_ALLOW_CLIENT_CERT: 16; + readonly IS_SPECULATIVE_CONNECTION: 32; + readonly DONT_TRY_ECH: 1024; + readonly IS_RETRY: 2048; + readonly USED_PRIVATE_DNS: 4096; +} + +// https://searchfox.org/mozilla-central/source/netwerk/socket/nsISocketProviderService.idl + +interface nsISocketProviderService extends nsISupports { + getSocketProvider(socketType: string): nsISocketProvider; } // https://searchfox.org/mozilla-central/source/netwerk/streamconv/mozITXTToHTMLConv.idl @@ -12117,531 +8554,7 @@ interface nsITXTToHTMLConv extends nsIStreamConverter { preFormatHTML(value: boolean): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/parentalcontrols/nsIParentalControlsService.idl - -interface nsIParentalControlsService extends nsISupports { - readonly DOWNLOAD: 1; - readonly INSTALL_EXTENSION: 2; - readonly INSTALL_APP: 3; - readonly BROWSE: 4; - readonly SHARE: 5; - readonly BOOKMARK: 6; - readonly ADD_CONTACT: 7; - readonly SET_IMAGE: 8; - readonly MODIFY_ACCOUNTS: 9; - readonly REMOTE_DEBUGGING: 10; - readonly IMPORT_SETTINGS: 11; - readonly PRIVATE_BROWSING: 12; - readonly DATA_CHOICES: 13; - readonly CLEAR_HISTORY: 14; - readonly MASTER_PASSWORD: 15; - readonly GUEST_BROWSING: 16; - readonly ADVANCED_SETTINGS: 17; - readonly CAMERA_MICROPHONE: 18; - readonly BLOCK_LIST: 19; - readonly TELEMETRY: 20; - readonly HEALTH_REPORT: 21; - readonly DEFAULT_THEME: 22; - readonly ePCLog_URIVisit: 1; - readonly ePCLog_FileDownload: 2; - - readonly parentalControlsEnabled: boolean; - readonly blockFileDownloadsEnabled: boolean; - isAllowed(aAction: i16, aUri?: nsIURI): boolean; - readonly loggingEnabled: boolean; - log(aEntryType: i16, aFlag: boolean, aSource: nsIURI, aTarget?: nsIFile): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/sidebar/nsIWebProtocolHandlerRegistrar.idl - -interface nsIWebProtocolHandlerRegistrar extends nsISupports { - registerProtocolHandler(protocol: string, uri: nsIURI, title: string, documentURI: nsIURI, windowOrBrowser: nsISupports): void; - removeProtocolHandler(protocol: string, uri: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/network/interfaces/nsITCPSocketCallback.idl - -interface nsITCPSocketCallback extends nsISupports { - readonly BUFFER_SIZE: 65536; - - fireErrorEvent(name: string, type: string, errorCode: nsresult): void; - fireDataStringEvent(type: string, data: string): void; - fireDataArrayEvent(type: string, data: u8[]): void; - fireEvent(type: string): void; - updateReadyState(readystate: u32): void; - updateBufferedAmount(bufferedAmount: u32, trackingNumber: u32): void; -} - -// https://searchfox.org/mozilla-central/source/dom/network/interfaces/nsIUDPSocketChild.idl - -interface nsIUDPSocketInternal extends nsISupports { - callListenerOpened(): void; - callListenerConnected(): void; - callListenerClosed(): void; - callListenerReceivedData(host: string, port: u16, data: u8[]): void; - callListenerError(message: string, filename: string, lineNumber: u32): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl - -type nsIFetchTelemetryDataCallback = Callable<{ - complete(): void; -}> - -interface nsITelemetry extends nsISupports { - readonly HISTOGRAM_EXPONENTIAL: 0; - readonly HISTOGRAM_LINEAR: 1; - readonly HISTOGRAM_BOOLEAN: 2; - readonly HISTOGRAM_FLAG: 3; - readonly HISTOGRAM_COUNT: 4; - readonly HISTOGRAM_CATEGORICAL: 5; - readonly SCALAR_TYPE_COUNT: 0; - readonly SCALAR_TYPE_STRING: 1; - readonly SCALAR_TYPE_BOOLEAN: 2; - readonly DATASET_ALL_CHANNELS: 0; - readonly DATASET_PRERELEASE_CHANNELS: 1; - readonly INCLUDE_OLD_LOADEVENTS: 1; - readonly KEEP_LOADEVENTS_NEW: 2; - readonly INCLUDE_PRIVATE_FIELDS_IN_LOADEVENTS: 4; - readonly EXCLUDE_STACKINFO_FROM_LOADEVENTS: 8; - - getCategoricalLabels(): any; - getSnapshotForHistograms(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; - getSnapshotForKeyedHistograms(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; - getSnapshotForScalars(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; - getSnapshotForKeyedScalars(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; - readonly lastShutdownDuration: u32; - readonly failedProfileLockCount: u32; - readonly slowSQL: any; - readonly debugSlowSQL: any; - getUntrustedModuleLoadEvents(aFlags?: u32): Promise; - readonly areUntrustedModuleLoadEventsReady: boolean; - getLoadedModules(): Promise; - readonly lateWrites: any; - getHistogramById(id: string): any; - getKeyedHistogramById(id: string): any; - canRecordBase: boolean; - canRecordExtended: boolean; - readonly canRecordReleaseData: boolean; - readonly canRecordPrereleaseData: boolean; - readonly isOfficialTelemetry: boolean; - asyncFetchTelemetryData(aCallback: nsIFetchTelemetryDataCallback): void; - readonly fileIOReports: any; - msSinceProcessStart(): double; - msSinceProcessStartIncludingSuspend(): double; - msSinceProcessStartExcludingSuspend(): double; - msSystemNow(): double; - clearScalars(): void; - flushBatchedChildTelemetry(): void; - snapshotEvents(aDataset: u32, aClear?: boolean, aEventLimit?: u32): any; - registerBuiltinEvents(aCategory: string, aEventData: any): void; - registerBuiltinScalars(aCategoryName: string, aScalarData: any): void; - clearEvents(): void; - getAllStores(): any; - earlyInit(): void; - delayedInit(): void; - shutdown(): void; - gatherMemory(): Promise; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/dap/nsIDAPTelemetry.idl - -interface nsIDAPTelemetry extends nsISupports { - GetReportU8(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u8, task_id: u8[], time_precision: u64, report: OutParam): void; - GetReportVecU8(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u8[], task_id: u8[], time_precision: u64, report: OutParam): void; - GetReportVecU16(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u16[], task_id: u8[], time_precision: u64, report: OutParam): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/push/nsIPushErrorReporter.idl - -interface nsIPushErrorReporter extends nsISupports { - readonly ACK_DELIVERED: 0; - readonly ACK_DECRYPTION_ERROR: 1; - readonly ACK_NOT_DELIVERED: 2; - readonly UNSUBSCRIBE_MANUAL: 3; - readonly UNSUBSCRIBE_QUOTA_EXCEEDED: 4; - readonly UNSUBSCRIBE_PERMISSION_REVOKED: 5; - readonly DELIVERY_UNCAUGHT_EXCEPTION: 6; - readonly DELIVERY_UNHANDLED_REJECTION: 7; - readonly DELIVERY_INTERNAL_ERROR: 8; - - reportDeliveryError(messageId: string, reason?: u16): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/push/nsIPushNotifier.idl - -interface nsIPushNotifier extends nsISupports { - notifyPush(scope: string, principal: nsIPrincipal, messageId: string): void; - notifyPushWithData(scope: string, principal: nsIPrincipal, messageId: string, data: u8[]): void; - notifySubscriptionChange(scope: string, principal: nsIPrincipal): void; - notifySubscriptionModified(scope: string, principal: nsIPrincipal): void; - notifyError(scope: string, principal: nsIPrincipal, message: string, flags: u32): void; -} - -interface nsIPushData extends nsISupports { - text(): string; - json(): any; - binary(): u8[]; -} - -interface nsIPushMessage extends nsISupports { - readonly principal: nsIPrincipal; - readonly data: nsIPushData; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/push/nsIPushService.idl - -interface nsIPushSubscription extends nsISupports { - readonly endpoint: string; - readonly pushCount: i64; - readonly lastPush: i64; - readonly quota: i32; - readonly isSystemSubscription: boolean; - readonly p256dhPrivateKey: any; - quotaApplies(): boolean; - isExpired(): boolean; - getKey(name: string): u8[]; -} - -type nsIPushSubscriptionCallback = Callable<{ - onPushSubscription(status: nsresult, subscription: nsIPushSubscription): void; -}> - -type nsIUnsubscribeResultCallback = Callable<{ - onUnsubscribe(status: nsresult, success: boolean): void; -}> - -type nsIPushClearResultCallback = Callable<{ - onClear(status: nsresult): void; -}> - -interface nsIPushService extends nsISupports { - readonly pushTopic: string; - readonly subscriptionChangeTopic: string; - readonly subscriptionModifiedTopic: string; - subscribe(scope: string, principal: nsIPrincipal, callback: nsIPushSubscriptionCallback): void; - subscribeWithKey(scope: string, principal: nsIPrincipal, key: u8[], callback: nsIPushSubscriptionCallback): void; - unsubscribe(scope: string, principal: nsIPrincipal, callback: nsIUnsubscribeResultCallback): void; - getSubscription(scope: string, principal: nsIPrincipal, callback: nsIPushSubscriptionCallback): void; - clearForDomain(domain: string, originAttributesPattern: any, callback: nsIPushClearResultCallback): void; - clearForPrincipal(principal: nsIPrincipal, callback: nsIPushClearResultCallback): void; -} - -interface nsIPushQuotaManager extends nsISupports { - notificationForOriginShown(origin: string): void; - notificationForOriginClosed(origin: string): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULButtonElement.idl - -interface nsIDOMXULButtonElement extends nsIDOMXULControlElement { - type: string; - open: boolean; - checked: boolean; - group: string; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl - -interface nsIDOMXULCommandDispatcher extends nsISupports { - focusedElement: Element; - focusedWindow: mozIDOMWindowProxy; - addCommandUpdater(updater: Element, events: string, targets: string): void; - removeCommandUpdater(updater: Element): void; - updateCommands(eventName: string): void; - getControllerForCommand(command: string): nsIController; - getControllers(): nsIControllers; - advanceFocus(): void; - rewindFocus(): void; - advanceFocusIntoSubtree(elt: Element): void; - lock(): void; - unlock(): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULContainerElement.idl - -interface nsIDOMXULContainerItemElement extends nsISupports { - readonly parentContainer: Element; -} - -interface nsIDOMXULContainerElement extends nsIDOMXULContainerItemElement { -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULControlElement.idl - -interface nsIDOMXULControlElement extends nsISupports { - disabled: boolean; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULMenuListElement.idl - -interface nsIDOMXULMenuListElement extends nsIDOMXULSelectControlElement { - editable: boolean; - open: boolean; - readonly label: string; - image: string; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl - -interface nsIDOMXULMultiSelectControlElement extends nsIDOMXULSelectControlElement { - selType: string; - currentItem: Element; - currentIndex: i32; - readonly selectedItems: NodeList; - addItemToSelection(item: nsIDOMXULSelectControlItemElement): void; - removeItemFromSelection(item: nsIDOMXULSelectControlItemElement): void; - toggleItemSelection(item: nsIDOMXULSelectControlItemElement): void; - selectItem(item: nsIDOMXULSelectControlItemElement): void; - selectItemRange(startItem: nsIDOMXULSelectControlItemElement, item: nsIDOMXULSelectControlItemElement): void; - selectAll(): void; - clearSelection(): void; - readonly selectedCount: i32; - getSelectedItem(index: i32): Element; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULRadioGroupElement.idl - -interface nsIDOMXULRadioGroupElement extends nsISupports { - focusedItem: Element; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULRelatedElement.idl - -interface nsIDOMXULRelatedElement extends nsISupports { - getRelatedElement(aElement: Node): Element; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idl - -interface nsIDOMXULSelectControlElement extends nsIDOMXULControlElement { - selectedItem: Element; - selectedIndex: i32; - value: string; - readonly itemCount: u32; - getIndexOfItem(item: nsIDOMXULSelectControlItemElement): i32; - getItemAtIndex(index: i32): Element; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idl - -interface nsIDOMXULSelectControlItemElement extends nsISupports { - disabled: boolean; - image: string; - label: string; - accessKey: string; - command: string; - value: string; - readonly selected: boolean; - readonly control: Element; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteController.idl - -interface nsIAutoCompleteController extends nsISupports { - readonly STATUS_NONE: 1; - readonly STATUS_SEARCHING: 2; - readonly STATUS_COMPLETE_NO_MATCH: 3; - readonly STATUS_COMPLETE_MATCH: 4; - - input: nsIAutoCompleteInput; - readonly searchStatus: u16; - readonly matchCount: u32; - startSearch(searchString: string): void; - stopSearch(): void; - handleText(): boolean; - handleEnter(aIsPopupSelection: boolean, aEvent?: Event): boolean; - handleEscape(): boolean; - handleStartComposition(): void; - handleEndComposition(): void; - handleTab(): void; - handleKeyNavigation(key: u32): boolean; - handleDelete(): boolean; - getValueAt(index: i32): string; - getLabelAt(index: i32): string; - getCommentAt(index: i32): string; - getStyleAt(index: i32): string; - getImageAt(index: i32): string; - getFinalCompleteValueAt(index: i32): string; - searchString: string; - setInitiallySelectedIndex(index: i32): void; - resetInternalState(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteInput.idl - -interface nsIAutoCompleteInput extends nsISupports { - readonly popupElement: Element; - readonly popup: nsIAutoCompletePopup; - readonly controller: nsIAutoCompleteController; - popupOpen: boolean; - disableAutoComplete: boolean; - completeDefaultIndex: boolean; - completeSelectedIndex: boolean; - forceComplete: boolean; - minResultsForPopup: u32; - maxRows: u32; - timeout: u32; - searchParam: string; - readonly searchCount: u32; - getSearchAt(index: u32): string; - textValue: string; - readonly selectionStart: i32; - readonly selectionEnd: i32; - selectTextRange(startIndex: i32, endIndex: i32): void; - onSearchBegin(): void; - onSearchComplete(): void; - onTextEntered(aEvent?: Event): void; - onTextReverted(): boolean; - readonly consumeRollupEvent: boolean; - readonly inPrivateContext: boolean; - readonly noRollupOnCaretMove: boolean; - readonly noRollupOnEmptySearch: boolean; - readonly userContextId: u32; - readonly invalidatePreviousResult: boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompletePopup.idl - -interface nsIAutoCompletePopup extends nsISupports { - readonly INVALIDATE_REASON_NEW_RESULT: 0; - readonly INVALIDATE_REASON_DELETE: 1; - - readonly input: nsIAutoCompleteInput; - readonly overrideValue: string; - selectedIndex: i32; - readonly popupOpen: boolean; - getNoRollupOnEmptySearch(element: Element): boolean; - openAutocompletePopup(input: nsIAutoCompleteInput, element: Element): void; - closePopup(): void; - invalidate(reason: u16): void; - selectBy(reverse: boolean, page: boolean): void; - startSearch(searchString: string, element: Element, listener: nsIFormFillCompleteObserver): void; - stopSearch(): void; - selectEntry(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteResult.idl - -interface nsIAutoCompleteResult extends nsISupports { - readonly RESULT_IGNORED: 1; - readonly RESULT_FAILURE: 2; - readonly RESULT_NOMATCH: 3; - readonly RESULT_SUCCESS: 4; - readonly RESULT_NOMATCH_ONGOING: 5; - readonly RESULT_SUCCESS_ONGOING: 6; - - readonly searchString: string; - readonly searchResult: u16; - readonly defaultIndex: i32; - readonly errorDescription: string; - readonly matchCount: u32; - getValueAt(index: i32): string; - getLabelAt(index: i32): string; - getCommentAt(index: i32): string; - getStyleAt(index: i32): string; - getImageAt(index: i32): string; - getFinalCompleteValueAt(index: i32): string; - isRemovableAt(rowIndex: i32): boolean; - removeValueAt(rowIndex: i32): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteSearch.idl - -interface nsIAutoCompleteSearch extends nsISupports { - startSearch(searchString: string, searchParam: string, previousResult: nsIAutoCompleteResult, listener: nsIAutoCompleteObserver): void; - stopSearch(): void; -} - -interface nsIAutoCompleteObserver extends nsISupports { - onSearchResult(search: nsIAutoCompleteSearch, result: nsIAutoCompleteResult): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteSimpleResult.idl - -interface nsIAutoCompleteSimpleResult extends nsIAutoCompleteResult { - setSearchString(aSearchString: string): void; - setErrorDescription(aErrorDescription: string): void; - setDefaultIndex(aDefaultIndex: i32): void; - setSearchResult(aSearchResult: u16): void; - insertMatchAt(aIndex: i32, aValue: string, aComment: string, aImage?: string, aStyle?: string, aFinalCompleteValue?: string, aLabel?: string): void; - appendMatch(aValue: string, aComment: string, aImage?: string, aStyle?: string, aFinalCompleteValue?: string, aLabel?: string): void; - removeMatchAt(aIndex: i32): void; - getListener(): nsIAutoCompleteSimpleResultListener; - setListener(aListener: nsIAutoCompleteSimpleResultListener): void; -} - -interface nsIAutoCompleteSimpleResultListener extends nsISupports { - onValueRemoved(aResult: nsIAutoCompleteSimpleResult, aValue: string): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteSimpleSearch.idl - -interface nsIAutoCompleteSimpleSearch extends nsIAutoCompleteSearch { - overrideNextResult(values: nsIAutoCompleteResult): void; -} - -// https://searchfox.org/mozilla-central/source/dom/interfaces/events/nsIDOMEventListener.idl - -// https://searchfox.org/mozilla-central/source/toolkit/components/ml/nsIMLUtils.idl - -interface nsIMLUtils extends nsISupports { - hasEnoughMemoryToInfer(aModelSizeInMemory: u64, aThresholdPercentage: u32, aMinMemoryRequirement: u64): boolean; - getNumPhysicalCores(): u8; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/finalizationwitness/nsIFinalizationWitnessService.idl - -interface nsIFinalizationWitnessService extends nsISupports { - make(aTopic: string, aString: string): any; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/satchel/nsIFormFillController.idl - -interface nsIFormFillController extends nsISupports { - readonly focusedInput: HTMLInputElement; - readonly passwordPopupAutomaticallyOpened: boolean; - markAsAutoCompletableField(aInput: HTMLInputElement): void; - showPopup(): void; -} - -type nsIFormFillCompleteObserver = Callable<{ - onSearchCompletion(result: nsIAutoCompleteResult): void; -}> - -// https://searchfox.org/mozilla-central/source/toolkit/components/crashes/nsICrashService.idl - -interface nsICrashService extends nsISupports { - readonly CRASH_TYPE_CRASH: 0; - readonly CRASH_TYPE_HANG: 1; - - addCrash(processType: i32, crashType: i32, id: string): Promise; -} - -// https://searchfox.org/mozilla-central/source/chrome/nsIChromeRegistry.idl - -interface nsIChromeRegistry extends nsISupports { - readonly NONE: 0; - readonly PARTIAL: 1; - readonly FULL: 2; - - convertChromeURL(aChromeURL: nsIURI): nsIURI; - checkForNewChrome(): void; -} - -interface nsIXULChromeRegistry extends nsIChromeRegistry { - isLocaleRTL(package: string): boolean; - allowScriptsForPackage(url: nsIURI): boolean; - allowContentToAccess(url: nsIURI): boolean; - canLoadURLRemotely(url: nsIURI): boolean; - mustLoadURLRemotely(url: nsIURI): boolean; -} - -// https://searchfox.org/mozilla-central/source/chrome/nsIToolkitChromeRegistry.idl - -interface nsIToolkitChromeRegistry extends nsIXULChromeRegistry { - getLocalesForPackage(aPackage: string): nsIUTF8StringEnumerator; -} +// https://searchfox.org/mozilla-central/source/netwerk/protocol/viewsource/nsIViewSourceChannel.idl // https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/nsITransportProvider.idl @@ -12745,6 +8658,1289 @@ interface nsIWebSocketListener extends nsISupports { OnError(): void; } +// https://searchfox.org/mozilla-central/source/netwerk/protocol/webtransport/nsIWebTransport.idl + +} // global + +declare namespace nsIWebTransport { + +enum WebTransportError { + UNKNOWN_ERROR = 0, + INVALID_STATE_ERROR = 1, +} + +enum HTTPVersion { + h3 = 0, + h2 = 1, +} + +} + +declare global { + +interface nsIWebTransport extends nsISupports, Enums { + asyncConnect(aURI: nsIURI, aDedicated: boolean, aServerCertHashes: nsIWebTransportHash[], aLoadingPrincipal: nsIPrincipal, aSecurityFlags: u32, aListener: WebTransportSessionEventListener, aVersion?: nsIWebTransport.HTTPVersion): void; + getStats(): void; + closeSession(aErrorCode: u32, aReason: string): void; + createOutgoingBidirectionalStream(aListener: nsIWebTransportStreamCallback): void; + createOutgoingUnidirectionalStream(aListener: nsIWebTransportStreamCallback): void; + sendDatagram(aData: u8[], aTrackingId: u64): void; + getMaxDatagramSize(): void; +} + +} // global + +declare namespace WebTransportSessionEventListener { + +enum DatagramOutcome { + UNKNOWN = 0, + DROPPED_TOO_MUCH_DATA = 1, + SENT = 2, +} + +} + +declare global { + +interface WebTransportSessionEventListener extends nsISupports, Enums { + onSessionReady(aSessionId: u64): void; + onSessionClosed(aCleanly: boolean, aErrorCode: u32, aReason: string): void; + onIncomingBidirectionalStreamAvailable(aStream: nsIWebTransportBidirectionalStream): void; + onIncomingUnidirectionalStreamAvailable(aStream: nsIWebTransportReceiveStream): void; + onStopSending(aStreamId: u64, aError: nsresult): void; + onResetReceived(aStreamId: u64, aError: nsresult): void; + onDatagramReceived(aData: u8[]): void; + onMaxDatagramSize(aSize: u64): void; + onOutgoingDatagramOutCome(aId: u64, aOutCome: WebTransportSessionEventListener.DatagramOutcome): void; +} + +interface nsIWebTransportStreamCallback extends nsISupports { + onBidirectionalStreamReady(aStream: nsIWebTransportBidirectionalStream): void; + onUnidirectionalStreamReady(aStream: nsIWebTransportSendStream): void; + onError(aError: u8): void; +} + +interface nsIWebTransportHash extends nsISupports { + readonly algorithm: string; + readonly value: u8[]; +} + +// https://searchfox.org/mozilla-central/source/netwerk/protocol/webtransport/nsIWebTransportStream.idl + +interface nsIWebTransportSendStreamStats extends nsISupports { + readonly bytesSent: u64; + readonly bytesAcknowledged: u64; +} + +interface nsIWebTransportReceiveStreamStats extends nsISupports { + readonly bytesReceived: u64; +} + +interface nsIWebTransportStreamStatsCallback extends nsISupports { + onSendStatsAvailable(aStats: nsIWebTransportSendStreamStats): void; + onReceiveStatsAvailable(aStats: nsIWebTransportReceiveStreamStats): void; +} + +interface nsIWebTransportReceiveStream extends nsISupports { + sendStopSending(aError: u8): void; + getReceiveStreamStats(aCallback: nsIWebTransportStreamStatsCallback): void; + readonly hasReceivedFIN: boolean; + readonly inputStream: nsIAsyncInputStream; + readonly streamId: u64; +} + +interface nsIWebTransportSendStream extends nsISupports { + sendFin(): void; + reset(aErrorCode: u8): void; + getSendStreamStats(aCallback: nsIWebTransportStreamStatsCallback): void; + readonly outputStream: nsIAsyncOutputStream; + readonly streamId: u64; +} + +interface nsIWebTransportBidirectionalStream extends nsISupports { + sendStopSending(aError: u8): void; + sendFin(): void; + reset(aErrorCode: u8): void; + readonly hasReceivedFIN: boolean; + readonly inputStream: nsIAsyncInputStream; + readonly outputStream: nsIAsyncOutputStream; + readonly streamId: u64; +} + +// https://searchfox.org/mozilla-central/source/netwerk/wifi/nsIWifiAccessPoint.idl + +interface nsIWifiAccessPoint extends nsISupports { + readonly mac: string; + readonly ssid: string; + readonly rawSSID: string; + readonly signal: i32; +} + +// https://searchfox.org/mozilla-central/source/netwerk/wifi/nsIWifiListener.idl + +interface nsIWifiListener extends nsISupports { + onChange(accessPoints: nsIWifiAccessPoint[]): void; + onError(error: nsresult): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/wifi/nsIWifiMonitor.idl + +interface nsIWifiMonitor extends nsISupports { + startWatching(aListener: nsIWifiListener, aForcePolling: boolean): void; + stopWatching(aListener: nsIWifiListener): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/parentalcontrols/nsIParentalControlsService.idl + +interface nsIParentalControlsService extends nsISupports { + readonly DOWNLOAD: 1; + readonly INSTALL_EXTENSION: 2; + readonly INSTALL_APP: 3; + readonly BROWSE: 4; + readonly SHARE: 5; + readonly BOOKMARK: 6; + readonly ADD_CONTACT: 7; + readonly SET_IMAGE: 8; + readonly MODIFY_ACCOUNTS: 9; + readonly REMOTE_DEBUGGING: 10; + readonly IMPORT_SETTINGS: 11; + readonly PRIVATE_BROWSING: 12; + readonly DATA_CHOICES: 13; + readonly CLEAR_HISTORY: 14; + readonly MASTER_PASSWORD: 15; + readonly GUEST_BROWSING: 16; + readonly ADVANCED_SETTINGS: 17; + readonly CAMERA_MICROPHONE: 18; + readonly BLOCK_LIST: 19; + readonly TELEMETRY: 20; + readonly HEALTH_REPORT: 21; + readonly DEFAULT_THEME: 22; + readonly ePCLog_URIVisit: 1; + readonly ePCLog_FileDownload: 2; + + readonly parentalControlsEnabled: boolean; + readonly blockFileDownloadsEnabled: boolean; + isAllowed(aAction: i16, aUri?: nsIURI): boolean; + readonly loggingEnabled: boolean; + log(aEntryType: i16, aFlag: boolean, aSource: nsIURI, aTarget?: nsIFile): void; +} + +// https://searchfox.org/mozilla-central/source/dom/media/bridge/IPeerConnection.idl + +interface IPeerConnectionObserver extends nsISupports { +} + +interface IPeerConnection extends nsISupports { + readonly kHintAudio: 1; + readonly kHintVideo: 2; + readonly kActionNone: -1; + readonly kActionOffer: 0; + readonly kActionAnswer: 1; + readonly kActionPRAnswer: 2; + readonly kActionRollback: 3; + readonly kIceGathering: 0; + readonly kIceWaiting: 1; + readonly kIceChecking: 2; + readonly kIceConnected: 3; + readonly kIceFailed: 4; + readonly kNew: 0; + readonly kNegotiating: 1; + readonly kActive: 2; + readonly kClosing: 3; + readonly kClosed: 4; + readonly kDataChannelReliable: 0; + readonly kDataChannelPartialReliableRexmit: 1; + readonly kDataChannelPartialReliableTimed: 2; + readonly kNoError: 0; + readonly kInvalidCandidate: 2; + readonly kInvalidMediastreamTrack: 3; + readonly kInvalidState: 4; + readonly kInvalidSessionDescription: 5; + readonly kIncompatibleSessionDescription: 6; + readonly kIncompatibleMediaStreamTrack: 8; + readonly kInternalError: 9; + readonly kTypeError: 10; + readonly kOperationError: 11; + readonly kMaxErrorType: 11; +} + +// https://searchfox.org/mozilla-central/source/extensions/permissions/nsIRemotePermissionService.idl + +interface nsIRemotePermissionService extends nsISupports { + init(): void; + readonly isInitialized: Promise; + testAllowedPermissionValues: any; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertOverrideService.idl + +interface nsICertOverride extends nsISupports { + readonly asciiHost: string; + readonly port: i32; + readonly hostPort: string; + readonly fingerprint: string; + readonly originAttributes: any; +} + +interface nsICertOverrideService extends nsISupports { + rememberValidityOverride(aHostName: string, aPort: i32, aOriginAttributes: any, aCert: nsIX509Cert, aTemporary: boolean): void; + hasMatchingOverride(aHostName: string, aPort: i32, aOriginAttributes: any, aCert: nsIX509Cert, aIsTemporary: OutParam): boolean; + clearValidityOverride(aHostName: string, aPort: i32, aOriginAttributes: any): void; + clearAllOverrides(): void; + getOverrides(): nsICertOverride[]; + setDisableAllSecurityChecksAndLetAttackersInterceptMyData(aDisable: boolean): void; + readonly securityCheckDisabled: boolean; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertStorage.idl + +type nsICertStorageCallback = Callable<{ + done(rv: nsresult, result: nsIVariant): void; +}> + +interface nsIRevocationState extends nsISupports { + readonly state: i16; +} + +interface nsIIssuerAndSerialRevocationState extends nsIRevocationState { + readonly issuer: string; + readonly serial: string; +} + +interface nsISubjectAndPubKeyRevocationState extends nsIRevocationState { + readonly subject: string; + readonly pubKey: string; +} + +interface nsICertInfo extends nsISupports { + readonly cert: string; + readonly subject: string; + readonly trust: i16; +} + +interface nsICertStorage extends nsISupports { + readonly DATA_TYPE_REVOCATION: 1; + readonly DATA_TYPE_CERTIFICATE: 2; + readonly DATA_TYPE_CRLITE: 3; + readonly DATA_TYPE_CRLITE_FILTER_FULL: 4; + readonly DATA_TYPE_CRLITE_FILTER_INCREMENTAL: 5; + readonly STATE_UNSET: 0; + readonly STATE_ENFORCE: 1; + readonly STATE_NOT_ENROLLED: 2; + readonly STATE_NOT_COVERED: 3; + readonly STATE_NO_FILTER: 4; + readonly TRUST_INHERIT: 0; + readonly TRUST_ANCHOR: 1; + + hasPriorData(type: u8, callback: nsICertStorageCallback): void; + setRevocations(revocations: nsIRevocationState[], callback: nsICertStorageCallback): void; + getRevocationState(issuer: u8[], serial: u8[], subject: u8[], pubkey: u8[]): i16; + setFullCRLiteFilter(filter: u8[], callback: nsICertStorageCallback): void; + addCRLiteDelta(delta: u8[], filename: string, callback: nsICertStorageCallback): void; + testNoteCRLiteUpdateTime(callback: nsICertStorageCallback): void; + addCerts(certs: nsICertInfo[], callback: nsICertStorageCallback): void; + removeCertsByHashes(hashes: string[], callback: nsICertStorageCallback): void; + findCertsBySubject(subject: u8[]): u8[][]; + GetRemainingOperationCount(): i32; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertTree.idl + +interface nsICertTreeItem extends nsISupports { + readonly cert: nsIX509Cert; +} + +interface nsICertTree extends nsITreeView { + loadCertsFromCache(cache: nsIX509Cert[], type: u32): void; + getCert(index: u32): nsIX509Cert; + getTreeItem(index: u32): nsICertTreeItem; + deleteEntryObject(index: u32): void; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICertificateDialogs.idl + +interface nsICertificateDialogs extends nsISupports { + confirmDownloadCACert(ctx: nsIInterfaceRequestor, cert: nsIX509Cert, trust: OutParam): boolean; + setPKCS12FilePassword(ctx: nsIInterfaceRequestor, password: OutParam): boolean; + getPKCS12FilePassword(ctx: nsIInterfaceRequestor, password: OutParam): boolean; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIClientAuthDialogService.idl + +type nsIClientAuthDialogCallback = Callable<{ + certificateChosen(cert: nsIX509Cert, rememberDecision: boolean): void; +}> + +interface nsIClientAuthDialogService extends nsISupports { + chooseCertificate(hostname: string, certArray: nsIX509Cert[], loadContext: nsILoadContext, callback: nsIClientAuthDialogCallback): void; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIClientAuthRememberService.idl + +interface nsIClientAuthRememberRecord extends nsISupports { + readonly asciiHost: string; + readonly dbKey: string; + readonly entryKey: string; +} + +interface nsIClientAuthRememberService extends nsISupports { + forgetRememberedDecision(key: string): void; + getDecisions(): nsIClientAuthRememberRecord[]; + rememberDecisionScriptable(aHostName: string, originAttributes: any, aClientCert: nsIX509Cert): void; + hasRememberedDecisionScriptable(aHostName: string, originAttributes: any, aCertDBKey: OutParam): boolean; + clearRememberedDecisions(): void; + deleteDecisionsByHost(aHostName: string, aOriginAttributes: any): void; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIContentSignatureVerifier.idl + +interface nsIContentSignatureVerifier extends nsISupports { + readonly ContentSignatureProdRoot: 1; + readonly ContentSignatureStageRoot: 2; + readonly ContentSignatureDevRoot: 3; + readonly ContentSignatureLocalRoot: 4; + + asyncVerifyContentSignature(aData: string, aContentSignatureHeader: string, aCertificateChain: string, aHostname: string, aTrustedRoot: AppTrustedRoot): Promise; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsICryptoHash.idl + +interface nsICryptoHash extends nsISupports { + readonly MD5: 2; + readonly SHA1: 3; + readonly SHA256: 4; + readonly SHA384: 5; + readonly SHA512: 6; + + init(aAlgorithm: u32): void; + initWithString(aAlgorithm: string): void; + update(aData: u8[], aLen: u32): void; + updateFromStream(aStream: nsIInputStream, aLen: u32): void; + finish(aASCII: boolean): string; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIDataStorage.idl + +} // global + +declare namespace nsIDataStorageManager { + +enum DataStorage { + AlternateServices = 0, + ClientAuthRememberList = 1, + SiteSecurityServiceState = 2, +} + +} + +declare global { + +interface nsIDataStorageManager extends nsISupports, Enums { + get(dataStorage: nsIDataStorageManager.DataStorage): nsIDataStorage; +} + +} // global + +declare namespace nsIDataStorage { + +enum DataType { + Persistent = 0, + Private = 1, +} + +} + +declare global { + +interface nsIDataStorage extends nsISupports, Enums { + get(key: string, type: nsIDataStorage.DataType): string; + put(key: string, value: string, type: nsIDataStorage.DataType): void; + remove(key: string, type: nsIDataStorage.DataType): void; + clear(): void; + isReady(): boolean; + getAll(): nsIDataStorageItem[]; +} + +interface nsIDataStorageItem extends nsISupports { + readonly key: string; + readonly value: string; + readonly type: nsIDataStorage.DataType; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsINSSComponent.idl + +interface nsINSSComponent extends nsISupports { + getEnterpriseRoots(): u8[][]; + getEnterpriseRootsPEM(): string; + getEnterpriseIntermediates(): u8[][]; + getEnterpriseIntermediatesPEM(): string; + addEnterpriseIntermediate(intermediateBytes: u8[]): void; + clearSSLExternalAndInternalSessionCache(): void; + asyncClearSSLExternalAndInternalSessionCache(): Promise; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsINSSErrorsService.idl + +interface nsINSSErrorsService extends nsISupports { + readonly ERROR_CLASS_SSL_PROTOCOL: 1; + readonly ERROR_CLASS_BAD_CERT: 2; + readonly NSS_SEC_ERROR_BASE: -8192; + readonly NSS_SEC_ERROR_LIMIT: -7192; + readonly NSS_SSL_ERROR_BASE: -12288; + readonly NSS_SSL_ERROR_LIMIT: -11288; + readonly MOZILLA_PKIX_ERROR_BASE: -16384; + readonly MOZILLA_PKIX_ERROR_LIMIT: -15384; + + isNSSErrorCode(aNSPRCode: i32): boolean; + getXPCOMFromNSSError(aNSPRCode: i32): nsresult; + getErrorMessage(aXPCOMErrorCode: nsresult): string; + getErrorClass(aXPCOMErrorCode: nsresult): u32; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsINSSVersion.idl + +interface nsINSSVersion extends nsISupports { + readonly NSPR_MinVersion: string; + readonly NSS_MinVersion: string; + readonly NSSUTIL_MinVersion: string; + readonly NSSSSL_MinVersion: string; + readonly NSSSMIME_MinVersion: string; + readonly NSPR_Version: string; + readonly NSS_Version: string; + readonly NSSUTIL_Version: string; + readonly NSSSSL_Version: string; + readonly NSSSMIME_Version: string; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIOSKeyStore.idl + +interface nsIOSKeyStore extends nsISupports { + asyncGenerateSecret(label: string): Promise; + asyncSecretAvailable(label: string): Promise; + asyncRecoverSecret(label: string, recoveryPhrase: string): Promise; + asyncDeleteSecret(label: string): Promise; + asyncEncryptBytes(label: string, inBytes: u8[]): Promise; + asyncDecryptBytes(label: string, encryptedBase64Text: string): Promise; + asyncGetRecoveryPhrase(aLabel: string): Promise; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIOSReauthenticator.idl + +interface nsIOSReauthenticator extends nsISupports { + asyncReauthenticateUser(prompt: string, caption: string, parentWindow: mozIDOMWindow): Promise; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPK11Token.idl + +interface nsIPK11Token extends nsISupports { + readonly tokenName: string; + readonly isInternalKeyToken: boolean; + readonly tokenManID: string; + readonly tokenHWVersion: string; + readonly tokenFWVersion: string; + readonly tokenSerialNumber: string; + isLoggedIn(): boolean; + login(force: boolean): void; + logoutSimple(): void; + logoutAndDropAuthenticatedResources(): void; + needsLogin(): boolean; + readonly needsUserInit: boolean; + reset(): void; + checkPassword(password: string): boolean; + initPassword(initialPassword: string): void; + changePassword(oldPassword: string, newPassword: string): void; + readonly hasPassword: boolean; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPK11TokenDB.idl + +interface nsIPK11TokenDB extends nsISupports { + getInternalKeyToken(): nsIPK11Token; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPKCS11Module.idl + +interface nsIPKCS11Module extends nsISupports { + readonly name: string; + readonly libName: string; + listSlots(): nsISimpleEnumerator; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPKCS11ModuleDB.idl + +interface nsIPKCS11ModuleDB extends nsISupports { + deleteModule(moduleName: string): void; + addModule(moduleName: string, libraryFullPath: string, cryptoMechanismFlags: i32, cipherFlags: i32): void; + listModules(): nsISimpleEnumerator; + readonly canToggleFIPS: boolean; + toggleFIPSMode(): void; + readonly isFIPSEnabled: boolean; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPKCS11Slot.idl + +interface nsIPKCS11Slot extends nsISupports { + readonly SLOT_DISABLED: 0; + readonly SLOT_NOT_PRESENT: 1; + readonly SLOT_UNINITIALIZED: 2; + readonly SLOT_NOT_LOGGED_IN: 3; + readonly SLOT_LOGGED_IN: 4; + readonly SLOT_READY: 5; + + readonly name: string; + readonly desc: string; + readonly manID: string; + readonly HWVersion: string; + readonly FWVersion: string; + readonly status: u32; + getToken(): nsIPK11Token; + readonly tokenName: string; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIPublicKeyPinningService.idl + +interface nsIPublicKeyPinningService extends nsISupports { + hostHasPins(aURI: nsIURI): boolean; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsISecretDecoderRing.idl + +interface nsISecretDecoderRing extends nsISupports { + encryptString(text: string): string; + asyncEncryptStrings(plaintexts: string[]): Promise; + decryptString(encryptedBase64Text: string): string; + asyncDecryptStrings(encryptedStrings: string[]): Promise; + changePassword(): void; + logout(): void; + logoutAndTeardown(): void; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsISecurityUITelemetry.idl + +interface nsISecurityUITelemetry extends nsISupports { + readonly WARNING_ADDON_ASKING_PREVENTED: 1; + readonly WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH: 2; + readonly WARNING_CONFIRM_ADDON_INSTALL: 3; + readonly WARNING_CONFIRM_ADDON_INSTALL_CLICK_THROUGH: 4; + readonly WARNING_CONFIRM_POST_TO_INSECURE_FROM_SECURE: 9; + readonly WARNING_CONFIRM_POST_TO_INSECURE_FROM_SECURE_CLICK_THROUGH: 10; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsISiteSecurityService.idl + +} // global + +declare namespace nsISiteSecurityService { + +enum ResetStateBy { + ExactDomain = 0, + RootDomain = 1, + BaseDomain = 2, +} + +} + +declare global { + +interface nsISiteSecurityService extends nsISupports, Enums { + readonly Success: 0; + readonly ERROR_UNKNOWN: 1; + readonly ERROR_COULD_NOT_PARSE_HEADER: 3; + readonly ERROR_NO_MAX_AGE: 4; + readonly ERROR_MULTIPLE_MAX_AGES: 5; + readonly ERROR_INVALID_MAX_AGE: 6; + readonly ERROR_MULTIPLE_INCLUDE_SUBDOMAINS: 7; + readonly ERROR_INVALID_INCLUDE_SUBDOMAINS: 8; + readonly ERROR_COULD_NOT_SAVE_STATE: 13; + + processHeader(aSourceURI: nsIURI, aHeader: string, aOriginAttributes?: any, aMaxAge?: OutParam, aIncludeSubdomains?: OutParam, aFailureResult?: OutParam): void; + resetState(aURI: nsIURI, aOriginAttributes?: any, aScope?: nsISiteSecurityService.ResetStateBy): void; + isSecureURI(aURI: nsIURI, aOriginAttributes?: any): boolean; + clearAll(): void; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsITLSSocketControl.idl + +interface nsITLSSocketControl extends nsISupports { + readonly KEY_EXCHANGE_UNKNOWN: -1; + readonly SSL_VERSION_3: 768; + readonly TLS_VERSION_1: 769; + readonly TLS_VERSION_1_1: 770; + readonly TLS_VERSION_1_2: 771; + readonly TLS_VERSION_1_3: 772; + readonly SSL_VERSION_UNKNOWN: -1; + readonly SSL_MAC_UNKNOWN: -1; + readonly SSL_MAC_NULL: 0; + readonly SSL_MAC_MD5: 1; + readonly SSL_MAC_SHA: 2; + readonly SSL_HMAC_MD5: 3; + readonly SSL_HMAC_SHA: 4; + readonly SSL_HMAC_SHA256: 5; + readonly SSL_MAC_AEAD: 6; + + asyncStartTLS(): Promise; + getAlpnEarlySelection(): string; + readonly earlyDataAccepted: boolean; + driveHandshake(): void; + joinConnection(npnProtocol: string, hostname: string, port: i32): boolean; + testJoinConnection(npnProtocol: string, hostname: string, port: i32): boolean; + isAcceptableForHost(hostname: string): boolean; + readonly KEAUsed: i16; + readonly KEAKeyBits: u32; + readonly providerFlags: u32; + readonly SSLVersionUsed: i16; + readonly SSLVersionOffered: i16; + readonly MACAlgorithmUsed: i16; + readonly clientCertSent: boolean; + readonly failedVerification: boolean; + esniTxt: string; + echConfig: string; + readonly retryEchConfig: string; + readonly peerId: string; + readonly securityInfo: nsITransportSecurityInfo; + asyncGetSecurityInfo(): Promise; + claim(): void; + browserId: u64; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsITokenPasswordDialogs.idl + +interface nsITokenPasswordDialogs extends nsISupports { + setPassword(ctx: nsIInterfaceRequestor, token: nsIPK11Token): boolean; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsITransportSecurityInfo.idl + +} // global + +declare namespace nsITransportSecurityInfo { + +enum OverridableErrorCategory { + ERROR_UNSET = 0, + ERROR_TRUST = 1, + ERROR_DOMAIN = 2, + ERROR_TIME = 3, +} + +} + +declare global { + +interface nsITransportSecurityInfo extends nsISupports, Enums { + readonly SSL_VERSION_3: 0; + readonly TLS_VERSION_1: 1; + readonly TLS_VERSION_1_1: 2; + readonly TLS_VERSION_1_2: 3; + readonly TLS_VERSION_1_3: 4; + readonly CERTIFICATE_TRANSPARENCY_NOT_APPLICABLE: 0; + readonly CERTIFICATE_TRANSPARENCY_POLICY_COMPLIANT: 5; + readonly CERTIFICATE_TRANSPARENCY_POLICY_NOT_ENOUGH_SCTS: 6; + readonly CERTIFICATE_TRANSPARENCY_POLICY_NOT_DIVERSE_SCTS: 7; + + readonly securityState: u32; + readonly errorCode: i32; + readonly errorCodeString: string; + readonly failedCertChain: nsIX509Cert[]; + readonly serverCert: nsIX509Cert; + readonly succeededCertChain: nsIX509Cert[]; + readonly cipherName: string; + readonly keyLength: u32; + readonly secretKeyLength: u32; + readonly keaGroupName: string; + readonly signatureSchemeName: string; + readonly protocolVersion: u16; + readonly certificateTransparencyStatus: u16; + readonly isAcceptedEch: boolean; + readonly isDelegatedCredential: boolean; + readonly overridableErrorCategory: nsITransportSecurityInfo.OverridableErrorCategory; + readonly madeOCSPRequests: boolean; + readonly usedPrivateDNS: boolean; + readonly isExtendedValidation: boolean; + toString(): string; + readonly negotiatedNPN: string; + readonly resumed: boolean; + readonly isBuiltCertChainRootBuiltInRoot: boolean; + readonly peerId: string; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIX509Cert.idl + +interface nsIX509Cert extends nsISupports { + readonly UNKNOWN_CERT: 0; + readonly CA_CERT: 1; + readonly USER_CERT: 2; + readonly EMAIL_CERT: 4; + readonly SERVER_CERT: 8; + readonly ANY_CERT: 65535; + + readonly emailAddress: string; + getEmailAddresses(): string[]; + containsEmailAddress(aEmailAddress: string): boolean; + readonly subjectName: string; + readonly commonName: string; + readonly organization: string; + readonly organizationalUnit: string; + readonly sha256Fingerprint: string; + readonly sha1Fingerprint: string; + readonly tokenName: string; + readonly issuerName: string; + readonly serialNumber: string; + readonly issuerCommonName: string; + readonly issuerOrganization: string; + readonly issuerOrganizationUnit: string; + readonly validity: nsIX509CertValidity; + readonly dbKey: string; + readonly displayName: string; + readonly certType: u32; + getRawDER(): u8[]; + getBase64DERString(): string; + readonly sha256SubjectPublicKeyInfoDigest: string; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIX509CertDB.idl + +} // global + +declare namespace nsIAppSignatureInfo { + +enum SignatureAlgorithm { + PKCS7_WITH_SHA1 = 0, + PKCS7_WITH_SHA256 = 1, + COSE_WITH_SHA256 = 2, +} + +} + +declare global { + +interface nsIAppSignatureInfo extends nsISupports, Enums { + readonly signerCert: nsIX509Cert; + readonly signatureAlgorithm: nsIAppSignatureInfo.SignatureAlgorithm; +} + +type nsIOpenSignedAppFileCallback = Callable<{ + openSignedAppFileFinished(rv: nsresult, aZipReader: nsIZipReader, aSignatureInfos: nsIAppSignatureInfo[]): void; +}> + +type nsIAsyncBoolCallback = Callable<{ + onResult(result: boolean): void; +}> + +type nsICertVerificationCallback = Callable<{ + verifyCertFinished(aPRErrorCode: i32, aVerifiedChain: nsIX509Cert[], aHasEVPolicy: boolean): void; +}> + +} // global + +declare namespace nsIX509CertDB { + +enum VerifyUsage { + verifyUsageTLSServer = 1, + verifyUsageTLSServerCA = 2, + verifyUsageTLSClient = 3, + verifyUsageTLSClientCA = 4, + verifyUsageEmailSigner = 5, + verifyUsageEmailRecipient = 6, + verifyUsageEmailCA = 7, +} + +} + +declare global { + +interface nsIX509CertDB extends nsISupports, Enums { + readonly UNTRUSTED: 0; + readonly TRUSTED_SSL: 1; + readonly TRUSTED_EMAIL: 2; + readonly Success: 0; + readonly ERROR_UNKNOWN: 1; + readonly ERROR_PKCS12_NOSMARTCARD_EXPORT: 2; + readonly ERROR_PKCS12_RESTORE_FAILED: 3; + readonly ERROR_PKCS12_BACKUP_FAILED: 4; + readonly ERROR_PKCS12_CERT_COLLISION: 5; + readonly ERROR_BAD_PASSWORD: 6; + readonly ERROR_DECODE_ERROR: 7; + readonly ERROR_PKCS12_DUPLICATE_DATA: 8; + readonly AppXPCShellRoot: 6; + readonly AddonsPublicRoot: 7; + readonly AddonsStageRoot: 8; + readonly FLAG_LOCAL_ONLY: 1; + readonly FLAG_MUST_BE_EV: 2; + + findCertByDBKey(aDBkey: string): nsIX509Cert; + importCertificates(data: u8[], length: u32, type: u32, ctx: nsIInterfaceRequestor): void; + importEmailCertificate(data: u8[], length: u32, ctx: nsIInterfaceRequestor): void; + importUserCertificate(data: u8[], length: u32, ctx: nsIInterfaceRequestor): void; + deleteCertificate(aCert: nsIX509Cert): void; + setCertTrust(cert: nsIX509Cert, type: u32, trust: u32): void; + setCertTrustFromString(cert: nsIX509Cert, trustString: string): void; + isCertTrusted(cert: nsIX509Cert, certType: u32, trustType: u32): boolean; + importCertsFromFile(aFile: nsIFile, aType: u32): void; + importPKCS12File(aFile: nsIFile, aPassword: string): u32; + exportPKCS12File(aFile: nsIFile, aCerts: nsIX509Cert[], aPassword: string): u32; + constructX509FromBase64(base64: string): nsIX509Cert; + constructX509(certDER: u8[]): nsIX509Cert; + openSignedAppFileAsync(trustedRoot: AppTrustedRoot, aJarFile: nsIFile, callback: nsIOpenSignedAppFileCallback): void; + addCert(certDER: string, trust: string): nsIX509Cert; + asyncVerifyCertAtTime(aCert: nsIX509Cert, aUsage: nsIX509CertDB.VerifyUsage, aFlags: u32, aHostname: string, aTime: u64, aCallback: nsICertVerificationCallback): void; + clearOCSPCache(): void; + addCertFromBase64(base64: string, trust: string): nsIX509Cert; + getCerts(): nsIX509Cert[]; + asPKCS7Blob(certList: nsIX509Cert[]): string; + asyncHasThirdPartyRoots(callback: nsIAsyncBoolCallback): void; + countTrustObjects(): u32; +} + +// https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIX509CertValidity.idl + +interface nsIX509CertValidity extends nsISupports { + readonly notBefore: PRTime; + readonly notAfter: PRTime; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIAsyncHistory.idl + +interface mozIVisitInfo extends nsISupports { + readonly visitId: i64; + readonly visitDate: PRTime; + readonly transitionType: u32; + readonly referrerURI: nsIURI; +} + +interface mozIPlaceInfo extends nsISupports { + readonly placeId: i64; + readonly guid: string; + readonly uri: nsIURI; + readonly title: string; + readonly frecency: i64; + readonly visits: any; +} + +interface mozIVisitInfoCallback extends nsISupports { + handleError(aResultCode: nsresult, aPlaceInfo: mozIPlaceInfo): void; + handleResult(aPlaceInfo: mozIPlaceInfo): void; + handleCompletion(aUpdatedItems: u32): void; + readonly ignoreResults: boolean; + readonly ignoreErrors: boolean; +} + +type mozIVisitedStatusCallback = Callable<{ + isVisited(aURI: nsIURI, aVisitedStatus: boolean): void; +}> + +interface mozIAsyncHistory extends nsISupports { + updatePlaces(aPlaceInfo: any, aCallback?: mozIVisitInfoCallback): void; + isURIVisited(aURI: nsIURI, aCallback: mozIVisitedStatusCallback): void; + clearCache(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIPlacesAutoComplete.idl + +interface mozIPlacesAutoComplete extends nsISupports { + readonly MATCH_ANYWHERE: 0; + readonly MATCH_BOUNDARY_ANYWHERE: 1; + readonly MATCH_BOUNDARY: 2; + readonly MATCH_BEGINNING: 3; + readonly MATCH_ANYWHERE_UNMODIFIED: 4; + readonly MATCH_BEGINNING_CASE_SENSITIVE: 5; + readonly BEHAVIOR_HISTORY: 1; + readonly BEHAVIOR_BOOKMARK: 2; + readonly BEHAVIOR_TAG: 4; + readonly BEHAVIOR_TITLE: 8; + readonly BEHAVIOR_URL: 16; + readonly BEHAVIOR_TYPED: 32; + readonly BEHAVIOR_JAVASCRIPT: 64; + readonly BEHAVIOR_OPENPAGE: 128; + readonly BEHAVIOR_RESTRICT: 256; + readonly BEHAVIOR_SEARCH: 512; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIPlacesPendingOperation.idl + +interface mozIPlacesPendingOperation extends nsISupports { + cancel(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/mozISyncedBookmarksMirror.idl + +interface mozISyncedBookmarksMirrorProgressListener extends nsISupports { + onFetchLocalTree(took: i64, itemCount: i64, deletedCount: i64, problems: nsIPropertyBag): void; + onFetchRemoteTree(took: i64, itemCount: i64, deletedCount: i64, problems: nsIPropertyBag): void; + onMerge(took: i64, counts: nsIPropertyBag): void; + onApply(took: i64): void; +} + +interface mozISyncedBookmarksMirrorCallback extends nsISupports { + handleSuccess(result: boolean): void; + handleError(code: nsresult, message: string): void; +} + +interface mozISyncedBookmarksMirrorLogger extends nsISupports { + readonly LEVEL_OFF: 0; + readonly LEVEL_ERROR: 1; + readonly LEVEL_WARN: 2; + readonly LEVEL_DEBUG: 3; + readonly LEVEL_TRACE: 4; + + maxLevel: i16; + error(message: string): void; + warn(message: string): void; + debug(message: string): void; + trace(message: string): void; +} + +interface mozISyncedBookmarksMerger extends nsISupports { + readonly KIND_BOOKMARK: 1; + readonly KIND_QUERY: 2; + readonly KIND_FOLDER: 3; + readonly KIND_LIVEMARK: 4; + readonly KIND_SEPARATOR: 5; + readonly VALIDITY_VALID: 1; + readonly VALIDITY_REUPLOAD: 2; + readonly VALIDITY_REPLACE: 3; + + db: mozIStorageConnection; + logger: mozIServicesLogSink; + merge(localTimeSeconds: i64, remoteTimeSeconds: i64, callback: mozISyncedBookmarksMirrorCallback): mozIPlacesPendingOperation; + reset(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsIFaviconService.idl + +interface nsIFaviconService extends nsISupports { + readonly FAVICON_LOAD_PRIVATE: 1; + readonly FAVICON_LOAD_NON_PRIVATE: 2; + readonly ICONDATA_FLAGS_RICH: 1; + readonly MAX_FAVICON_BUFFER_SIZE: 65536; + + getFaviconLinkForIcon(aFaviconURI: nsIURI): nsIURI; + expireAllFavicons(): void; + setDefaultIconURIPreferredSize(aDefaultSize: u16): void; + preferredSizeFromURI(aURI: nsIURI): u16; + readonly defaultFavicon: nsIURI; + readonly defaultFaviconMimeType: string; + setFaviconForPage(aPageURI: nsIURI, aFaviconURI: nsIURI, aDataURL: nsIURI, aExpiration?: PRTime, isRichIcon?: boolean): Promise; + getFaviconURLForPage(aPageURI: nsIURI, aCallback: nsIFaviconDataCallback, aPreferredWidth?: u16): void; + getFaviconDataForPage(aPageURI: nsIURI, aCallback: nsIFaviconDataCallback, aPreferredWidth?: u16): void; + copyFavicons(aFromPageURI: nsIURI, aToPageURI: nsIURI, aFaviconLoadType: u32, aCallback?: nsIFaviconDataCallback): void; +} + +type nsIFaviconDataCallback = Callable<{ + onComplete(aFaviconURI: nsIURI, aDataLen: u32, aData: u8[], aMimeType: string, aWidth: u16): void; +}> + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsINavBookmarksService.idl + +interface nsINavBookmarksService extends nsISupports { + readonly DEFAULT_INDEX: -1; + readonly TYPE_BOOKMARK: 1; + readonly TYPE_FOLDER: 2; + readonly TYPE_SEPARATOR: 3; + readonly TYPE_DYNAMIC_CONTAINER: 4; + readonly SOURCE_DEFAULT: 0; + readonly SOURCE_SYNC: 1; + readonly SOURCE_IMPORT: 2; + readonly SOURCE_SYNC_REPARENT_REMOVED_FOLDER_CHILDREN: 4; + readonly SOURCE_RESTORE: 5; + readonly SOURCE_RESTORE_ON_STARTUP: 6; + readonly SYNC_STATUS_UNKNOWN: 0; + readonly SYNC_STATUS_NEW: 1; + readonly SYNC_STATUS_NORMAL: 2; + + readonly tagsFolder: i64; + readonly totalSyncChanges: i64; + insertBookmark(aParentId: i64, aURI: nsIURI, aIndex: i32, aTitle: string, aGuid?: string, aSource?: u16): i64; + removeItem(aItemId: i64, aSource?: u16): void; + createFolder(aParentFolder: i64, name: string, index: i32, aGuid?: string, aSource?: u16): i64; + setItemTitle(aItemId: i64, aTitle: string, aSource?: u16): void; + getItemTitle(aItemId: i64): string; + setItemLastModified(aItemId: i64, aLastModified: PRTime, aSource?: u16): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsINavHistoryService.idl + +interface nsINavHistoryResultNode extends nsISupports { + readonly RESULT_TYPE_URI: 0; + readonly RESULT_TYPE_QUERY: 5; + readonly RESULT_TYPE_FOLDER: 6; + readonly RESULT_TYPE_SEPARATOR: 7; + readonly RESULT_TYPE_FOLDER_SHORTCUT: 9; + + readonly parent: nsINavHistoryContainerResultNode; + readonly parentResult: nsINavHistoryResult; + readonly uri: string; + readonly type: u32; + readonly title: string; + readonly accessCount: u32; + readonly time: PRTime; + readonly icon: string; + readonly indentLevel: i32; + readonly bookmarkIndex: i32; + readonly itemId: i64; + readonly dateAdded: PRTime; + readonly lastModified: PRTime; + readonly tags: string; + readonly pageGuid: string; + readonly bookmarkGuid: string; + readonly visitId: i64; + readonly visitType: u32; +} + +interface nsINavHistoryContainerResultNode extends nsINavHistoryResultNode { + readonly STATE_CLOSED: 0; + readonly STATE_LOADING: 1; + readonly STATE_OPENED: 2; + + containerOpen: boolean; + readonly state: u16; + readonly hasChildren: boolean; + readonly childCount: u32; + getChild(aIndex: u32): nsINavHistoryResultNode; + getChildIndex(aNode: nsINavHistoryResultNode): u32; +} + +interface nsINavHistoryQueryResultNode extends nsINavHistoryContainerResultNode { + readonly query: nsINavHistoryQuery; + readonly queryOptions: nsINavHistoryQueryOptions; + readonly folderItemId: i64; + readonly targetFolderGuid: string; +} + +interface nsINavHistoryResultObserver extends nsISupports { + readonly skipHistoryDetailsNotifications: boolean; + nodeInserted(aParent: nsINavHistoryContainerResultNode, aNode: nsINavHistoryResultNode, aNewIndex: u32): void; + nodeRemoved(aParent: nsINavHistoryContainerResultNode, aItem: nsINavHistoryResultNode, aOldIndex: u32): void; + nodeMoved(aNode: nsINavHistoryResultNode, aOldParent: nsINavHistoryContainerResultNode, aOldIndex: u32, aNewParent: nsINavHistoryContainerResultNode, aNewIndex: u32): void; + nodeTitleChanged(aNode: nsINavHistoryResultNode, aNewTitle: string): void; + nodeURIChanged(aNode: nsINavHistoryResultNode, aOldURI: string): void; + nodeIconChanged(aNode: nsINavHistoryResultNode): void; + nodeHistoryDetailsChanged(aNode: nsINavHistoryResultNode, aOldVisitDate: PRTime, aOldAccessCount: u32): void; + nodeTagsChanged(aNode: nsINavHistoryResultNode): void; + nodeKeywordChanged(aNode: nsINavHistoryResultNode, aNewKeyword: string): void; + nodeDateAddedChanged(aNode: nsINavHistoryResultNode, aNewValue: PRTime): void; + nodeLastModifiedChanged(aNode: nsINavHistoryResultNode, aNewValue: PRTime): void; + containerStateChanged(aContainerNode: nsINavHistoryContainerResultNode, aOldState: u32, aNewState: u32): void; + invalidateContainer(aContainerNode: nsINavHistoryContainerResultNode): void; + sortingChanged(sortingMode: u16): void; + batching(aToggleMode: boolean): void; + result: nsINavHistoryResult; +} + +interface nsINavHistoryResult extends nsISupports { + sortingMode: u16; + suppressNotifications: boolean; + addObserver(aObserver: nsINavHistoryResultObserver, aOwnsWeak?: boolean): void; + removeObserver(aObserver: nsINavHistoryResultObserver): void; + readonly root: nsINavHistoryContainerResultNode; + onBeginUpdateBatch(): void; + onEndUpdateBatch(): void; +} + +interface nsINavHistoryQuery extends nsISupports { + readonly TIME_RELATIVE_EPOCH: 0; + readonly TIME_RELATIVE_TODAY: 1; + readonly TIME_RELATIVE_NOW: 2; + + beginTime: PRTime; + beginTimeReference: u32; + readonly hasBeginTime: boolean; + readonly absoluteBeginTime: PRTime; + endTime: PRTime; + endTimeReference: u32; + readonly hasEndTime: boolean; + readonly absoluteEndTime: PRTime; + searchTerms: string; + readonly hasSearchTerms: boolean; + minVisits: i32; + maxVisits: i32; + setTransitions(transitions: u32[]): void; + getTransitions(): u32[]; + readonly transitionCount: u32; + domainIsHost: boolean; + domain: string; + readonly hasDomain: boolean; + uri: nsIURI; + readonly hasUri: boolean; + tags: nsIVariant; + tagsAreNot: boolean; + getParents(): string[]; + readonly parentCount: u32; + setParents(aGuids: string[]): void; + clone(): nsINavHistoryQuery; +} + +interface nsINavHistoryQueryOptions extends nsISupports { + readonly SORT_BY_NONE: 0; + readonly SORT_BY_TITLE_ASCENDING: 1; + readonly SORT_BY_TITLE_DESCENDING: 2; + readonly SORT_BY_DATE_ASCENDING: 3; + readonly SORT_BY_DATE_DESCENDING: 4; + readonly SORT_BY_URI_ASCENDING: 5; + readonly SORT_BY_URI_DESCENDING: 6; + readonly SORT_BY_VISITCOUNT_ASCENDING: 7; + readonly SORT_BY_VISITCOUNT_DESCENDING: 8; + readonly SORT_BY_DATEADDED_ASCENDING: 11; + readonly SORT_BY_DATEADDED_DESCENDING: 12; + readonly SORT_BY_LASTMODIFIED_ASCENDING: 13; + readonly SORT_BY_LASTMODIFIED_DESCENDING: 14; + readonly SORT_BY_TAGS_ASCENDING: 17; + readonly SORT_BY_TAGS_DESCENDING: 18; + readonly SORT_BY_FRECENCY_ASCENDING: 21; + readonly SORT_BY_FRECENCY_DESCENDING: 22; + readonly RESULTS_AS_URI: 0; + readonly RESULTS_AS_VISIT: 1; + readonly RESULTS_AS_DATE_QUERY: 3; + readonly RESULTS_AS_SITE_QUERY: 4; + readonly RESULTS_AS_DATE_SITE_QUERY: 5; + readonly RESULTS_AS_TAGS_ROOT: 6; + readonly RESULTS_AS_TAG_CONTENTS: 7; + readonly RESULTS_AS_ROOTS_QUERY: 8; + readonly RESULTS_AS_LEFT_PANE_QUERY: 9; + readonly QUERY_TYPE_HISTORY: 0; + readonly QUERY_TYPE_BOOKMARKS: 1; + + sortingMode: u16; + resultType: u16; + excludeItems: boolean; + excludeQueries: boolean; + expandQueries: boolean; + includeHidden: boolean; + maxResults: u32; + queryType: u16; + asyncEnabled: boolean; + clone(): nsINavHistoryQueryOptions; +} + +interface nsINavHistoryService extends nsISupports { + readonly DATABASE_SCHEMA_VERSION: 78; + readonly TRANSITION_LINK: 1; + readonly TRANSITION_TYPED: 2; + readonly TRANSITION_BOOKMARK: 3; + readonly TRANSITION_EMBED: 4; + readonly TRANSITION_REDIRECT_PERMANENT: 5; + readonly TRANSITION_REDIRECT_TEMPORARY: 6; + readonly TRANSITION_DOWNLOAD: 7; + readonly TRANSITION_FRAMED_LINK: 8; + readonly TRANSITION_RELOAD: 9; + readonly DATABASE_STATUS_OK: 0; + readonly DATABASE_STATUS_CREATE: 1; + readonly DATABASE_STATUS_CORRUPT: 2; + readonly DATABASE_STATUS_UPGRADED: 3; + readonly DATABASE_STATUS_LOCKED: 4; + readonly VISIT_SOURCE_ORGANIC: 0; + readonly VISIT_SOURCE_SPONSORED: 1; + readonly VISIT_SOURCE_BOOKMARKED: 2; + readonly VISIT_SOURCE_SEARCHED: 3; + + readonly databaseStatus: u16; + markPageAsFollowedBookmark(aURI: nsIURI): void; + markPageAsTyped(aURI: nsIURI): void; + markPageAsFollowedLink(aURI: nsIURI): void; + canAddURI(aURI: nsIURI): boolean; + getNewQuery(): nsINavHistoryQuery; + getNewQueryOptions(): nsINavHistoryQueryOptions; + executeQuery(aQuery: nsINavHistoryQuery, options: nsINavHistoryQueryOptions): nsINavHistoryResult; + queryStringToQuery(aQueryString: string, aQuery: OutParam, options: OutParam): void; + queryToQueryString(aQuery: nsINavHistoryQuery, options: nsINavHistoryQueryOptions): string; + readonly historyDisabled: boolean; + makeGuid(): string; + hashURL(aSpec: string, aMode?: string): u64; + isFrecencyDecaying: boolean; + shouldStartFrecencyRecalculation: boolean; + readonly DBConnection: mozIStorageConnection; + asyncExecuteLegacyQuery(aQuery: nsINavHistoryQuery, aOptions: nsINavHistoryQueryOptions, aCallback: mozIStorageStatementCallback): mozIStoragePendingStatement; + readonly shutdownClient: nsIAsyncShutdownClient; + readonly connectionShutdownClient: nsIAsyncShutdownClient; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsIPlacesPreviewsHelperService.idl + +interface nsIPlacesPreviewsHelperService extends nsISupports { + getFilePathForURL(aURL: string): string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/places/nsITaggingService.idl + +interface nsITaggingService extends nsISupports { + tagURI(aURI: nsIURI, aTags: nsIVariant, aSource?: u16): void; + untagURI(aURI: nsIURI, aTags: nsIVariant, aSource?: u16): void; + getTagsForURI(aURI: nsIURI): string[]; +} + +// https://searchfox.org/mozilla-central/source/modules/libpref/nsIPrefBranch.idl + +interface nsIPrefBranch extends nsISupports { + readonly PREF_INVALID: 0; + readonly PREF_STRING: 32; + readonly PREF_INT: 64; + readonly PREF_BOOL: 128; + + readonly root: string; + getPrefType(aPrefName: string): i32; + getBoolPref(aPrefName: string, aDefaultValue?: boolean): boolean; + setBoolPref(aPrefName: string, aValue: boolean): void; + getFloatPref(aPrefName: string, aDefaultValue?: float): float; + getCharPref(aPrefName: string, aDefaultValue?: string): string; + setCharPref(aPrefName: string, aValue: string): void; + getStringPref(aPrefName: string, aDefaultValue?: string): string; + setStringPref(aPrefName: string, aValue: string): void; + getIntPref(aPrefName: string, aDefaultValue?: i32): i32; + setIntPref(aPrefName: string, aValue: i32): void; + getComplexValue(aPrefName: string, aType: T): nsQIResult; + setComplexValue(aPrefName: string, aType: nsID, aValue: nsISupports): void; + clearUserPref(aPrefName: string): void; + lockPref(aPrefName: string): void; + prefHasUserValue(aPrefName: string): boolean; + prefHasDefaultValue(aPrefName: string): boolean; + prefIsLocked(aPrefName: string): boolean; + prefIsSanitized(aPrefName: string): boolean; + unlockPref(aPrefName: string): void; + deleteBranch(aStartingAt: string): void; + getChildList(aStartingAt: string): string[]; + addObserver(aDomain: string, aObserver: nsIObserver, aHoldWeak?: boolean): void; + removeObserver(aDomain: string, aObserver: nsIObserver): void; +} + +// https://searchfox.org/mozilla-central/source/modules/libpref/nsIPrefLocalizedString.idl + +interface nsIPrefLocalizedString extends nsISupportsString { +} + +// https://searchfox.org/mozilla-central/source/modules/libpref/nsIPrefService.idl + +type nsIPrefStatsCallback = Callable<{ + visit(prefName: string, accessCount: u32): void; +}> + +interface nsIPrefObserver extends nsISupports { + onStringPref(kind: string, name: string, value: string, isSticky: boolean, isLocked: boolean): void; + onIntPref(kind: string, name: string, value: i32, isSticky: boolean, isLocked: boolean): void; + onBoolPref(kind: string, name: string, value: boolean, isSticky: boolean, isLocked: boolean): void; + onError(message: string): void; +} + +interface nsIPrefService extends nsISupports { + resetPrefs(): void; + savePrefFile(aFile: nsIFile): void; + backupPrefFile(aFile: nsIFile): Promise; + getBranch(aPrefRoot: string): nsIPrefBranch; + getDefaultBranch(aPrefRoot: string): nsIPrefBranch; + readonly dirty: boolean; + readDefaultPrefsFromFile(aFile: nsIFile): void; + readUserPrefsFromFile(aFile: nsIFile): void; + readStats(callback: nsIPrefStatsCallback): void; + resetStats(): void; + parsePrefsFromBuffer(bytes: u8[], observer: nsIPrefObserver, pathLabel?: string): void; + readonly userPrefsFileLastModifiedAtStartup: PRTime; +} + +// https://searchfox.org/mozilla-central/source/modules/libpref/nsIRelativeFilePref.idl + +interface nsIRelativeFilePref extends nsISupports { + file: nsIFile; + relativeToKey: string; +} + // https://searchfox.org/mozilla-central/source/uriloader/prefetch/nsIPrefetchService.idl interface nsIPrefetchService extends nsISupports { @@ -12754,369 +9950,3641 @@ interface nsIPrefetchService extends nsISupports { cancelPrefetchPreloadURI(aURI: nsIURI, aSource: Node): void; } +// https://searchfox.org/mozilla-central/source/dom/privateattribution/nsIPrivateAttributionService.idl + +interface nsIPrivateAttributionService extends nsISupports { + onAttributionEvent(sourceHost: string, type: string, index: u32, ad: string, targetHost: string): void; + onAttributionConversion(targetHost: string, task: string, histogramSize: u32, lookbackDays: u32, impressionType: string, ads: string[], sourceHosts: string[]): void; +} + +// https://searchfox.org/mozilla-central/source/tools/profiler/gecko/nsIProfiler.idl + +interface nsIProfilerStartParams extends nsISupports { + readonly entries: u32; + readonly duration: double; + readonly interval: double; + readonly features: u32; + readonly activeTabID: u64; +} + +interface nsIProfiler extends nsISupports { + StartProfiler(aEntries: u32, aInterval: double, aFeatures: string[], aFilters?: string[], aActiveTabID?: u64, aDuration?: double): Promise; + StopProfiler(): Promise; + IsPaused(): boolean; + Pause(): Promise; + Resume(): Promise; + IsSamplingPaused(): boolean; + PauseSampling(): Promise; + ResumeSampling(): Promise; + waitOnePeriodicSampling(): Promise; + GetProfile(aSinceTime?: double): string; + getProfileData(aSinceTime?: double): any; + getProfileDataAsync(aSinceTime?: double): Promise; + getProfileDataAsArrayBuffer(aSinceTime?: double): Promise; + getProfileDataAsGzippedArrayBuffer(aSinceTime?: double): Promise; + dumpProfileToFileAsync(aFilename: string, aSinceTime?: double): Promise; + dumpProfileToFile(aFilename: string): void; + IsActive(): boolean; + ClearAllPages(): void; + GetFeatures(): string[]; + readonly activeConfiguration: any; + GetAllFeatures(): string[]; + GetBufferInfo(aCurrentPosition: OutParam, aTotalSize: OutParam, aGeneration: OutParam): void; + getElapsedTime(): double; + readonly sharedLibraries: any; + getSymbolTable(aDebugPath: string, aBreakpadID: string): Promise; +} + +// https://searchfox.org/mozilla-central/source/dom/media/test/rdd_process_xpcom/nsIRddProcessTest.idl + +interface nsIRddProcessTest extends nsISupports { + testTelemetryProbes(): Promise; + stopProcess(): void; +} + +// https://searchfox.org/mozilla-central/source/remote/components/nsIMarionette.idl + +interface nsIMarionette extends nsISupports { + readonly running: boolean; +} + +// https://searchfox.org/mozilla-central/source/remote/components/nsIRemoteAgent.idl + +interface nsIRemoteAgent extends nsISupports { + readonly debuggerAddress: string; + readonly running: boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/reputationservice/nsIApplicationReputation.idl + +interface nsIApplicationReputationService extends nsISupports { + readonly VERDICT_SAFE: 0; + readonly VERDICT_DANGEROUS: 1; + readonly VERDICT_UNCOMMON: 2; + readonly VERDICT_POTENTIALLY_UNWANTED: 3; + readonly VERDICT_DANGEROUS_HOST: 4; + + queryReputation(aQuery: nsIApplicationReputationQuery, aCallback: nsIApplicationReputationCallback): void; + isBinary(aFilename: string): boolean; + isExecutable(aFilename: string): boolean; +} + +interface nsIApplicationReputationQuery extends nsISupports { + readonly sourceURI: nsIURI; + readonly referrerInfo: nsIReferrerInfo; + readonly suggestedFileName: string; + readonly fileSize: u32; + readonly sha256Hash: string; + readonly signatureInfo: u8[][][]; + readonly redirects: nsIArray; +} + +type nsIApplicationReputationCallback = Callable<{ + onComplete(aShouldBlock: boolean, aStatus: nsresult, aVerdict: u32): void; +}> + +// https://searchfox.org/mozilla-central/source/security/sandbox/common/mozISandboxSettings.idl + +interface mozISandboxSettings extends nsISupports { + readonly effectiveContentSandboxLevel: i32; + readonly contentWin32kLockdownState: i32; + readonly contentWin32kLockdownStateString: string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/satchel/nsIFormFillController.idl + +interface nsIFormFillController extends nsISupports { + readonly focusedInput: HTMLInputElement; + readonly passwordPopupAutomaticallyOpened: boolean; + markAsAutoCompletableField(aInput: HTMLInputElement): void; + showPopup(): void; +} + +type nsIFormFillCompleteObserver = Callable<{ + onSearchCompletion(result: nsIAutoCompleteResult): void; +}> + +// https://searchfox.org/mozilla-central/source/services/interfaces/mozIAppServicesLogger.idl + +interface mozIAppServicesLogger extends nsISupports { + register(target: string, logger: mozIServicesLogSink): void; +} + +// https://searchfox.org/mozilla-central/source/services/interfaces/mozIBridgedSyncEngine.idl + +interface mozIBridgedSyncEngineCallback extends nsISupports { + handleSuccess(result: nsIVariant): void; + handleError(code: nsresult, message: string): void; +} + +interface mozIBridgedSyncEngineApplyCallback extends nsISupports { + handleSuccess(outgoingEnvelopesAsJSON: string[]): void; + handleError(code: nsresult, message: string): void; +} + +interface mozIBridgedSyncEngine extends nsISupports { + readonly storageVersion: i32; + readonly allowSkippedRecord: boolean; + logger: mozIServicesLogSink; + getLastSync(callback: mozIBridgedSyncEngineCallback): void; + setLastSync(lastSyncMillis: i64, callback: mozIBridgedSyncEngineCallback): void; + getSyncId(callback: mozIBridgedSyncEngineCallback): void; + resetSyncId(callback: mozIBridgedSyncEngineCallback): void; + ensureCurrentSyncId(newSyncId: string, callback: mozIBridgedSyncEngineCallback): void; + syncStarted(callback: mozIBridgedSyncEngineCallback): void; + storeIncoming(incomingEnvelopesAsJSON: string[], callback: mozIBridgedSyncEngineCallback): void; + apply(callback: mozIBridgedSyncEngineApplyCallback): void; + setUploaded(newTimestampMillis: i64, uploadedIds: string[], callback: mozIBridgedSyncEngineCallback): void; + syncFinished(callback: mozIBridgedSyncEngineCallback): void; + reset(callback: mozIBridgedSyncEngineCallback): void; + wipe(callback: mozIBridgedSyncEngineCallback): void; +} + +// https://searchfox.org/mozilla-central/source/services/interfaces/mozIInterruptible.idl + +interface mozIInterruptible extends nsISupports { + interrupt(): void; +} + +// https://searchfox.org/mozilla-central/source/services/interfaces/mozIServicesLogSink.idl + +interface mozIServicesLogSink extends nsISupports { + readonly LEVEL_OFF: 0; + readonly LEVEL_ERROR: 1; + readonly LEVEL_WARN: 2; + readonly LEVEL_INFO: 3; + readonly LEVEL_DEBUG: 4; + readonly LEVEL_TRACE: 5; + + maxLevel: i16; + error(message: string): void; + warn(message: string): void; + debug(message: string): void; + trace(message: string): void; + info(message: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/sessionstore/nsISessionStoreFunctions.idl + +interface nsISessionStoreFunctions extends nsISupports { + UpdateSessionStore(aBrowser: Element, aBrowsingContext: BrowsingContext, aPermanentKey: any, aEpoch: u32, aCollectSHistory: boolean, aData: any): void; + UpdateSessionStoreForStorage(aBrowser: Element, aBrowsingContext: BrowsingContext, aPermanentKey: any, aEpoch: u32, aData: any): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/sessionstore/nsISessionStoreRestoreData.idl + +interface nsISessionStoreRestoreData extends nsISupports { + url: string; + innerHTML: string; + scroll: string; + addTextField(aIsXPath: boolean, aIdOrXPath: string, aValue: string): void; + addCheckbox(aIsXPath: boolean, aIdOrXPath: string, aValue: boolean): void; + addFileList(aIsXPath: boolean, aIdOrXPath: string, aType: string, aFileList: string[]): void; + addSingleSelect(aIsXPath: boolean, aIdOrXPath: string, aSelectedIndex: u32, aValue: string): void; + addMultipleSelect(aIsXPath: boolean, aIdOrXPath: string, aValues: string[]): void; + addCustomElement(aIsXPath: boolean, aIdOrXPath: string, aValue: any, aState: any): void; + addChild(aChild: nsISessionStoreRestoreData, aIndex: u32): void; +} + +// https://searchfox.org/mozilla-central/source/browser/components/shell/nsIShellService.idl + +interface nsIShellService extends nsISupports { + readonly BACKGROUND_TILE: 1; + readonly BACKGROUND_STRETCH: 2; + readonly BACKGROUND_CENTER: 3; + readonly BACKGROUND_FILL: 4; + readonly BACKGROUND_FIT: 5; + readonly BACKGROUND_SPAN: 6; + + isDefaultBrowser(aForAllTypes?: boolean): boolean; + setDefaultBrowser(aForAllUsers: boolean): void; + setDesktopBackground(aElement: Element, aPosition: i32, aImageName: string): void; + desktopBackgroundColor: u32; +} + +// https://searchfox.org/mozilla-central/source/docshell/shistory/nsIBFCacheEntry.idl + +interface nsIBFCacheEntry extends nsISupports { + RemoveFromBFCacheSync(): void; + RemoveFromBFCacheAsync(): void; +} + +// https://searchfox.org/mozilla-central/source/docshell/shistory/nsISHEntry.idl + +interface nsISHEntry extends nsISupports { + URI: nsIURI; + originalURI: nsIURI; + resultPrincipalURI: nsIURI; + unstrippedURI: nsIURI; + loadReplace: boolean; + title: string; + name: string; + isSubFrame: boolean; + hasUserInteraction: boolean; + hasUserActivation: boolean; + referrerInfo: nsIReferrerInfo; + documentViewer: nsIDocumentViewer; + readonly isInBFCache: boolean; + sticky: boolean; + windowState: nsISupports; + refreshURIList: nsIMutableArray; + postData: nsIInputStream; + readonly hasPostData: boolean; + layoutHistoryState: nsILayoutHistoryState; + parent: nsISHEntry; + loadType: u32; + ID: u32; + cacheKey: u32; + saveLayoutStateFlag: boolean; + contentType: string; + URIWasModified: boolean; + triggeringPrincipal: nsIPrincipal; + principalToInherit: nsIPrincipal; + partitionedPrincipalToInherit: nsIPrincipal; + csp: nsIContentSecurityPolicy; + stateData: nsIStructuredCloneContainer; + docshellID: nsID; + readonly isSrcdocEntry: boolean; + srcdocData: string; + baseURI: nsIURI; + scrollRestorationIsManual: boolean; + readonly loadedInThisProcess: boolean; + readonly childCount: i32; + persist: boolean; + setScrollPosition(x: i32, y: i32): void; + getScrollPosition(x: OutParam, y: OutParam): void; + initLayoutHistoryState(): nsILayoutHistoryState; + clone(): nsISHEntry; + hasDynamicallyAddedChild(): boolean; + adoptBFCacheEntry(aEntry: nsISHEntry): void; + abandonBFCacheEntry(): void; + sharesDocumentWith(aEntry: nsISHEntry): boolean; + setLoadTypeAsHistory(): void; + AddChild(aChild: nsISHEntry, aOffset: i32, aUseRemoteSubframes?: boolean): void; + GetChildAt(aIndex: i32): nsISHEntry; + readonly bfcacheID: u64; + wireframe: any; +} + +// https://searchfox.org/mozilla-central/source/docshell/shistory/nsISHistory.idl + +interface nsISHistory extends nsISupports { + readonly count: i32; + index: i32; + readonly requestedIndex: i32; + getEntryAtIndex(aIndex: i32): nsISHEntry; + purgeHistory(aNumEntries: i32): void; + addSHistoryListener(aListener: nsISHistoryListener): void; + removeSHistoryListener(aListener: nsISHistoryListener): void; + reloadCurrentEntry(): void; + addEntry(aEntry: nsISHEntry, aPersist: boolean): void; + updateIndex(): void; + replaceEntry(aIndex: i32, aReplaceEntry: nsISHEntry): void; + notifyOnHistoryReload(): boolean; + evictOutOfRangeDocumentViewers(aIndex: i32): void; + evictAllDocumentViewers(): void; + reload(aReloadFlags: u32): void; + createEntry(): nsISHEntry; + canGoBackFromEntryAtIndex(aIndex: i32): boolean; +} + +// https://searchfox.org/mozilla-central/source/docshell/shistory/nsISHistoryListener.idl + +interface nsISHistoryListener extends nsISupports { + OnHistoryNewEntry(aNewURI: nsIURI, aOldIndex: i32): void; + OnHistoryReload(): boolean; + OnHistoryGotoIndex(): void; + OnHistoryPurge(aNumEntries: i32): void; + OnHistoryTruncate(aNumEntries: i32): void; + OnHistoryReplaceEntry(): void; + OnDocumentViewerEvicted(aNumEvicted: u32): void; +} + +// https://searchfox.org/mozilla-central/source/extensions/spellcheck/idl/mozIPersonalDictionary.idl + +interface mozIPersonalDictionary extends nsISupports { + load(): void; + save(): void; + readonly wordList: nsIStringEnumerator; + check(word: string): boolean; + addWord(word: string): void; + removeWord(word: string): void; + ignoreWord(word: string): void; + endSession(): void; +} + +// https://searchfox.org/mozilla-central/source/extensions/spellcheck/idl/mozISpellCheckingEngine.idl + +interface mozISpellCheckingEngine extends nsISupports { + dictionaries: string[]; + personalDictionary: mozIPersonalDictionary; + getDictionaryList(): string[]; + check(word: string): boolean; + suggest(word: string): string[]; + loadDictionariesFromDir(dir: nsIFile): void; + addDirectory(dir: nsIFile): void; + removeDirectory(dir: nsIFile): void; + addDictionary(lang: string, file: nsIURI): void; + removeDictionary(lang: string, file: nsIURI): boolean; +} + +// https://searchfox.org/mozilla-central/source/startupcache/nsIStartupCacheInfo.idl + +interface nsIStartupCacheInfo extends nsISupports { + readonly IgnoreDiskCache: boolean; + readonly FoundDiskCacheOnInit: boolean; + readonly WroteToDiskCache: boolean; + readonly DiskCachePath: string; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageAsyncConnection.idl + +interface mozIStorageAsyncConnection extends nsISupports { + readonly TRANSACTION_DEFAULT: -1; + readonly TRANSACTION_DEFERRED: 0; + readonly TRANSACTION_IMMEDIATE: 1; + readonly TRANSACTION_EXCLUSIVE: 2; + + defaultTransactionType: i32; + variableLimit: i32; + readonly transactionInProgress: boolean; + asyncClose(aCallback?: mozIStorageCompletionCallback): void; + asyncClone(aReadOnly: boolean, aCallback: mozIStorageCompletionCallback): void; + readonly databaseFile: nsIFile; + interrupt(): void; + asyncVacuum(aCallback?: mozIStorageCompletionCallback, aUseIncremental?: boolean, aSetPageSize?: i32): void; + createAsyncStatement(aSQLStatement: string): mozIStorageAsyncStatement; + executeAsync(aStatements: mozIStorageBaseStatement[], aCallback?: mozIStorageStatementCallback): mozIStoragePendingStatement; + executeSimpleSQLAsync(aSQLStatement: string, aCallback?: mozIStorageStatementCallback): mozIStoragePendingStatement; + loadExtension(aExtensionName: string, aCallback?: mozIStorageCompletionCallback): void; + createFunction(aFunctionName: string, aNumArguments: i32, aFunction: mozIStorageFunction): void; + removeFunction(aFunctionName: string): void; + setProgressHandler(aGranularity: i32, aHandler: mozIStorageProgressHandler): mozIStorageProgressHandler; + removeProgressHandler(): mozIStorageProgressHandler; + backupToFileAsync(aDestinationFile: nsIFile, aCallback: mozIStorageCompletionCallback, aPagesPerStep?: u32, aStepDelayMs?: u32): void; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageAsyncStatement.idl + +interface mozIStorageAsyncStatement extends mozIStorageBaseStatement { +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageBaseStatement.idl + +interface mozIStorageBaseStatement extends mozIStorageBindingParams { + readonly MOZ_STORAGE_STATEMENT_INVALID: 0; + readonly MOZ_STORAGE_STATEMENT_READY: 1; + readonly MOZ_STORAGE_STATEMENT_EXECUTING: 2; + + finalize(): void; + bindParameters(aParameters: mozIStorageBindingParamsArray): void; + newBindingParamsArray(): mozIStorageBindingParamsArray; + executeAsync(aCallback?: mozIStorageStatementCallback): mozIStoragePendingStatement; + readonly state: i32; + escapeStringForLIKE(aValue: string, aEscapeChar: string): string; + escapeUTF8StringForLIKE(aValue: string, aEscapeChar: string): string; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageBindingParams.idl + +interface mozIStorageBindingParams extends nsISupports { + bindByName(aName: string, aValue: nsIVariant): void; + bindBlobByName(aName: string, aValue: u8[]): void; + bindStringAsBlobByName(aName: string, aValue: string): void; + bindUTF8StringAsBlobByName(aName: string, aValue: string): void; + bindArrayOfIntegersByName(aName: string, aValue: i64[]): void; + bindArrayOfDoublesByName(aName: string, aValue: double[]): void; + bindArrayOfStringsByName(aName: string, aValue: string[]): void; + bindArrayOfUTF8StringsByName(aName: string, aValue: string[]): void; + bindByIndex(aIndex: u32, aValue: nsIVariant): void; + bindBlobByIndex(aIndex: u32, aValue: u8[]): void; + bindStringAsBlobByIndex(aIndex: u32, aValue: string): void; + bindUTF8StringAsBlobByIndex(aIndex: u32, aValue: string): void; + bindArrayOfIntegersByIndex(aIndex: u32, aValue: i64[]): void; + bindArrayOfDoublesByIndex(aIndex: u32, aValue: double[]): void; + bindArrayOfStringsByIndex(aIndex: u32, aValue: string[]): void; + bindArrayOfUTF8StringsByIndex(aIndex: u32, aValue: string[]): void; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageBindingParamsArray.idl + +interface mozIStorageBindingParamsArray extends nsISupports { + newBindingParams(): mozIStorageBindingParams; + addParams(aParameters: mozIStorageBindingParams): void; + readonly length: u32; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageCompletionCallback.idl + +type mozIStorageCompletionCallback = Callable<{ + complete(status: nsresult, value?: nsISupports): void; +}> + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageConnection.idl + +interface mozIStorageConnection extends mozIStorageAsyncConnection { + close(): void; + clone(aReadOnly?: boolean): mozIStorageConnection; + readonly defaultPageSize: i32; + readonly connectionReady: boolean; + readonly lastInsertRowID: i64; + readonly affectedRows: i32; + readonly lastError: i32; + readonly lastErrorString: string; + schemaVersion: i32; + createStatement(aSQLStatement: string): mozIStorageStatement; + executeSimpleSQL(aSQLStatement: string): void; + tableExists(aTableName: string): boolean; + indexExists(aIndexName: string): boolean; + beginTransaction(): void; + commitTransaction(): void; + rollbackTransaction(): void; + createTable(aTableName: string, aTableSchema: string): void; + setGrowthIncrement(aIncrement: i32, aDatabaseName: string): void; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageError.idl + +interface mozIStorageError extends nsISupports { + readonly ERROR: 1; + readonly INTERNAL: 2; + readonly PERM: 3; + readonly ABORT: 4; + readonly BUSY: 5; + readonly LOCKED: 6; + readonly NOMEM: 7; + readonly READONLY: 8; + readonly INTERRUPT: 9; + readonly IOERR: 10; + readonly CORRUPT: 11; + readonly FULL: 13; + readonly CANTOPEN: 14; + readonly EMPTY: 16; + readonly SCHEMA: 17; + readonly TOOBIG: 18; + readonly CONSTRAINT: 19; + readonly MISMATCH: 20; + readonly MISUSE: 21; + readonly NOLFS: 22; + readonly AUTH: 23; + readonly FORMAT: 24; + readonly RANGE: 25; + readonly NOTADB: 26; + + readonly result: i32; + readonly message: string; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageFunction.idl + +type mozIStorageFunction = Callable<{ + onFunctionCall(aFunctionArguments: mozIStorageValueArray): nsIVariant; +}> + +// https://searchfox.org/mozilla-central/source/storage/mozIStoragePendingStatement.idl + +interface mozIStoragePendingStatement extends nsISupports { + cancel(): void; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageProgressHandler.idl + +interface mozIStorageProgressHandler extends nsISupports { + onProgress(aConnection: mozIStorageConnection): boolean; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageResultSet.idl + +interface mozIStorageResultSet extends nsISupports { + getNextRow(): mozIStorageRow; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageRow.idl + +interface mozIStorageRow extends mozIStorageValueArray { + getResultByIndex(aIndex: u32): nsIVariant; + getResultByName(aName: string): nsIVariant; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageService.idl + +interface mozIStorageService extends nsISupports { + readonly OPEN_DEFAULT: 0; + readonly OPEN_SHARED: 1; + readonly OPEN_READONLY: 2; + readonly OPEN_IGNORE_LOCKING_MODE: 4; + readonly OPEN_NOT_EXCLUSIVE: 8; + readonly CONNECTION_DEFAULT: 0; + readonly CONNECTION_INTERRUPTIBLE: 1; + + openAsyncDatabase(aDatabaseStore: nsIVariant, aOpenFlags: u32, aConnectionFlags: u32, aCallback: mozIStorageCompletionCallback): void; + openSpecialDatabase(aStorageKey: string, aName?: string, aConnectionFlags?: u32): mozIStorageConnection; + openDatabase(aDatabaseFile: nsIFile, aConnectionFlags?: u32): mozIStorageConnection; + openUnsharedDatabase(aDatabaseFile: nsIFile, aConnectionFlags?: u32): mozIStorageConnection; + openDatabaseWithFileURL(aFileURL: nsIFileURL, aTelemetryFilename?: string, aConnectionFlags?: u32): mozIStorageConnection; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageStatement.idl + +interface mozIStorageStatement extends mozIStorageBaseStatement { + readonly VALUE_TYPE_NULL: 0; + readonly VALUE_TYPE_INTEGER: 1; + readonly VALUE_TYPE_FLOAT: 2; + readonly VALUE_TYPE_TEXT: 3; + readonly VALUE_TYPE_BLOB: 4; + + clone(): mozIStorageStatement; + readonly parameterCount: u32; + getParameterName(aParamIndex: u32): string; + getParameterIndex(aName: string): u32; + readonly columnCount: u32; + getColumnName(aColumnIndex: u32): string; + getColumnIndex(aName: string): u32; + reset(): void; + execute(): void; + executeStep(): boolean; + readonly numEntries: u32; + getTypeOfIndex(aIndex: u32): i32; + getVariant(aIndex: u32): nsIVariant; + getInt32(aIndex: u32): i32; + getInt64(aIndex: u32): i64; + getDouble(aIndex: u32): double; + getUTF8String(aIndex: u32): string; + getString(aIndex: u32): string; + getBlob(aIndex: u32, aDataSize: OutParam, aData: OutParam): void; + getBlobAsString(aIndex: u32): string; + getBlobAsUTF8String(aIndex: u32): string; + getIsNull(aIndex: u32): boolean; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageStatementCallback.idl + +interface mozIStorageStatementCallback extends nsISupports { + readonly REASON_FINISHED: 0; + readonly REASON_CANCELED: 1; + readonly REASON_ERROR: 2; + + handleResult(aResultSet: mozIStorageResultSet): void; + handleError(aError: mozIStorageError): void; + handleCompletion(aReason: u16): void; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageVacuumParticipant.idl + +interface mozIStorageVacuumParticipant extends nsISupports { + readonly expectedDatabasePageSize: i32; + readonly useIncrementalVacuum: boolean; + readonly databaseConnection: mozIStorageAsyncConnection; + onBeginVacuum(): boolean; + onEndVacuum(aSucceeded: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/storage/mozIStorageValueArray.idl + +interface mozIStorageValueArray extends nsISupports { + readonly VALUE_TYPE_NULL: 0; + readonly VALUE_TYPE_INTEGER: 1; + readonly VALUE_TYPE_FLOAT: 2; + readonly VALUE_TYPE_TEXT: 3; + readonly VALUE_TYPE_BLOB: 4; + + readonly numEntries: u32; + getTypeOfIndex(aIndex: u32): i32; + getInt32(aIndex: u32): i32; + getInt64(aIndex: u32): i64; + getDouble(aIndex: u32): double; + getUTF8String(aIndex: u32): string; + getString(aIndex: u32): string; + getBlob(aIndex: u32, aDataSize: OutParam, aData: OutParam): void; + getBlobAsString(aIndex: u32): string; + getBlobAsUTF8String(aIndex: u32): string; + getIsNull(aIndex: u32): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/core/nsITelemetry.idl + +type nsIFetchTelemetryDataCallback = Callable<{ + complete(): void; +}> + +interface nsITelemetry extends nsISupports { + readonly HISTOGRAM_EXPONENTIAL: 0; + readonly HISTOGRAM_LINEAR: 1; + readonly HISTOGRAM_BOOLEAN: 2; + readonly HISTOGRAM_FLAG: 3; + readonly HISTOGRAM_COUNT: 4; + readonly HISTOGRAM_CATEGORICAL: 5; + readonly SCALAR_TYPE_COUNT: 0; + readonly SCALAR_TYPE_STRING: 1; + readonly SCALAR_TYPE_BOOLEAN: 2; + readonly DATASET_ALL_CHANNELS: 0; + readonly DATASET_PRERELEASE_CHANNELS: 1; + readonly INCLUDE_OLD_LOADEVENTS: 1; + readonly KEEP_LOADEVENTS_NEW: 2; + readonly INCLUDE_PRIVATE_FIELDS_IN_LOADEVENTS: 4; + readonly EXCLUDE_STACKINFO_FROM_LOADEVENTS: 8; + + getCategoricalLabels(): any; + getSnapshotForHistograms(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; + getSnapshotForKeyedHistograms(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; + getSnapshotForScalars(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; + getSnapshotForKeyedScalars(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; + readonly lastShutdownDuration: u32; + readonly failedProfileLockCount: u32; + readonly slowSQL: any; + readonly debugSlowSQL: any; + getUntrustedModuleLoadEvents(aFlags?: u32): Promise; + readonly areUntrustedModuleLoadEventsReady: boolean; + getLoadedModules(): Promise; + readonly lateWrites: any; + getHistogramById(id: string): any; + getKeyedHistogramById(id: string): any; + canRecordBase: boolean; + canRecordExtended: boolean; + readonly canRecordReleaseData: boolean; + readonly canRecordPrereleaseData: boolean; + readonly isOfficialTelemetry: boolean; + asyncFetchTelemetryData(aCallback: nsIFetchTelemetryDataCallback): void; + readonly fileIOReports: any; + msSinceProcessStart(): double; + msSinceProcessStartIncludingSuspend(): double; + msSinceProcessStartExcludingSuspend(): double; + msSystemNow(): double; + clearScalars(): void; + flushBatchedChildTelemetry(): void; + snapshotEvents(aDataset: u32, aClear?: boolean, aEventLimit?: u32): any; + registerBuiltinEvents(aCategory: string, aEventData: any): void; + registerBuiltinScalars(aCategoryName: string, aScalarData: any): void; + clearEvents(): void; + getAllStores(): any; + earlyInit(): void; + delayedInit(): void; + shutdown(): void; + gatherMemory(): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/dap/nsIDAPTelemetry.idl + +interface nsIDAPTelemetry extends nsISupports { + GetReportU8(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u8, task_id: u8[], time_precision: u64, report: OutParam): void; + GetReportVecU8(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u8[], task_id: u8[], time_precision: u64, report: OutParam): void; + GetReportVecU16(leaderHpkeConfig: u8[], helperHpkeConfig: u8[], measurement: u16[], task_id: u8[], time_precision: u64, report: OutParam): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/test/httpserver/nsIHttpServer.idl + +interface nsIHttpServer extends nsISupports { + start(port: i32): void; + start_ipv6(port: i32): void; + start_dualStack(port: i32): void; + stop(callback: nsIHttpServerStoppedCallback): void; + registerFile(path: string, file: nsIFile, handler?: nsIHttpRequestHandler): void; + registerPathHandler(path: string, handler: nsIHttpRequestHandler): void; + registerPrefixHandler(prefix: string, handler: nsIHttpRequestHandler): void; + registerErrorHandler(code: u32, handler: nsIHttpRequestHandler): void; + registerDirectory(path: string, dir: nsIFile): void; + registerContentType(extension: string, type: string): void; + setIndexHandler(handler: nsIHttpRequestHandler): void; + readonly identity: nsIHttpServerIdentity; + getState(path: string, key: string): string; + setState(path: string, key: string, value: string): void; + getSharedState(key: string): string; + setSharedState(key: string, value: string): void; + getObjectState(key: string): nsISupports; + setObjectState(key: string, value: nsISupports): void; +} + +type nsIHttpServerStoppedCallback = Callable<{ + onStopped(): void; +}> + +interface nsIHttpServerIdentity extends nsISupports { + readonly primaryScheme: string; + readonly primaryHost: string; + readonly primaryPort: i32; + add(scheme: string, host: string, port: i32): void; + remove(scheme: string, host: string, port: i32): boolean; + has(scheme: string, host: string, port: i32): boolean; + getScheme(host: string, port: i32): string; + setPrimary(scheme: string, host: string, port: i32): void; +} + +type nsIHttpRequestHandler = Callable<{ + handle(request: nsIHttpRequest, response: nsIHttpResponse): void; +}> + +interface nsIHttpRequest extends nsISupports { + readonly method: string; + readonly scheme: string; + readonly host: string; + readonly port: u32; + readonly path: string; + readonly queryString: string; + readonly httpVersion: string; + getHeader(fieldName: string): string; + hasHeader(fieldName: string): boolean; + readonly headers: nsISimpleEnumerator; + readonly bodyInputStream: nsIInputStream; +} + +interface nsIHttpResponse extends nsISupports { + setStatusLine(httpVersion: string, statusCode: u16, description: string): void; + setHeader(name: string, value: string, merge?: boolean): void; + setHeaderNoCheck(name: string, value: string): void; + readonly bodyOutputStream: nsIOutputStream; + write(data: string): void; + processAsync(): void; + seizePower(): void; + finish(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/thumbnails/nsIPageThumbsStorageService.idl + +interface nsIPageThumbsStorageService extends nsISupports { + getLeafNameForURL(aURL: string): string; + readonly path: string; + getFilePathForURL(aURL: string): string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/bouncetrackingprotection/nsIBTPRemoteExceptionList.idl + +interface nsIBTPRemoteExceptionList extends nsISupports { + init(aProtection: nsIBounceTrackingProtection): Promise; + shutdown(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/bouncetrackingprotection/nsIBounceTrackingMapEntry.idl + +interface nsIBounceTrackingMapEntry extends nsISupports { + readonly siteHost: string; + readonly timeStamp: PRTime; +} + +interface nsIBounceTrackingPurgeEntry extends nsIBounceTrackingMapEntry { + readonly purgeTime: PRTime; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/bouncetrackingprotection/nsIBounceTrackingProtection.idl + +} // global + +declare namespace nsIBounceTrackingProtection { + +enum Modes { + MODE_DISABLED = 0, + MODE_ENABLED = 1, + MODE_ENABLED_STANDBY = 2, + MODE_ENABLED_DRY_RUN = 3, + MAX_MODE_VALUE = 3, +} + +} + +declare global { + +interface nsIBounceTrackingProtection extends nsISupports, Enums { + clearAll(): void; + clearBySiteHostAndOriginAttributes(aSiteHost: string, originAttributes: any): void; + clearBySiteHostAndOriginAttributesPattern(aSiteHost: string, aOriginAttributesPattern: any): void; + clearByTimeRange(aFrom: PRTime, aTo: PRTime): void; + clearByOriginAttributesPattern(aPattern: string): void; + addSiteHostExceptions(aSiteHosts: string[]): void; + removeSiteHostExceptions(aSiteHosts: string[]): void; + hasRecentlyPurgedSite(aSiteHost: string): boolean; + testGetSiteHostExceptions(): string[]; + testRunPurgeBounceTrackers(): Promise; + testClearExpiredUserActivations(): void; + testGetBounceTrackerCandidateHosts(originAttributes: any): nsIBounceTrackingMapEntry[]; + testGetUserActivationHosts(originAttributes: any): nsIBounceTrackingMapEntry[]; + testAddBounceTrackerCandidate(originAttributes: any, aSiteHost: string, aBounceTime: PRTime): void; + testAddUserActivation(originAttributes: any, aSiteHost: string, aActivationTime: PRTime): void; + testGetRecentlyPurgedTrackers(originAttributes: any): nsIBounceTrackingPurgeEntry[]; + testMaybeMigrateUserInteractionPermissions(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIContentBlockingAllowList.idl + +interface nsIContentBlockingAllowList extends nsISupports { + computeContentBlockingAllowListPrincipal(aPrincipal: nsIPrincipal): nsIPrincipal; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIPartitioningExceptionListService.idl + +type nsIPartitioningExceptionListObserver = Callable<{ + onExceptionListUpdate(aList: string): void; +}> + +interface nsIPartitioningExceptionListService extends nsISupports { + registerAndRunExceptionListObserver(aObserver: nsIPartitioningExceptionListObserver): void; + unregisterExceptionListObserver(aObserver: nsIPartitioningExceptionListObserver): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIPurgeTrackerService.idl + +interface nsIPurgeTrackerService extends nsISupports { + purgeTrackingCookieJars(): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsITrackingDBService.idl + +interface nsITrackingDBService extends nsISupports { + readonly OTHER_COOKIES_BLOCKED_ID: 0; + readonly TRACKERS_ID: 1; + readonly TRACKING_COOKIES_ID: 2; + readonly CRYPTOMINERS_ID: 3; + readonly FINGERPRINTERS_ID: 4; + readonly SOCIAL_ID: 5; + readonly SUSPICIOUS_FINGERPRINTERS_ID: 6; + readonly BOUNCETRACKERS_ID: 7; + + recordContentBlockingLog(data: string): void; + saveEvents(data: string): Promise; + clearAll(): Promise; + clearSince(since: i64): Promise; + getEventsByDateRange(dateFrom: i64, dateTo: i64): Promise; + sumAllEvents(): Promise; + getEarliestRecordedDate(): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIURLDecorationAnnotationsService.idl + +interface nsIURLDecorationAnnotationsService extends nsISupports { + ensureUpdated(): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIURLQueryStringStripper.idl + +interface nsIURLQueryStringStripper extends nsISupports { + strip(aURI: nsIURI, aIsPBM: boolean, aOutput: OutParam): u32; + stripForCopyOrShare(aURI: nsIURI): nsIURI; + canStripForShare(aURI: nsIURI): boolean; + testGetStripList(): string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIURLQueryStrippingListService.idl + +interface nsIURLQueryStrippingListObserver extends nsISupports { + onQueryStrippingListUpdate(aStripList: string, aAllowList: string): void; + onStripOnShareUpdate(aStripRules: string[]): void; +} + +interface nsIURLQueryStrippingListService extends nsISupports { + registerAndRunObserver(aObserver: nsIURLQueryStrippingListObserver): void; + registerAndRunObserverStripOnShare(aObserver: nsIURLQueryStrippingListObserver): void; + unregisterObserver(aObserver: nsIURLQueryStrippingListObserver): void; + unregisterStripOnShareObserver(aObserver: nsIURLQueryStrippingListObserver): void; + clearLists(): void; + testWaitForInit(): Promise; + testSetList(testFile: any): Promise; + testHasStripOnShareObservers(): boolean; + testHasQPSObservers(): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/asyncshutdown/nsIAsyncShutdown.idl + +interface nsIAsyncShutdownBlocker extends nsISupports { + readonly name: string; + blockShutdown(aBarrierClient: nsIAsyncShutdownClient): void; + readonly state: nsIPropertyBag; +} + +interface nsIAsyncShutdownClient extends nsISupports { + readonly name: string; + readonly isClosed: boolean; + addBlocker(aBlocker: nsIAsyncShutdownBlocker, aFileName: string, aLineNumber: i32, aStack: string): void; + removeBlocker(aBlocker: nsIAsyncShutdownBlocker): void; + readonly jsclient: any; +} + +type nsIAsyncShutdownCompletionCallback = Callable<{ + done(): void; +}> + +interface nsIAsyncShutdownBarrier extends nsISupports { + readonly client: nsIAsyncShutdownClient; + readonly state: nsIPropertyBag; + wait(aOnReady: nsIAsyncShutdownCompletionCallback): void; +} + +interface nsIAsyncShutdownService extends nsISupports { + makeBarrier(aName: string): nsIAsyncShutdownBarrier; + readonly profileBeforeChange: nsIAsyncShutdownClient; + readonly profileChangeTeardown: nsIAsyncShutdownClient; + readonly quitApplicationGranted: nsIAsyncShutdownClient; + readonly sendTelemetry: nsIAsyncShutdownClient; + readonly webWorkersShutdown: nsIAsyncShutdownClient; + readonly xpcomWillShutdown: nsIAsyncShutdownClient; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasks.idl + +interface nsIBackgroundTasks extends nsISupports { + readonly isBackgroundTaskMode: boolean; + backgroundTaskName(): string; + overrideBackgroundTaskNameForTesting(taskName: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasksManager.idl + +interface nsIBackgroundTasksManager extends nsICommandLineHandler { + runBackgroundTaskNamed(aTaskName: string, aCommandLine: nsICommandLine): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasksRunner.idl + +interface nsIBackgroundTasksRunner extends nsISupports { + runInDetachedProcess(aTaskName: string, aCommandLine: string[]): void; + removeDirectoryInDetachedProcess(aParentDirPath: string, aChildDirName: string, aSecondsToWait: string, aOtherFoldersSuffix: string, aMetricsId?: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cleardata/nsIClearBySiteEntry.idl + +interface nsIClearBySiteEntry extends nsISupports { + schemelessSite: string; + patternJSON: string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cleardata/nsIClearDataService.idl + +interface nsIClearDataService extends nsISupports { + readonly CLEAR_COOKIES: 1; + readonly CLEAR_NETWORK_CACHE: 2; + readonly CLEAR_IMAGE_CACHE: 4; + readonly CLEAR_JS_CACHE: 8; + readonly CLEAR_DOWNLOADS: 16; + readonly CLEAR_MEDIA_DEVICES: 64; + readonly CLEAR_DOM_QUOTA: 128; + readonly CLEAR_PREDICTOR_NETWORK_DATA: 256; + readonly CLEAR_DOM_PUSH_NOTIFICATIONS: 512; + readonly CLEAR_HISTORY: 1024; + readonly CLEAR_MESSAGING_LAYER_SECURITY_STATE: 2048; + readonly CLEAR_AUTH_TOKENS: 4096; + readonly CLEAR_AUTH_CACHE: 8192; + readonly CLEAR_SITE_PERMISSIONS: 16384; + readonly CLEAR_CONTENT_PREFERENCES: 32768; + readonly CLEAR_HSTS: 65536; + readonly CLEAR_EME: 131072; + readonly CLEAR_REPORTS: 262144; + readonly CLEAR_STORAGE_ACCESS: 524288; + readonly CLEAR_CERT_EXCEPTIONS: 1048576; + readonly CLEAR_CONTENT_BLOCKING_RECORDS: 2097152; + readonly CLEAR_CSS_CACHE: 4194304; + readonly CLEAR_PREFLIGHT_CACHE: 8388608; + readonly CLEAR_CLIENT_AUTH_REMEMBER_SERVICE: 16777216; + readonly CLEAR_CREDENTIAL_MANAGER_STATE: 33554432; + readonly CLEAR_COOKIE_BANNER_EXCEPTION: 67108864; + readonly CLEAR_COOKIE_BANNER_EXECUTED_RECORD: 134217728; + readonly CLEAR_FINGERPRINTING_PROTECTION_STATE: 268435456; + readonly CLEAR_BOUNCE_TRACKING_PROTECTION_STATE: 536870912; + readonly CLEAR_STORAGE_PERMISSIONS: 1073741824; + readonly CLEAR_SHUTDOWN_EXCEPTIONS: 2147483648; + readonly CLEAR_ALL: 4294967295; + readonly CLEAR_PERMISSIONS: 2147500032; + readonly CLEAR_ALL_CACHES: 12648462; + readonly CLEAR_DOM_STORAGES: 262784; + readonly CLEAR_FORGET_ABOUT_SITE: 3218591647; + readonly CLEAR_COOKIES_AND_SITE_DATA: 2013739649; + readonly CLEAR_STATE_FOR_TRACKER_PURGING: 2043624143; + + deleteDataFromLocalFiles(aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; + deleteDataFromHost(aHost: string, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; + deleteDataFromSite(aSchemelessSite: string, aOriginAttributesPattern: any, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; + deleteDataFromSiteAndOriginAttributesPatternString(aSchemelessSite: string, aOriginAttributesPatternString: string, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; + deleteDataFromPrincipal(aPrincipal: nsIPrincipal, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; + deleteDataInTimeRange(aFrom: PRTime, aTo: PRTime, aIsUserRequest: boolean, aFlags: u32, aCallback: nsIClearDataCallback): void; + deleteData(aFlags: u32, aCallback: nsIClearDataCallback): void; + deleteDataFromOriginAttributesPattern(aOriginAttributesPattern: any, aCallback?: nsIClearDataCallback): void; + deleteUserInteractionForClearingHistory(aPrincipalsWithStorage: nsIPrincipal[], aFrom?: PRTime, aCallback?: nsIClearDataCallback): void; + cleanupAfterDeletionAtShutdown(aFlags: u32, aCallback: nsIClearDataCallback): void; + hostMatchesSite(aHost: string, aOriginAttributes: any, aSchemelessSite: string, aOriginAttributesPattern?: any): boolean; +} + +type nsIClearDataCallback = Callable<{ + onDataDeleted(aFailedFlags: u32): void; +}> + +// https://searchfox.org/mozilla-central/source/toolkit/components/contentanalysis/nsIContentAnalysis.idl + +} // global + +declare namespace nsIContentAnalysisAcknowledgement { + +enum Result { + eSuccess = 1, + eInvalidResponse = 2, + eTooLate = 3, +} + +enum FinalAction { + eUnspecified = 0, + eAllow = 1, + eReportOnly = 2, + eWarn = 3, + eBlock = 4, +} + +} + +declare global { + +interface nsIContentAnalysisAcknowledgement extends nsISupports, Enums { + readonly result: nsIContentAnalysisAcknowledgement.Result; + readonly finalAction: nsIContentAnalysisAcknowledgement.FinalAction; +} + +interface nsIContentAnalysisResult extends nsISupports { + readonly shouldAllowContent: boolean; +} + +} // global + +declare namespace nsIContentAnalysisResponse { + +enum Action { + eUnspecified = 0, + eReportOnly = 1, + eWarn = 2, + eBlock = 3, + eAllow = 1000, + eCanceled = 1001, +} + +enum CancelError { + eUserInitiated = 0, + eNoAgent = 1, + eInvalidAgentSignature = 2, + eErrorOther = 3, + eOtherRequestInGroupCancelled = 4, + eShutdown = 5, + eTimeout = 6, +} + +} + +declare global { + +interface nsIContentAnalysisResponse extends nsIContentAnalysisResult, Enums { + readonly action: nsIContentAnalysisResponse.Action; + readonly cancelError: nsIContentAnalysisResponse.CancelError; + readonly requestToken: string; + readonly isCachedResponse: boolean; + acknowledge(aCaa: nsIContentAnalysisAcknowledgement): void; +} + +interface nsIClientDownloadResource extends nsISupports { + readonly DOWNLOAD_URL: 0; + readonly DOWNLOAD_REDIRECT: 1; + readonly TAB_URL: 2; + readonly TAB_REDIRECT: 3; + readonly PPAPI_DOCUMENT: 4; + readonly PPAPI_PLUGIN: 5; + + readonly url: string; + readonly type: u32; +} + +} // global + +declare namespace nsIContentAnalysisRequest { + +enum AnalysisType { + eUnspecified = 0, + eFileDownloaded = 1, + eFileAttached = 2, + eBulkDataEntry = 3, + ePrint = 4, + eFileTransfer = 5, +} + +enum Reason { + eUnknown = 0, + eClipboardPaste = 1, + eDragAndDrop = 2, + eFilePickerDialog = 3, + ePrintPreviewPrint = 4, + eSystemDialogPrint = 5, + eNormalDownload = 6, + eSaveAsDownload = 7, +} + +enum OperationType { + eCustomDisplayString = 0, + eClipboard = 1, + eDroppedText = 2, + eOperationPrint = 3, +} + +} + +declare global { + +interface nsIContentAnalysisRequest extends nsISupports, Enums { + readonly analysisType: nsIContentAnalysisRequest.AnalysisType; + readonly reason: nsIContentAnalysisRequest.Reason; + readonly operationTypeForDisplay: nsIContentAnalysisRequest.OperationType; + readonly operationDisplayString: string; + readonly dataTransfer: DataTransfer; + readonly transferable: nsITransferable; + readonly textContent: string; + readonly filePath: string; + readonly printDataHandle: u64; + readonly printDataSize: u64; + readonly printerName: string; + readonly url: nsIURI; + readonly sha256Digest: string; + readonly resources: nsIClientDownloadResource[]; + readonly email: string; + requestToken: string; + readonly windowGlobalParent: WindowGlobalParent; + userActionId: string; + userActionRequestsCount: i64; + readonly sourceWindowGlobal: WindowGlobalParent; +} + +interface nsIContentAnalysisCallback extends nsISupports { + contentResult(aResult: nsIContentAnalysisResult): void; + error(aResult: nsresult): void; +} + +interface nsIContentAnalysisDiagnosticInfo extends nsISupports { + readonly connectedToAgent: boolean; + readonly agentPath: string; + readonly failedSignatureVerification: boolean; + readonly requestCount: i64; +} + +interface nsIContentAnalysis extends nsISupports { + readonly isActive: boolean; + readonly mightBeActive: boolean; + isSetByEnterprisePolicy: boolean; + analyzeContentRequests(aCars: nsIContentAnalysisRequest[], aAutoAcknowledge: boolean): Promise; + analyzeContentRequestsCallback(aCars: nsIContentAnalysisRequest[], aAutoAcknowledge: boolean, callback: nsIContentAnalysisCallback): void; + analyzeContentRequestPrivate(aRequest: nsIContentAnalysisRequest, aAutoAcknowledge: boolean, aCallback: nsIContentAnalysisCallback): void; + cancelRequestsByUserAction(aUserActionId: string): void; + cancelRequestsByRequestToken(aRequestToken: string): void; + respondToWarnDialog(aRequestToken: string, aAllowContent: boolean): void; + cancelAllRequests(aForbidFutureRequests?: boolean): void; + testOnlySetCACmdLineArg(aVal: boolean): void; + getDiagnosticInfo(): Promise; + getURIForBrowsingContext(aBrowsingContext: BrowsingContext): nsIURI; + getURIForDropEvent(aEvent: DragEvent): nsIURI; + setCachedResponse(aURI: nsIURI, aSequenceNumber: i32, aAction: nsIContentAnalysisResponse.Action): void; + getCachedResponse(aURI: nsIURI, aSequenceNumber: i32, aAction: OutParam, aIsValid: OutParam): void; + showBlockedRequestDialog(aRequest: nsIContentAnalysisRequest): void; + makeResponseForTest(aAction: nsIContentAnalysisResponse.Action, aToken: string): nsIContentAnalysisResponse; + sendCancelToAgent(aUserActionId: string): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsIClickRule.idl + +} // global + +declare namespace nsIClickRule { + +enum RunContext { + RUN_TOP = 0, + RUN_CHILD = 1, + RUN_ALL = 2, +} + +} + +declare global { + +interface nsIClickRule extends nsISupports, Enums { + readonly presence: string; + readonly skipPresenceVisibilityCheck: boolean; + readonly runContext: nsIClickRule.RunContext; + readonly hide: string; + readonly optOut: string; + readonly optIn: string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerListService.idl + +interface nsICookieBannerListService extends nsISupports { + init(): void; + initForTest(): Promise; + shutdown(): void; + importAllRules(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerRule.idl + +interface nsICookieBannerRule extends nsISupports { + id: string; + domains: string[]; + readonly cookiesOptOut: nsICookieRule[]; + readonly cookiesOptIn: nsICookieRule[]; + clearCookies(): void; + addCookie(aIsOptOut: boolean, aName: string, aValue: string, aHost: string, aPath: string, aExpiryRelative: i64, aUnsetValue: string, aIsSecure: boolean, aIsHttpOnly: boolean, aIsSession: boolean, aSameSite: i32, aSchemeMap: nsICookie.schemeType): void; + readonly clickRule: nsIClickRule; + addClickRule(aPresence: string, aSkipPresenceVisibilityCheck?: boolean, aRunContext?: nsIClickRule.RunContext, aHide?: string, aOptOut?: string, aOptIn?: string): void; + clearClickRule(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerService.idl + +} // global + +declare namespace nsICookieBannerService { + +enum Modes { + MODE_DISABLED = 0, + MODE_REJECT = 1, + MODE_REJECT_OR_ACCEPT = 2, + MODE_UNSET = 3, +} + +} + +declare global { + +interface nsICookieBannerService extends nsISupports, Enums { + readonly isEnabled: boolean; + readonly rules: nsICookieBannerRule[]; + resetRules(doImport?: boolean): void; + getCookiesForURI(aURI: nsIURI, aIsPrivateBrowsing: boolean): nsICookieRule[]; + getClickRulesForDomain(aDomain: string, aIsTopLevel: boolean): nsIClickRule[]; + insertRule(aRule: nsICookieBannerRule): void; + removeRule(aRule: nsICookieBannerRule): void; + hasRuleForBrowsingContextTree(aBrowsingContext: BrowsingContext): boolean; + getDomainPref(aTopLevelURI: nsIURI, aIsPrivate: boolean): nsICookieBannerService.Modes; + setDomainPref(aTopLevelURI: nsIURI, aMode: nsICookieBannerService.Modes, aIsPrivate: boolean): void; + setDomainPrefAndPersistInPrivateBrowsing(aTopLevelURI: nsIURI, aMode: nsICookieBannerService.Modes): void; + removeDomainPref(aTopLevelURI: nsIURI, aIsPrivate: boolean): void; + removeAllDomainPrefs(aIsPrivate: boolean): void; + shouldStopBannerClickingForSite(aSite: string, aIsTopLevel: boolean, aIsPrivate: boolean): boolean; + markSiteExecuted(aSite: string, aIsTopLevel: boolean, aIsPrivate: boolean): void; + removeExecutedRecordForSite(aSite: string, aIsPrivate: boolean): void; + removeAllExecutedRecords(aIsPrivate: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerTelemetryService.idl + +interface nsICookieBannerTelemetryService extends nsISupports { +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieRule.idl + +interface nsICookieRule extends nsISupports { + readonly cookie: nsICookie; + readonly expiryRelative: i64; + readonly unsetValue: string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/crashes/nsICrashService.idl + +interface nsICrashService extends nsISupports { + readonly CRASH_TYPE_CRASH: 0; + readonly CRASH_TYPE_HANG: 1; + + addCrash(processType: i32, crashType: i32, id: string): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/finalizationwitness/nsIFinalizationWitnessService.idl + +interface nsIFinalizationWitnessService extends nsISupports { + make(aTopic: string, aString: string): any; +} + +// https://searchfox.org/mozilla-central/source/toolkit/modules/nsIBrowserWindowTracker.idl + +interface nsIVisibleTab extends nsISupports { + contentTitle: string; + browserId: i64; +} + +interface nsIBrowserWindowTracker extends nsISupports { + getAllVisibleTabs(): nsIVisibleTab[]; + getBrowserById(aBrowserId: u64): nsISupports; +} + +// https://searchfox.org/mozilla-central/source/toolkit/modules/nsIRegion.idl + +interface nsIRegion extends nsISupports { + readonly current: string; + readonly home: string; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/processtools/nsIProcessToolsService.idl + +interface nsIProcessToolsService extends nsISupports { + kill(pid: u64): void; + crash(pid: u64): void; + readonly pid: u64; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIFingerprintingWebCompatService.idl + +interface nsIFingerprintingOverride extends nsISupports { + readonly firstPartyDomain: string; + readonly thirdPartyDomain: string; + readonly overrides: string; +} + +interface nsIFingerprintingWebCompatService extends nsISupports { + init(): void; + shutdown(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIRFPService.idl + +interface nsIRFPService extends nsISupports { + setFingerprintingOverrides(aOverrides: nsIFingerprintingOverride[]): void; + getFingerprintingOverrides(aDomainKey: string): nsIRFPTargetSetIDL; + cleanAllOverrides(): void; + readonly enabledFingerprintingProtections: nsIRFPTargetSetIDL; + cleanAllRandomKeys(): void; + cleanRandomKeyByPrincipal(aPrincipal: nsIPrincipal): void; + cleanRandomKeyBySite(aSchemelessSite: string, originAttributes: any): void; + cleanRandomKeyByHost(aHost: string, aPattern: string): void; + cleanRandomKeyByOriginAttributesPattern(aPattern: string): void; + testGenerateRandomKey(aChannel: nsIChannel): u8[]; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIRFPTargetSetIDL.idl + +interface nsIRFPTargetSetIDL extends nsISupports { + low: u64; + high: u64; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/resistfingerprinting/nsIUserCharacteristicsPageService.idl + +interface nsIUserCharacteristicsPageService extends nsISupports { + createContentPage(principal: nsIPrincipal): Promise; + pageLoaded(browsingContext: BrowsingContext, data: any): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/search/nsISearchService.idl + +interface nsISearchSubmission extends nsISupports { + readonly postData: nsIInputStream; + readonly uri: nsIURI; +} + +interface nsISearchEngine extends nsISupports { + getSubmission(searchTerms: string, responseType?: string): nsISearchSubmission; + searchTermFromResult(uri: nsIURI): string; + readonly searchUrlQueryParamName: string; + readonly searchUrlPublicSuffix: string; + supportsResponseType(responseType: string): boolean; + getIconURL(preferredWidth?: u16): Promise; + speculativeConnect(options: any): void; + alias: string; + readonly aliases: string[]; + readonly description: string; + hidden: boolean; + hideOneOffButton: boolean; + readonly name: string; + readonly id: string; + readonly telemetryId: string; + readonly identifier: string; + readonly isAppProvided: boolean; + readonly inMemory: boolean; + readonly isGeneralPurposeEngine: boolean; + readonly searchUrlDomain: string; + readonly clickUrl: string; + readonly searchForm: string; +} + +interface nsISearchParseSubmissionResult extends nsISupports { + readonly engine: nsISearchEngine; + readonly terms: string; + readonly termsParameterName: string; +} + +interface nsISearchService extends nsISupports { + readonly ERROR_DOWNLOAD_FAILURE: 1; + readonly ERROR_DUPLICATE_ENGINE: 2; + readonly ERROR_ENGINE_CORRUPTED: 3; + readonly CHANGE_REASON_UNKNOWN: 0; + readonly CHANGE_REASON_USER: 1; + readonly CHANGE_REASON_USER_PRIVATE_SPLIT: 2; + readonly CHANGE_REASON_USER_SEARCHBAR: 3; + readonly CHANGE_REASON_USER_SEARCHBAR_CONTEXT: 4; + readonly CHANGE_REASON_ADDON_INSTALL: 5; + readonly CHANGE_REASON_ADDON_UNINSTALL: 6; + readonly CHANGE_REASON_CONFIG: 7; + readonly CHANGE_REASON_LOCALE: 8; + readonly CHANGE_REASON_REGION: 9; + readonly CHANGE_REASON_EXPERIMENT: 10; + readonly CHANGE_REASON_ENTERPRISE: 11; + readonly CHANGE_REASON_UITOUR: 12; + readonly CHANGE_REASON_ENGINE_UPDATE: 13; + readonly CHANGE_REASON_USER_PRIVATE_PREF_ENABLED: 14; + + init(): Promise; + readonly promiseInitialized: Promise; + readonly isInitialized: boolean; + readonly hasSuccessfullyInitialized: boolean; + runBackgroundChecks(): Promise; + resetToAppDefaultEngine(): Promise; + addOpenSearchEngine(engineURL: string, iconURL: string): Promise; + addUserEngine(name: string, url: string, alias?: string): Promise; + addEnginesFromExtension(extension: any): Promise; + restoreDefaultEngines(): void; + getEngineByAlias(alias: string): Promise; + getEngineByName(aEngineName: string): nsISearchEngine; + getEngineById(aEngineId: string): nsISearchEngine; + getEngines(): Promise; + getVisibleEngines(): Promise; + getAppProvidedEngines(): Promise; + getEnginesByExtensionID(extensionID: string): Promise; + findContextualSearchEngineByHost(host: string): Promise; + shouldShowInstallPrompt(engine: any): Promise; + addSearchEngine(engine: any): Promise; + moveEngine(engine: nsISearchEngine, newIndex: i32): Promise; + removeEngine(engine: nsISearchEngine): Promise; + removeWebExtensionEngine(id: string): Promise; + readonly appDefaultEngine: nsISearchEngine; + readonly appPrivateDefaultEngine: nsISearchEngine; + defaultEngine: nsISearchEngine; + getDefault(): Promise; + setDefault(engine: nsISearchEngine, changeSource: u16): Promise; + defaultPrivateEngine: nsISearchEngine; + getDefaultPrivate(): Promise; + setDefaultPrivate(engine: nsISearchEngine, changeSource: u16): Promise; + readonly separatePrivateDefaultUrlbarResultEnabled: boolean; + maybeSetAndOverrideDefault(extension: any): Promise; + getDefaultEngineInfo(): any; + parseSubmissionURL(url: string): nsISearchParseSubmissionResult; + getAlternateDomains(domain: string): string[]; +} + // https://searchfox.org/mozilla-central/source/toolkit/components/shell/nsIToolkitShellService.idl interface nsIToolkitShellService extends nsISupports { isDefaultApplication(): boolean; } -// https://searchfox.org/mozilla-central/source/dom/xul/nsIBrowserController.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/terminator/nsITerminatorTest.idl -interface nsIBrowserController extends nsISupports { - enableDisableCommands(action: string, enabledCommands: string[], disabledCommands: string[]): void; +interface nsITerminatorTest extends nsISupports { + getTicksForShutdownPhases(): any; } -// https://searchfox.org/mozilla-central/source/dom/xul/nsIController.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/xulstore/nsIXULStore.idl -interface nsIController extends nsISupports { - isCommandEnabled(command: string): boolean; - supportsCommand(command: string): boolean; - doCommand(command: string): void; - onEvent(eventName: string): void; +interface nsIXULStore extends nsISupports { + persist(aNode: Node, attr: string): void; + setValue(doc: string, id: string, attr: string, value: string): void; + hasValue(doc: string, id: string, attr: string): boolean; + getValue(doc: string, id: string, attr: string): string; + removeValue(doc: string, id: string, attr: string): void; + removeDocument(doc: string): void; + getIDsEnumerator(doc: string): nsIStringEnumerator; + getAttributeEnumerator(doc: string, id: string): nsIStringEnumerator; } -interface nsICommandController extends nsISupports { - getCommandStateWithParams(command: string, aCommandParams: nsICommandParams): void; - doCommandWithParams(command: string, aCommandParams: nsICommandParams): void; - getSupportedCommands(): string[]; +// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIProfileMigrator.idl + +interface nsIProfileStartup extends nsISupports { + readonly directory: nsIFile; + doStartup(): void; } -// https://searchfox.org/mozilla-central/source/dom/xul/nsIControllers.idl - -interface nsIControllers extends nsISupports { - getControllerForCommand(command: string): nsIController; - insertControllerAt(index: u32, controller: nsIController): void; - removeControllerAt(index: u32): nsIController; - getControllerAt(index: u32): nsIController; - appendController(controller: nsIController): void; - removeController(controller: nsIController): void; - getControllerId(controller: nsIController): u32; - getControllerById(controllerID: u32): nsIController; - getControllerCount(): u32; +interface nsIProfileMigrator extends nsISupports { + migrate(aStartup: nsIProfileStartup, aKey: string, aProfileName?: string): void; } -// https://searchfox.org/mozilla-central/source/browser/components/newtab/nsIAboutNewTabService.idl +// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIProfileUnlocker.idl -interface nsIAboutNewTabService extends nsISupports { - readonly defaultURL: string; - aboutHomeChannel(aURI: nsIURI, aLoadInfo: nsILoadInfo): nsIChannel; - readonly welcomeURL: string; +interface nsIProfileUnlocker extends nsISupports { + readonly ATTEMPT_QUIT: 0; + readonly FORCE_QUIT: 1; + + unlock(aSeverity: u32): void; } -// https://searchfox.org/mozilla-central/source/parser/html/nsIParserUtils.idl +// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIToolkitProfile.idl -interface nsIParserUtils extends nsISupports { - readonly SanitizerAllowComments: 1; - readonly SanitizerAllowStyle: 2; - readonly SanitizerCidEmbedsOnly: 4; - readonly SanitizerDropNonCSSPresentation: 8; - readonly SanitizerDropForms: 16; - readonly SanitizerDropMedia: 32; - readonly SanitizerLogRemovals: 64; - - sanitize(src: string, flags: u32): string; - removeConditionalCSS(src: string): string; - convertToPlainText(src: string, flags: u32, wrapCol: u32): string; - parseFragment(fragment: string, flags: u32, isXML: boolean, baseURI: nsIURI, element: Element): DocumentFragment; +interface nsIProfileLock extends nsISupports { + readonly directory: nsIFile; + readonly localDirectory: nsIFile; + readonly replacedLockTime: PRTime; + unlock(): void; } -// https://searchfox.org/mozilla-central/source/parser/htmlparser/nsIExpatSink.idl - -interface nsIExpatSink extends nsISupports { - HandleStartElement(aName: string, aAtts: string[], aAttsCount: u32, aLineNumber: u32, aColumnNumber: u32): void; - HandleEndElement(aName: string): void; - HandleComment(aCommentText: string): void; - HandleCDataSection(aData: string, aLength: u32): void; - HandleDoctypeDecl(aSubset: string, aName: string, aSystemId: string, aPublicId: string, aCatalogData: nsISupports): void; - HandleCharacterData(aData: string, aLength: u32): void; - HandleProcessingInstruction(aTarget: string, aData: string): void; - HandleXMLDeclaration(aVersion: string, aEncoding: string, aStandalone: i32): void; - ReportError(aErrorText: string, aSourceText: string, aError: nsIScriptError): boolean; +interface nsIToolkitProfile extends nsISupports { + rootDir: nsIFile; + readonly localDir: nsIFile; + name: string; + storeID: string; + showProfileSelector: boolean; + remove(removeFiles: boolean): void; + removeInBackground(removeFiles: boolean): void; + lock(aUnlocker: OutParam): nsIProfileLock; } -// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsICredentialChooserService.idl +// https://searchfox.org/mozilla-central/source/toolkit/profile/nsIToolkitProfileService.idl -interface nsICredentialChooserService extends nsISupports { - showCredentialChooser(browsingContext: BrowsingContext, credentials: any[], callback: nsICredentialChosenCallback): void; - cancelCredentialChooser(browsingContext: BrowsingContext): void; - fetchImageToDataURI(window: mozIDOMWindow, uri: nsIURI): Promise; +} // global + +declare namespace nsIToolkitProfileService { + +enum downgradeUIFlags { + hasSync = 1, } -// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsICredentialChosenCallback.idl - -type nsICredentialChosenCallback = Callable<{ - notify(aChosenID: string): void; -}> - -// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsIIdentityCredentialPromptService.idl - -interface nsIIdentityCredentialPromptService extends nsISupports { - showProviderPrompt(browsingContext: BrowsingContext, identityProviders: any, identityManifests: any): Promise; - showPolicyPrompt(browsingContext: BrowsingContext, identityProvider: any, identityManifest: any, identityClientMetadata: any): Promise; - showAccountListPrompt(browsingContext: BrowsingContext, accountList: any, identityProvider: any, identityManifest: any): Promise; - close(browsingContext: BrowsingContext): void; +enum downgradeUIChoice { + quit = 0, + createNewProfile = 1, } -// https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsIIdentityCredentialStorageService.idl +enum profileManagerResult { + exit = 0, + launchWithProfile = 1, + restart = 2, +} -interface nsIIdentityCredentialStorageService extends nsISupports { - setState(rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, credentialID: string, registered: boolean, allowLogout: boolean): void; - getState(rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, credentialID: string, registered: OutParam, allowLogout: OutParam): void; - delete(rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, credentialID: string): void; +} + +declare global { + +interface nsIToolkitProfileService extends nsISupports, Enums { + readonly isListOutdated: boolean; + startWithLastProfile: boolean; + readonly profiles: nsISimpleEnumerator; + readonly currentProfile: nsIToolkitProfile; + readonly groupProfile: nsIToolkitProfile; + defaultProfile: nsIToolkitProfile; + selectStartupProfile(aArgv: string[], aIsResetting: boolean, aUpdateChannel: string, aLegacyInstallHash: string, aRootDir: OutParam, aLocalDir: OutParam, aProfile: OutParam): boolean; + getProfileByName(aName: string): nsIToolkitProfile; + getProfileByDir(aRootDir: nsIFile, aLocalDir?: nsIFile): nsIToolkitProfile; + createProfile(aRootDir: nsIFile, aName: string): nsIToolkitProfile; + createUniqueProfile(aRootDir: nsIFile, aNamePrefix: string): nsIToolkitProfile; + readonly profileCount: u32; + flush(): void; + asyncFlush(): Promise; + asyncFlushGroupProfile(): Promise; + removeProfileFilesByPath(aRootDir: nsIFile, aLocalDir: nsIFile, aTimeout: u32): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/remote/nsIRemoteService.idl + +interface nsIRemoteService extends nsISupports { + sendCommandLine(aProfile: string, aArgs: string[], aRaise?: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/editor/txmgr/nsITransaction.idl + +interface nsITransaction extends nsISupports { + doTransaction(): void; + undoTransaction(): void; + redoTransaction(): void; + readonly isTransient: boolean; + merge(aTransaction: nsITransaction): boolean; +} + +// https://searchfox.org/mozilla-central/source/editor/txmgr/nsITransactionManager.idl + +interface nsITransactionManager extends nsISupports { + doTransaction(aTransaction: nsITransaction): void; + undoTransaction(): void; + redoTransaction(): void; clear(): void; - deleteFromBaseDomain(baseDomain: string): void; - deleteFromPrincipal(rpPrincipal: nsIPrincipal): void; - deleteFromTimeRange(aFrom: PRTime, aTo: PRTime): void; - deleteFromOriginAttributesPattern(aPattern: string): void; + clearUndoStack(): void; + clearRedoStack(): void; + beginBatch(aData: nsISupports): void; + endBatch(aAllowEmpty: boolean): void; + readonly numberOfUndoItems: i32; + readonly numberOfRedoItems: i32; + maxTransactionCount: i32; + batchTopUndo(): void; + removeTopUndo(): void; + peekUndoStack(): nsITransaction; + peekRedoStack(): nsITransaction; } -// https://searchfox.org/mozilla-central/source/editor/nsIDocumentStateListener.idl +// https://searchfox.org/mozilla-central/source/editor/spellchecker/nsIInlineSpellChecker.idl -interface nsIDocumentStateListener extends nsISupports { - NotifyDocumentWillBeDestroyed(): void; - NotifyDocumentStateChanged(aNowDirty: boolean): void; +interface nsIInlineSpellChecker extends nsISupports { + readonly spellChecker: nsIEditorSpellCheck; + init(aEditor: nsIEditor): void; + cleanup(aDestroyingFrames: boolean): void; + enableRealTimeSpell: boolean; + spellCheckRange(aSelection: Range): void; + getMisspelledWord(aNode: Node, aOffset: u32): Range; + replaceWord(aNode: Node, aOffset: u32, aNewword: string): void; + addWordToDictionary(aWord: string): void; + removeWordFromDictionary(aWord: string): void; + ignoreWord(aWord: string): void; + ignoreWords(aWordsToIgnore: string[]): void; + updateCurrentDictionary(): void; + readonly spellCheckPending: boolean; } -// https://searchfox.org/mozilla-central/source/editor/nsIEditActionListener.idl +// https://searchfox.org/mozilla-central/source/intl/uconv/nsIScriptableUConv.idl -interface nsIEditActionListener extends nsISupports { - DidDeleteNode(aChild: Node, aResult: nsresult): void; - DidInsertText(aTextNode: CharacterData, aOffset: i32, aString: string, aResult: nsresult): void; - WillDeleteText(aTextNode: CharacterData, aOffset: i32, aLength: i32): void; - WillDeleteRanges(aRangesToDelete: Range[]): void; +interface nsIScriptableUnicodeConverter extends nsISupports { + ConvertFromUnicode(aSrc: string): string; + Finish(): string; + ConvertToUnicode(aSrc: string): string; + charset: string; + isInternal: boolean; } -// https://searchfox.org/mozilla-central/source/editor/nsIEditor.idl +// https://searchfox.org/mozilla-central/source/intl/uconv/nsITextToSubURI.idl -interface nsIEditor extends nsISupports { - readonly eNone: 0; - readonly eNext: 1; - readonly ePrevious: 2; - readonly eNextWord: 3; - readonly ePreviousWord: 4; - readonly eToBeginningOfLine: 5; - readonly eToEndOfLine: 6; - readonly eStrip: 0; - readonly eNoStrip: 1; - readonly eEditorPlaintextMask: 1; - readonly eEditorSingleLineMask: 2; - readonly eEditorPasswordMask: 4; - readonly eEditorReadonlyMask: 8; - readonly eEditorMailMask: 32; - readonly eEditorEnableWrapHackMask: 64; - readonly eEditorAllowInteraction: 512; - readonly eEditorRightToLeft: 2048; - readonly eEditorLeftToRight: 4096; - readonly eEditorSkipSpellCheck: 8192; - readonly eNewlinesPasteIntact: 0; - readonly eNewlinesPasteToFirst: 1; - readonly eNewlinesReplaceWithSpaces: 2; - readonly eNewlinesStrip: 3; - readonly eNewlinesReplaceWithCommas: 4; - readonly eNewlinesStripSurroundingWhitespace: 5; - - readonly selection: Selection; - setAttributeOrEquivalent(element: Element, sourceAttrName: string, sourceAttrValue: string, aSuppressTransaction: boolean): void; - removeAttributeOrEquivalent(element: Element, sourceAttrName: string, aSuppressTransaction: boolean): void; - flags: u32; - contentsMIMEType: string; - readonly isDocumentEditable: boolean; - readonly isSelectionEditable: boolean; - readonly document: Document; - readonly rootElement: Element; - readonly selectionController: nsISelectionController; - deleteSelection(action: i16, stripWrappers: i16): void; - readonly documentIsEmpty: boolean; - readonly documentModified: boolean; - documentCharacterSet: string; - resetModificationCount(): void; - getModificationCount(): i32; - incrementModificationCount(aModCount: i32): void; - enableUndo(enable: boolean): void; - readonly undoRedoEnabled: boolean; - readonly canUndo: boolean; - readonly canRedo: boolean; - clearUndoRedo(): void; - undo(): void; - undoAll(): void; - redo(): void; - beginTransaction(): void; - endTransaction(): void; - getInlineSpellChecker(autoCreate: boolean): nsIInlineSpellChecker; - setSpellcheckUserOverride(enable: boolean): void; - cut(): void; - canCut(): boolean; - copy(): void; - canCopy(): boolean; - paste(aClipboardType: nsIClipboard.ClipboardType): void; - pasteTransferable(aTransferable: nsITransferable): void; - canPaste(aClipboardType: nsIClipboard.ClipboardType): boolean; - selectAll(): void; - beginningOfDocument(): void; - endOfDocument(): void; - setAttribute(aElement: Element, attributestr: string, attvalue: string): void; - removeAttribute(aElement: Element, aAttribute: string): void; - cloneAttributes(aDestElement: Element, aSourceElement: Element): void; - insertNode(node: Node, parent: Node, aPosition: u32, aPreserveSelection?: boolean): void; - deleteNode(child: Node, aPreserveSelection?: boolean): void; - outputToString(formatType: string, flags: u32): string; - addEditActionListener(listener: nsIEditActionListener): void; - removeEditActionListener(listener: nsIEditActionListener): void; - addDocumentStateListener(listener: nsIDocumentStateListener): void; - removeDocumentStateListener(listener: nsIDocumentStateListener): void; - forceCompositionEnd(): void; - readonly composing: boolean; - unmask(aStart?: u32, aEnd?: i64, aTimeout?: u32): void; - mask(): void; - readonly unmaskedStart: u32; - readonly unmaskedEnd: u32; - readonly autoMaskingEnabled: boolean; - readonly passwordMask: string; - readonly textLength: u32; - newlineHandling: i32; - insertText(aStringToInsert: string): void; - insertLineBreak(): void; +interface nsITextToSubURI extends nsISupports { + ConvertAndEscape(charset: string, text: string): string; + UnEscapeAndConvert(charset: string, text: string): string; + unEscapeURIForUI(aURIFragment: string, aDontEscape?: boolean): string; + unEscapeNonAsciiURI(aCharset: string, aURIFragment: string): string; } -// https://searchfox.org/mozilla-central/source/editor/nsIEditorMailSupport.idl +// https://searchfox.org/mozilla-central/source/toolkit/components/timermanager/nsIUpdateTimerManager.idl -interface nsIEditorMailSupport extends nsISupports { - insertAsCitedQuotation(aQuotedText: string, aCitation: string, aInsertHTML: boolean): Node; - rewrap(aRespectNewlines: boolean): void; - insertTextWithQuotations(aStringToInsert: string): void; - wrapWidth: i32; +interface nsIUpdateTimerManager extends nsISupports { + registerTimer(id: string, callback: nsITimerCallback, interval: u32, skipFirst?: boolean): void; + unregisterTimer(id: string): void; } -// https://searchfox.org/mozilla-central/source/editor/nsIEditorSpellCheck.idl +// https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/nsIUpdateService.idl -interface nsIEditorSpellCheck extends nsISupports { - readonly FILTERTYPE_NORMAL: 1; - readonly FILTERTYPE_MAIL: 2; - - canSpellCheck(): boolean; - InitSpellChecker(editor: nsIEditor, enableSelectionChecking: boolean, callback?: nsIEditorSpellCheckCallback): void; - GetNextMisspelledWord(): string; - GetSuggestedWord(): string; - CheckCurrentWord(suggestedWord: string): boolean; - suggest(aCheckingWorkd: string, aMaxCount: u32): Promise; - ReplaceWord(misspelledWord: string, replaceWord: string, allOccurrences: boolean): void; - IgnoreWordAllOccurrences(word: string): void; - AddWordToDictionary(word: string): void; - RemoveWordFromDictionary(word: string): void; - GetDictionaryList(): string[]; - getCurrentDictionaries(): string[]; - setCurrentDictionaries(dictionaries: string[]): Promise; - UninitSpellChecker(): void; - setFilterType(filterType: u32): void; - UpdateCurrentDictionary(callback?: nsIEditorSpellCheckCallback): void; +interface nsIUpdatePatch extends nsISupports { + readonly type: string; + readonly URL: string; + finalURL: string; + readonly size: u32; + state: string; + errorCode: i32; + selected: boolean; + serialize(updates: Document): Element; } -type nsIEditorSpellCheckCallback = Callable<{ - editorSpellCheckDone(): void; +interface nsIUpdate extends nsISupports { + readonly type: string; + readonly name: string; + readonly displayVersion: string; + readonly appVersion: string; + readonly platformVersion: string; + readonly previousAppVersion: string; + readonly buildID: string; + readonly detailsURL: string; + readonly serviceURL: string; + readonly channel: string; + readonly unsupported: boolean; + promptWaitTime: i64; + isCompleteUpdate: boolean; + installDate: i64; + statusText: string; + readonly selectedPatch: nsIUpdatePatch; + state: string; + errorCode: i32; + elevationFailure: boolean; + readonly patchCount: u32; + getPatchAt(index: u32): nsIUpdatePatch; + serialize(updates: Document): Element; +} + +interface nsIUpdateCheckResult extends nsISupports { + readonly checksAllowed: boolean; + readonly succeeded: boolean; + readonly request: any; + readonly updates: nsIUpdate[]; +} + +interface nsIUpdateCheck extends nsISupports { + readonly id: i32; + readonly result: Promise; +} + +interface nsIUpdateCheckerInternal extends nsISupports { + checkForUpdates(checkType: i32): nsIUpdateCheck; +} + +interface nsIUpdateChecker extends nsISupports { + readonly BACKGROUND_CHECK: 1; + readonly FOREGROUND_CHECK: 2; + + checkForUpdates(checkType: i32): nsIUpdateCheck; + getUpdateURL(checkType: i32): Promise; + stopCheck(id: i32): void; + stopAllChecks(): void; + readonly internal: nsIUpdateCheckerInternal; +} + +interface nsIApplicationUpdateServiceInternal extends nsISupports { + init(force: boolean): Promise; + downloadUpdate(update: nsIUpdate): Promise; + stopDownload(): Promise; +} + +interface nsIApplicationUpdateService extends nsISupports { + readonly DOWNLOAD_SUCCESS: 1; + readonly DOWNLOAD_FAILURE_CANNOT_RESUME_IN_BACKGROUND: 2; + readonly DOWNLOAD_FAILURE_GENERIC: 3; + readonly STATE_IDLE: 1; + readonly STATE_DOWNLOADING: 2; + readonly STATE_STAGING: 4; + readonly STATE_PENDING: 5; + readonly STATE_SWAP: 6; + + init(): Promise; + checkForBackgroundUpdates(): Promise; + selectUpdate(updates: nsIUpdate[]): Promise; + addDownloadListener(listener: nsIRequestObserver): void; + removeDownloadListener(listener: nsIRequestObserver): void; + downloadUpdate(update: nsIUpdate): Promise; + onCheckComplete(result: nsIUpdateCheckResult): Promise; + stopDownload(): Promise; + readonly disabled: boolean; + readonly canUsuallyCheckForUpdates: boolean; + readonly canCheckForUpdates: boolean; + readonly elevationRequired: boolean; + readonly canUsuallyApplyUpdates: boolean; + readonly canApplyUpdates: boolean; + readonly isOtherInstanceHandlingUpdates: boolean; + readonly canUsuallyStageUpdates: boolean; + readonly canStageUpdates: boolean; + readonly canUsuallyUseBits: boolean; + readonly canUseBits: boolean; + readonly manualUpdateOnly: boolean; + readonly isAppBaseDirWritable: boolean; + onlyDownloadUpdatesThisSession: boolean; + getStateName(state: i32): string; + readonly currentState: i32; + readonly stateTransition: Promise; + readonly internal: nsIApplicationUpdateServiceInternal; +} + +interface nsIUpdateProcessor extends nsISupports { + processUpdate(): void; + getServiceRegKeyExists(): boolean; + attemptAutomaticApplicationRestartWithLaunchArgs(argvExtra: string[]): i32; + waitForProcessExit(pid: u32, timeoutMS: u32): void; +} + +interface nsIUpdateSyncManager extends nsISupports { + isOtherInstanceRunning(): boolean; + resetLock(anAppFile?: nsIFile): void; +} + +interface nsIUpdateMutex extends nsISupports { + isLocked(): boolean; + tryLock(): boolean; + unlock(): void; +} + +interface nsIUpdateManagerInternal extends nsISupports { + reload(skipFiles: boolean): Promise; + getHistory(): nsIUpdate[]; + addUpdateToHistory(update: nsIUpdate): void; + readyUpdate: nsIUpdate; + downloadingUpdate: nsIUpdate; + refreshUpdateStatus(): Promise; +} + +interface nsIUpdateManager extends nsISupports { + getHistory(): Promise; + getReadyUpdate(): Promise; + getDownloadingUpdate(): Promise; + updateInstalledAtStartup(): Promise; + lastUpdateInstalled(): Promise; + addUpdateToHistory(update: nsIUpdate): Promise; + saveUpdates(): void; + refreshUpdateStatus(): Promise; + elevationOptedIn(): Promise; + cleanupDownloadingUpdate(): Promise; + cleanupReadyUpdate(): Promise; + cleanupActiveUpdates(): Promise; + doInstallCleanup(): Promise; + doUninstallCleanup(): Promise; + readonly internal: nsIUpdateManagerInternal; +} + +interface nsIApplicationUpdateServiceStub extends nsISupports { + init(): Promise; + initUpdate(): Promise; + readonly updateDisabled: boolean; + readonly updateDisabledForTesting: boolean; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsCURILoader.idl + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsIContentHandler.idl + +interface nsIContentHandler extends nsISupports { + handleContent(aContentType: string, aWindowContext: nsIInterfaceRequestor, aRequest: nsIRequest): void; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsIDocumentLoader.idl + +interface nsIDocumentLoader extends nsISupports { + stop(): void; + readonly container: nsISupports; + readonly loadGroup: nsILoadGroup; + readonly documentChannel: nsIChannel; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsITransfer.idl + +interface nsITransfer extends nsIWebProgressListener2 { + readonly DOWNLOAD_ACCEPTABLE: 0; + readonly DOWNLOAD_FORBIDDEN: 1; + readonly DOWNLOAD_POTENTIALLY_UNSAFE: 2; + + init(aSource: nsIURI, aSourceOriginalURI: nsIURI, aTarget: nsIURI, aDisplayName: string, aMIMEInfo: nsIMIMEInfo, startTime: PRTime, aTempFile: nsIFile, aCancelable: nsICancelable, aIsPrivate: boolean, aDownloadClassification: i32, aReferrerInfo: nsIReferrerInfo, aOpenDownloadsListOnStart?: boolean): void; + initWithBrowsingContext(aSource: nsIURI, aTarget: nsIURI, aDisplayName: string, aMIMEInfo: nsIMIMEInfo, startTime: PRTime, aTempFile: nsIFile, aCancelable: nsICancelable, aIsPrivate: boolean, aDownloadClassification: i32, aReferrerInfo: nsIReferrerInfo, aOpenDownloadsListOnStart: boolean, aBrowsingContext: BrowsingContext, aHandleInternally: boolean, aHttpChannel: nsIHttpChannel): void; + setSha256Hash(aHash: string): void; + setSignatureInfo(aSignatureInfo: u8[][][]): void; + setRedirects(aRedirects: nsIArray): void; + readonly downloadPromise: Promise; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsIURIContentListener.idl + +interface nsIURIContentListener extends nsISupports { + doContent(aContentType: string, aIsContentPreferred: boolean, aRequest: nsIRequest, aContentHandler: OutParam): boolean; + isPreferred(aContentType: string, aDesiredContentType: OutParam): boolean; + canHandleContent(aContentType: string, aIsContentPreferred: boolean, aDesiredContentType: OutParam): boolean; + loadCookie: nsISupports; + parentContentListener: nsIURIContentListener; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsIURILoader.idl + +interface nsIURILoader extends nsISupports { + readonly IS_CONTENT_PREFERRED: 1; + readonly DONT_RETARGET: 2; + + registerContentListener(aContentListener: nsIURIContentListener): void; + unRegisterContentListener(aContentListener: nsIURIContentListener): void; + openURI(aChannel: nsIChannel, aFlags: u32, aWindowContext: nsIInterfaceRequestor): void; + openChannel(aChannel: nsIChannel, aFlags: u32, aWindowContext: nsIInterfaceRequestor): nsIStreamListener; + stop(aLoadCookie: nsISupports): void; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgress.idl + +interface nsIWebProgress extends nsISupports { + readonly NOTIFY_STATE_REQUEST: 1; + readonly NOTIFY_STATE_DOCUMENT: 2; + readonly NOTIFY_STATE_NETWORK: 4; + readonly NOTIFY_STATE_WINDOW: 8; + readonly NOTIFY_STATE_ALL: 15; + readonly NOTIFY_PROGRESS: 16; + readonly NOTIFY_STATUS: 32; + readonly NOTIFY_SECURITY: 64; + readonly NOTIFY_LOCATION: 128; + readonly NOTIFY_REFRESH: 256; + readonly NOTIFY_CONTENT_BLOCKING: 512; + readonly NOTIFY_ALL: 1023; + + addProgressListener(aListener: nsIWebProgressListener, aNotifyMask: u32): void; + removeProgressListener(aListener: nsIWebProgressListener): void; + readonly browsingContext: BrowsingContext; + readonly DOMWindow: mozIDOMWindowProxy; + readonly isTopLevel: boolean; + readonly isLoadingDocument: boolean; + readonly loadType: u32; + target: nsIEventTarget; + readonly documentRequest: nsIRequest; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgressListener.idl + +interface nsIWebProgressListener extends nsISupports { + readonly STATE_START: 1; + readonly STATE_REDIRECTING: 2; + readonly STATE_TRANSFERRING: 4; + readonly STATE_NEGOTIATING: 8; + readonly STATE_STOP: 16; + readonly STATE_IS_REQUEST: 65536; + readonly STATE_IS_DOCUMENT: 131072; + readonly STATE_IS_NETWORK: 262144; + readonly STATE_IS_WINDOW: 524288; + readonly STATE_IS_REDIRECTED_DOCUMENT: 1048576; + readonly STATE_RESTORING: 16777216; + readonly STATE_IS_INSECURE: 4; + readonly STATE_IS_BROKEN: 1; + readonly STATE_IS_SECURE: 2; + readonly STATE_BLOCKED_MIXED_ACTIVE_CONTENT: 16; + readonly STATE_LOADED_MIXED_ACTIVE_CONTENT: 32; + readonly STATE_BLOCKED_MIXED_DISPLAY_CONTENT: 256; + readonly STATE_LOADED_MIXED_DISPLAY_CONTENT: 512; + readonly STATE_IDENTITY_EV_TOPLEVEL: 1048576; + readonly STATE_IDENTITY_ASSOCIATED: 2097152; + readonly STATE_USES_SSL_3: 16777216; + readonly STATE_USES_WEAK_CRYPTO: 33554432; + readonly STATE_CERT_USER_OVERRIDDEN: 67108864; + readonly STATE_BLOCKED_TRACKING_CONTENT: 4096; + readonly STATE_LOADED_LEVEL_1_TRACKING_CONTENT: 8192; + readonly STATE_LOADED_LEVEL_2_TRACKING_CONTENT: 1048576; + readonly STATE_BLOCKED_FINGERPRINTING_CONTENT: 64; + readonly STATE_LOADED_FINGERPRINTING_CONTENT: 1024; + readonly STATE_REPLACED_FINGERPRINTING_CONTENT: 134217728; + readonly STATE_ALLOWED_FINGERPRINTING_CONTENT: 512; + readonly STATE_BLOCKED_CRYPTOMINING_CONTENT: 2048; + readonly STATE_LOADED_CRYPTOMINING_CONTENT: 2097152; + readonly STATE_BLOCKED_UNSAFE_CONTENT: 16384; + readonly STATE_COOKIES_LOADED: 32768; + readonly STATE_COOKIES_LOADED_TRACKER: 262144; + readonly STATE_COOKIES_LOADED_SOCIALTRACKER: 524288; + readonly STATE_COOKIES_BLOCKED_BY_PERMISSION: 268435456; + readonly STATE_COOKIES_BLOCKED_TRACKER: 536870912; + readonly STATE_COOKIES_BLOCKED_SOCIALTRACKER: 16777216; + readonly STATE_COOKIES_BLOCKED_ALL: 1073741824; + readonly STATE_COOKIES_PARTITIONED_TRACKER: 2; + readonly STATE_COOKIES_PARTITIONED_FOREIGN: 2147483648; + readonly STATE_COOKIES_BLOCKED_FOREIGN: 128; + readonly STATE_BLOCKED_SOCIALTRACKING_CONTENT: 65536; + readonly STATE_LOADED_SOCIALTRACKING_CONTENT: 131072; + readonly STATE_REPLACED_TRACKING_CONTENT: 16; + readonly STATE_ALLOWED_TRACKING_CONTENT: 32; + readonly STATE_BLOCKED_EMAILTRACKING_CONTENT: 4194304; + readonly STATE_LOADED_EMAILTRACKING_LEVEL_1_CONTENT: 8388608; + readonly STATE_LOADED_EMAILTRACKING_LEVEL_2_CONTENT: 256; + readonly STATE_ALLOWED_CANVAS_FINGERPRINTING: 33554432; + readonly STATE_ALLOWED_FONT_FINGERPRINTING: 67108864; + readonly STATE_BLOCKED_SUSPICIOUS_FINGERPRINTING: 4; + readonly STATE_PURGED_BOUNCETRACKER: 8; + readonly STATE_HTTPS_ONLY_MODE_UPGRADED: 4194304; + readonly STATE_HTTPS_ONLY_MODE_UPGRADE_FAILED: 8388608; + readonly STATE_HTTPS_ONLY_MODE_UPGRADED_FIRST: 134217728; + readonly LOCATION_CHANGE_SAME_DOCUMENT: 1; + readonly LOCATION_CHANGE_ERROR_PAGE: 2; + readonly LOCATION_CHANGE_RELOAD: 4; + readonly LOCATION_CHANGE_HASHCHANGE: 8; + readonly LOCATION_CHANGE_SESSION_STORE: 16; + + onStateChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aStateFlags: u32, aStatus: nsresult): void; + onProgressChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aCurSelfProgress: i32, aMaxSelfProgress: i32, aCurTotalProgress: i32, aMaxTotalProgress: i32): void; + onLocationChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aLocation: nsIURI, aFlags?: u32): void; + onStatusChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aStatus: nsresult, aMessage: string): void; + onSecurityChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aState: u32): void; + onContentBlockingEvent(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aEvent: u32): void; +} + +// https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgressListener2.idl + +interface nsIWebProgressListener2 extends nsIWebProgressListener { + onProgressChange64(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aCurSelfProgress: i64, aMaxSelfProgress: i64, aCurTotalProgress: i64, aMaxTotalProgress: i64): void; + onRefreshAttempted(aWebProgress: nsIWebProgress, aRefreshURI: nsIURI, aMillis: u32, aSameURI: boolean): boolean; +} + +// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIChannelClassifierService.idl + +interface nsIUrlClassifierBlockedChannel extends nsISupports { + readonly TRACKING_PROTECTION: 0; + readonly SOCIAL_TRACKING_PROTECTION: 1; + readonly FINGERPRINTING_PROTECTION: 2; + readonly CRYPTOMINING_PROTECTION: 3; + + readonly reason: u8; + readonly tables: string; + readonly url: string; + readonly tabId: u64; + readonly channelId: u64; + readonly isPrivateBrowsing: boolean; + readonly topLevelUrl: string; + replace(): void; + allow(): void; +} + +interface nsIChannelClassifierService extends nsISupports { + addListener(aObserver: nsIObserver): void; + removeListener(aObserver: nsIObserver): void; +} + +// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIURIClassifier.idl + +type nsIURIClassifierCallback = Callable<{ + onClassifyComplete(aErrorCode: nsresult, aList: string, aProvider: string, aFullHash: string): void; }> -// https://searchfox.org/mozilla-central/source/editor/nsIHTMLAbsPosEditor.idl - -interface nsIHTMLAbsPosEditor extends nsISupports { - absolutePositioningEnabled: boolean; - readonly isAbsolutePositioningActive: boolean; - snapToGridEnabled: boolean; - gridSize: u32; +interface nsIURIClassifier extends nsISupports { + classify(aPrincipal: nsIPrincipal, aCallback: nsIURIClassifierCallback): boolean; + asyncClassifyLocalWithFeatures(aURI: nsIURI, aFeatures: nsIUrlClassifierFeature[], aListType: nsIUrlClassifierFeature.listType, aCallback: nsIUrlClassifierFeatureCallback, aIdlePriority?: boolean): void; + asyncClassifyLocalWithFeatureNames(aURI: nsIURI, aFeatures: string[], aListType: nsIUrlClassifierFeature.listType, aCallback: nsIUrlClassifierFeatureCallback): void; + getFeatureByName(aFeatureName: string): nsIUrlClassifierFeature; + getFeatureNames(): string[]; + createFeatureWithTables(aName: string, aBlocklistTables: string[], aEntitylistTables: string[]): nsIUrlClassifierFeature; + sendThreatHitReport(aChannel: nsIChannel, aProvider: string, aList: string, aFullHash: string): void; } -// https://searchfox.org/mozilla-central/source/editor/nsIHTMLEditor.idl +// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIUrlClassifierExceptionListService.idl -interface nsIHTMLEditor extends nsISupports { - readonly eLeft: 0; - readonly eCenter: 1; - readonly eRight: 2; - readonly eJustify: 3; +type nsIUrlClassifierExceptionListObserver = Callable<{ + onExceptionListUpdate(aList: string): void; +}> - setInlineProperty(aProperty: string, aAttribute: string, aValue: string): void; - getInlinePropertyWithAttrValue(aProperty: string, aAttribute: string, aValue: string, aFirst: OutParam, aAny: OutParam, aAll: OutParam): string; - removeInlineProperty(aProperty: string, aAttribute: string): void; - nodeIsBlock(aNode: Node): boolean; - insertHTML(aInputString: string): void; - rebuildDocumentFromSource(aSourceString: string): void; - insertElementAtSelection(aElement: Element, aDeleteSelection: boolean): void; - updateBaseURL(): void; - selectElement(aElement: Element): void; - getParagraphState(aMixed: OutParam): string; - getFontFaceState(aMixed: OutParam): string; - getHighlightColorState(aMixed: OutParam): string; - getListState(aMixed: OutParam, aOL: OutParam, aUL: OutParam, aDL: OutParam): void; - getListItemState(aMixed: OutParam, aLI: OutParam, aDT: OutParam, aDD: OutParam): void; - getAlignment(aMixed: OutParam, aAlign: OutParam): void; - makeOrChangeList(aListType: string, entireList: boolean, aBulletType: string): void; - removeList(aListType: string): void; - getElementOrParentByTagName(aTagName: string, aNode: Node): Element; - getSelectedElement(aTagName: string): nsISupports; - createElementWithDefaults(aTagName: string): Element; - insertLinkAroundSelection(aAnchorElement: Element): void; - setBackgroundColor(aColor: string): void; - isCSSEnabled: boolean; - checkSelectionStateForAnonymousButtons(): void; - isAnonymousElement(aElement: Element): boolean; - returnInParagraphCreatesNewParagraph: boolean; +interface nsIUrlClassifierExceptionListService extends nsISupports { + registerAndRunExceptionListObserver(aFeature: string, aPrefName: string, aObserver: nsIUrlClassifierExceptionListObserver): void; + unregisterExceptionListObserver(aFeature: string, aObserver: nsIUrlClassifierExceptionListObserver): void; + clear(): void; } -// https://searchfox.org/mozilla-central/source/editor/nsIHTMLInlineTableEditor.idl +// https://searchfox.org/mozilla-central/source/netwerk/url-classifier/nsIUrlClassifierFeature.idl -interface nsIHTMLInlineTableEditor extends nsISupports { - inlineTableEditingEnabled: boolean; - readonly isInlineTableEditingActive: boolean; +} // global + +declare namespace nsIUrlClassifierFeature { + +enum listType { + blocklist = 0, + entitylist = 1, } -// https://searchfox.org/mozilla-central/source/editor/nsIHTMLObjectResizer.idl - -interface nsIHTMLObjectResizer extends nsISupports { - readonly eTopLeft: 0; - readonly eTop: 1; - readonly eTopRight: 2; - readonly eLeft: 3; - readonly eRight: 4; - readonly eBottomLeft: 5; - readonly eBottom: 6; - readonly eBottomRight: 7; - - objectResizingEnabled: boolean; - readonly isObjectResizingActive: boolean; - hideResizers(): void; +enum URIType { + blocklistURI = 0, + entitylistURI = 1, + pairwiseEntitylistURI = 2, } -// https://searchfox.org/mozilla-central/source/editor/nsITableEditor.idl +} -interface nsITableEditor extends nsISupports { - readonly eNoSearch: 0; - readonly ePreviousColumn: 1; - readonly ePreviousRow: 2; +declare global { - insertTableCell(aNumberOfColumnsToInsert: i32, aInsertAfterSelectedCell: boolean): void; - insertTableColumn(aNumberOfColumnsToInsert: i32, aInsertAfterSelectedCell: boolean): void; - insertTableRow(aNumberOfRowsToInsert: i32, aInsertAfterSelectedCell: boolean): void; - deleteTable(): void; - deleteTableCellContents(): void; - deleteTableCell(aNumberOfCellsToDelete: i32): void; - deleteTableColumn(aNumberOfColumnsToDelete: i32): void; - deleteTableRow(aNumberOfRowsToDelete: i32): void; - selectTableCell(): void; - selectTableRow(): void; - selectTableColumn(): void; - selectTable(): void; - selectAllTableCells(): void; - switchTableCellHeaderType(aSourceCell: Element): Element; - joinTableCells(aMergeNonContiguousContents: boolean): void; - splitTableCell(): void; - normalizeTable(aTable: Element): void; - getCellIndexes(aCellElement: Element, aRowIndex: OutParam, aColumnIndex: OutParam): void; - getTableSize(aTableOrElementInTable: Element, aRowCount: OutParam, aColCount: OutParam): void; - getCellAt(aTableElement: Element, aRowIndex: i32, aColumnIndex: i32): Element; - getCellDataAt(aTableElement: Element, aRowIndex: i32, aColumnIndex: i32, aCellElement: OutParam, aStartRowIndex: OutParam, aStartColumnIndex: OutParam, aRowSpan: OutParam, aColSpan: OutParam, aEffectiveRowSpan: OutParam, aEffectiveColSpan: OutParam, aIsSelected: OutParam): void; - getFirstRow(aTableElement: Element): Element; - getSelectedOrParentTableElement(aTagName: OutParam, aCount: OutParam): Element; - getSelectedCellsType(aElement: Element): u32; - getFirstSelectedCellInTable(aRowIndex: OutParam, aColIndex: OutParam): Element; - getSelectedCells(): Element[]; +interface nsIUrlClassifierFeature extends nsISupports, Enums { + readonly name: string; + readonly exceptionHostList: string; +} + +interface nsIUrlClassifierFeatureResult extends nsISupports { + readonly uri: nsIURI; + readonly feature: nsIUrlClassifierFeature; + readonly list: string; +} + +type nsIUrlClassifierFeatureCallback = Callable<{ + onClassifyComplete(aResults: nsIUrlClassifierFeatureResult[]): void; +}> + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/IUrlClassifierUITelemetry.idl + +interface IUrlClassifierUITelemetry extends nsISupports { + readonly WARNING_MALWARE_PAGE_TOP: 1; + readonly WARNING_MALWARE_PAGE_TOP_WHY_BLOCKED: 2; + readonly WARNING_MALWARE_PAGE_TOP_GET_ME_OUT_OF_HERE: 3; + readonly WARNING_MALWARE_PAGE_TOP_IGNORE_WARNING: 4; + readonly WARNING_MALWARE_PAGE_FRAME: 5; + readonly WARNING_MALWARE_PAGE_FRAME_WHY_BLOCKED: 6; + readonly WARNING_MALWARE_PAGE_FRAME_GET_ME_OUT_OF_HERE: 7; + readonly WARNING_MALWARE_PAGE_FRAME_IGNORE_WARNING: 8; + readonly WARNING_PHISHING_PAGE_TOP: 9; + readonly WARNING_PHISHING_PAGE_TOP_WHY_BLOCKED: 10; + readonly WARNING_PHISHING_PAGE_TOP_GET_ME_OUT_OF_HERE: 11; + readonly WARNING_PHISHING_PAGE_TOP_IGNORE_WARNING: 12; + readonly WARNING_PHISHING_PAGE_FRAME: 13; + readonly WARNING_PHISHING_PAGE_FRAME_WHY_BLOCKED: 14; + readonly WARNING_PHISHING_PAGE_FRAME_GET_ME_OUT_OF_HERE: 15; + readonly WARNING_PHISHING_PAGE_FRAME_IGNORE_WARNING: 16; + readonly WARNING_UNWANTED_PAGE_TOP: 17; + readonly WARNING_UNWANTED_PAGE_TOP_WHY_BLOCKED: 18; + readonly WARNING_UNWANTED_PAGE_TOP_GET_ME_OUT_OF_HERE: 19; + readonly WARNING_UNWANTED_PAGE_TOP_IGNORE_WARNING: 20; + readonly WARNING_UNWANTED_PAGE_FRAME: 21; + readonly WARNING_UNWANTED_PAGE_FRAME_WHY_BLOCKED: 22; + readonly WARNING_UNWANTED_PAGE_FRAME_GET_ME_OUT_OF_HERE: 23; + readonly WARNING_UNWANTED_PAGE_FRAME_IGNORE_WARNING: 24; + readonly WARNING_HARMFUL_PAGE_TOP: 25; + readonly WARNING_HARMFUL_PAGE_TOP_WHY_BLOCKED: 26; + readonly WARNING_HARMFUL_PAGE_TOP_GET_ME_OUT_OF_HERE: 27; + readonly WARNING_HARMFUL_PAGE_TOP_IGNORE_WARNING: 28; + readonly WARNING_HARMFUL_PAGE_FRAME: 29; + readonly WARNING_HARMFUL_PAGE_FRAME_WHY_BLOCKED: 30; + readonly WARNING_HARMFUL_PAGE_FRAME_GET_ME_OUT_OF_HERE: 31; + readonly WARNING_HARMFUL_PAGE_FRAME_IGNORE_WARNING: 32; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierDBService.idl + +type nsIUrlClassifierCallback = Callable<{ + handleEvent(value: string): void; +}> + +interface nsIUrlClassifierUpdateObserver extends nsISupports { + updateUrlRequested(url: string, table: string): void; + streamFinished(status: nsresult, delay: u32): void; + updateError(error: nsresult): void; + updateSuccess(requestedTimeout: u32): void; +} + +interface nsIUrlClassifierDBService extends nsISupports { + lookup(principal: nsIPrincipal, tables: string, c: nsIUrlClassifierCallback): void; + getTables(c: nsIUrlClassifierCallback): void; + setHashCompleter(tableName: string, completer: nsIUrlClassifierHashCompleter): void; + clearLastResults(): void; + beginUpdate(updater: nsIUrlClassifierUpdateObserver, tables: string): void; + beginStream(table: string): void; + updateStream(updateChunk: string): void; + finishStream(): void; + finishUpdate(): void; + cancelUpdate(): void; + resetDatabase(): void; + reloadDatabase(): void; + clearCache(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierHashCompleter.idl + +interface nsIFullHashMatch extends nsISupports { + readonly tableName: string; + readonly fullHash: string; + readonly cacheDuration: u32; +} + +interface nsIUrlClassifierHashCompleterCallback extends nsISupports { + completionV2(hash: string, table: string, chunkId: u32): void; + completionV4(partialHash: string, table: string, negativeCacheDuration: u32, fullHashes: nsIArray): void; + completionFinished(status: nsresult): void; +} + +interface nsIUrlClassifierHashCompleter extends nsISupports { + complete(partialHash: string, gethashUrl: string, tableName: string, callback: nsIUrlClassifierHashCompleterCallback): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierInfo.idl + +interface nsIUrlClassifierPositiveCacheEntry extends nsISupports { + readonly fullhash: string; + readonly expiry: i64; +} + +interface nsIUrlClassifierCacheEntry extends nsISupports { + readonly prefix: string; + readonly expiry: i64; + readonly matches: nsIArray; +} + +interface nsIUrlClassifierCacheInfo extends nsISupports { + readonly table: string; + readonly entries: nsIArray; +} + +type nsIUrlClassifierGetCacheCallback = Callable<{ + onGetCacheComplete(info: nsIUrlClassifierCacheInfo): void; +}> + +interface nsIUrlClassifierInfo extends nsISupports { + getCacheInfo(table: string, callback: nsIUrlClassifierGetCacheCallback): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierPrefixSet.idl + +interface nsIUrlClassifierPrefixSet extends nsISupports { + init(aName: string): void; + setPrefixes(aPrefixes: u32[], aLength: u32): void; + getPrefixes(aCount: OutParam): OutParam; + contains(aPrefix: u32): boolean; + isEmpty(): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierRemoteSettingsService.idl + +interface nsIUrlClassifierRemoteSettingsService extends nsISupports { + fetchList(aPayload: string, aListener: nsIStreamListener): void; + clear(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierStreamUpdater.idl + +interface nsIUrlClassifierStreamUpdater extends nsISupports { + downloadUpdates(aRequestTables: string, aRequestPayload: string, aIsPostRequest: boolean, aUpdateUrl: string, aSuccessCallback: nsIUrlClassifierCallback, aUpdateErrorCallback: nsIUrlClassifierCallback, aDownloadErrorCallback: nsIUrlClassifierCallback): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierUtils.idl + +interface nsIUrlClassifierParseFindFullHashCallback extends nsISupports { + onCompleteHashFound(aCompleteHash: string, aTableNames: string, aPerHashCacheDuration: u32): void; + onResponseParsed(aMinWaitDuration: u32, aNegCacheDuration: u32): void; +} + +interface nsIUrlClassifierUtils extends nsISupports { + getKeyForURI(uri: nsIURI): string; + getProvider(tableName: string): string; + getTelemetryProvider(tableName: string): string; + getProtocolVersion(provider: string): string; + convertThreatTypeToListNames(threatType: u32): string; + convertListNameToThreatType(listName: string): u32; + makeUpdateRequestV4(aListNames: string[], aStatesBase64: string[]): string; + makeFindFullHashRequestV4(aListNames: string[], aListStatesBase64: string[], aPrefixes: string[]): string; + makeThreatHitReport(aChannel: nsIChannel, aListName: string, aHashBase64: string): string; + parseFindFullHashResponseV4(aResponse: string, aCallback: nsIUrlClassifierParseFindFullHashCallback): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlListManager.idl + +interface nsIUrlListManager extends nsISupports { + getGethashUrl(tableName: string): string; + getUpdateUrl(tableName: string): string; + registerTable(tableName: string, providerName: string, updateUrl: string, gethashUrl: string): boolean; + unregisterTable(tableName: string): void; + enableUpdate(tableName: string): void; + disableAllUpdates(): void; + disableUpdate(tableName: string): void; + maybeToggleUpdateChecking(): void; + checkForUpdates(updateUrl: string): boolean; + forceUpdates(tableNames: string): boolean; + getBackOffTime(provider: string): u64; + isRegistered(): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/urlformatter/nsIURLFormatter.idl + +interface nsIURLFormatter extends nsISupports { + formatURL(aFormat: string): string; + formatURLPref(aPref: string): string; + trimSensitiveURLs(aMsg: string): string; +} + +// https://searchfox.org/mozilla-central/source/ipc/glue/test/utility_process_xpcom/nsIUtilityProcessTest.idl + +interface nsIUtilityProcessTest extends nsISupports { + startProcess(actorsToAdd?: string[]): Promise; + untilChildProcessDead(pid: u32): Promise; + noteIntentionalCrash(pid: u32): void; + stopProcess(utilityActorName?: string): void; + testTelemetryProbes(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/browser/nsIWebBrowser.idl + +interface nsIWebBrowser extends nsISupports { + containerWindow: nsIWebBrowserChrome; + readonly contentDOMWindow: mozIDOMWindowProxy; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/browser/nsIWebBrowserChrome.idl + +interface nsIWebBrowserChrome extends nsISupports { + readonly CHROME_DEFAULT: 1; + readonly CHROME_WINDOW_BORDERS: 2; + readonly CHROME_WINDOW_CLOSE: 4; + readonly CHROME_WINDOW_RESIZE: 8; + readonly CHROME_MENUBAR: 16; + readonly CHROME_TOOLBAR: 32; + readonly CHROME_LOCATIONBAR: 64; + readonly CHROME_STATUSBAR: 128; + readonly CHROME_PERSONAL_TOOLBAR: 256; + readonly CHROME_SCROLLBARS: 512; + readonly CHROME_TITLEBAR: 1024; + readonly CHROME_EXTRA: 2048; + readonly CHROME_ALL: 4094; + readonly CHROME_WINDOW_MINIMIZE: 16384; + readonly CHROME_ALERT: 32768; + readonly CHROME_PRIVATE_WINDOW: 65536; + readonly CHROME_NON_PRIVATE_WINDOW: 131072; + readonly CHROME_PRIVATE_LIFETIME: 262144; + readonly CHROME_ALWAYS_ON_TOP: 524288; + readonly CHROME_REMOTE_WINDOW: 1048576; + readonly CHROME_FISSION_WINDOW: 2097152; + readonly CHROME_SUPPRESS_ANIMATION: 16777216; + readonly CHROME_CENTER_SCREEN: 134217728; + readonly CHROME_DEPENDENT: 268435456; + readonly CHROME_MODAL: 536870912; + readonly CHROME_OPENAS_DIALOG: 1073741824; + readonly CHROME_OPENAS_CHROME: 2147483648; + readonly CHROME_MINIMAL_POPUP: 18126; + + setLinkStatus(status: string): void; + chromeFlags: u32; + showAsModal(): void; + isWindowModal(): boolean; + blur(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/browser/nsIWebBrowserPrint.idl + +interface nsIWebBrowserPrint extends nsISupports { + readonly PRINTPREVIEW_GOTO_PAGENUM: 0; + readonly PRINTPREVIEW_PREV_PAGE: 1; + readonly PRINTPREVIEW_NEXT_PAGE: 2; + readonly PRINTPREVIEW_HOME: 3; + readonly PRINTPREVIEW_END: 4; + + readonly doingPrint: boolean; + readonly doingPrintPreview: boolean; + readonly rawNumPages: i32; + readonly printPreviewNumPages: i32; + readonly printPreviewCurrentPageNumber: i32; + closeWindowAfterPrint: boolean; + printPreviewScrollToPage(aNavType: i16, aPageNum: i32): void; + exitPrintPreview(): void; +} + +// https://searchfox.org/mozilla-central/source/dom/webbrowserpersist/nsIWebBrowserPersist.idl + +interface nsIWebBrowserPersist extends nsICancelable { + readonly PERSIST_FLAGS_NONE: 0; + readonly PERSIST_FLAGS_FROM_CACHE: 1; + readonly PERSIST_FLAGS_BYPASS_CACHE: 2; + readonly PERSIST_FLAGS_IGNORE_REDIRECTED_DATA: 4; + readonly PERSIST_FLAGS_IGNORE_IFRAMES: 8; + readonly PERSIST_FLAGS_NO_CONVERSION: 16; + readonly PERSIST_FLAGS_REPLACE_EXISTING_FILES: 32; + readonly PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS: 64; + readonly PERSIST_FLAGS_FIXUP_ORIGINAL_DOM: 128; + readonly PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION: 256; + readonly PERSIST_FLAGS_DONT_FIXUP_LINKS: 512; + readonly PERSIST_FLAGS_SERIALIZE_OUTPUT: 1024; + readonly PERSIST_FLAGS_DONT_CHANGE_FILENAMES: 2048; + readonly PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS: 4096; + readonly PERSIST_FLAGS_CLEANUP_ON_FAILURE: 8192; + readonly PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION: 16384; + readonly PERSIST_FLAGS_APPEND_TO_FILE: 32768; + readonly PERSIST_STATE_READY: 1; + readonly PERSIST_STATE_SAVING: 2; + readonly PERSIST_STATE_FINISHED: 3; + readonly ENCODE_FLAGS_SELECTION_ONLY: 1; + readonly ENCODE_FLAGS_FORMATTED: 2; + readonly ENCODE_FLAGS_RAW: 4; + readonly ENCODE_FLAGS_BODY_ONLY: 8; + readonly ENCODE_FLAGS_PREFORMATTED: 16; + readonly ENCODE_FLAGS_WRAP: 32; + readonly ENCODE_FLAGS_FORMAT_FLOWED: 64; + readonly ENCODE_FLAGS_ABSOLUTE_LINKS: 128; + readonly ENCODE_FLAGS_CR_LINEBREAKS: 512; + readonly ENCODE_FLAGS_LF_LINEBREAKS: 1024; + readonly ENCODE_FLAGS_NOSCRIPT_CONTENT: 2048; + readonly ENCODE_FLAGS_NOFRAMES_CONTENT: 4096; + readonly ENCODE_FLAGS_ENCODE_BASIC_ENTITIES: 8192; + + persistFlags: u32; + readonly currentState: u32; + readonly result: nsresult; + progressListener: nsIWebProgressListener; + saveURI(aURI: nsIURI, aTriggeringPrincipal: nsIPrincipal, aCacheKey: u32, aReferrerInfo: nsIReferrerInfo, aCookieJarSettings: nsICookieJarSettings, aPostData: nsIInputStream, aExtraHeaders: string, aFile: nsISupports, aContentPolicyType: nsContentPolicyType, aIsPrivate: boolean): void; + saveChannel(aChannel: nsIChannel, aFile: nsISupports): void; + saveDocument(aDocument: nsISupports, aFile: nsISupports, aDataPath: nsISupports, aOutputContentType: string, aEncodingFlags: u32, aWrapColumn: u32): void; + cancelSave(): void; +} + +// https://searchfox.org/mozilla-central/source/dom/webbrowserpersist/nsIWebBrowserPersistDocument.idl + +interface nsIWebBrowserPersistURIMap extends nsISupports { + readonly numMappedURIs: u32; + getURIMapping(aIndex: u32, aMapFrom: OutParam, aMapTo: OutParam): void; + readonly targetBaseURI: string; +} + +interface nsIWebBrowserPersistDocument extends nsISupports { + readonly isClosed: boolean; + readonly isPrivate: boolean; + readonly documentURI: string; + readonly baseURI: string; + readonly contentType: string; + readonly characterSet: string; + readonly title: string; + readonly referrerInfo: nsIReferrerInfo; + readonly cookieJarSettings: nsICookieJarSettings; + readonly contentDisposition: string; + readonly postData: nsIInputStream; + readonly principal: nsIPrincipal; + readonly cacheKey: u32; + persistFlags: u32; + readResources(aVisitor: nsIWebBrowserPersistResourceVisitor): void; + writeContent(aStream: nsIOutputStream, aURIMap: nsIWebBrowserPersistURIMap, aRequestedContentType: string, aEncoderFlags: u32, aWrapColumn: u32, aCompletion: nsIWebBrowserPersistWriteCompletion): void; +} + +interface nsIWebBrowserPersistResourceVisitor extends nsISupports { + visitResource(aDocument: nsIWebBrowserPersistDocument, aURI: string, aContentPolicyType: nsContentPolicyType): void; + visitDocument(aDocument: nsIWebBrowserPersistDocument, aSubDocument: nsIWebBrowserPersistDocument): void; + visitBrowsingContext(aDocument: nsIWebBrowserPersistDocument, aContext: BrowsingContext): void; + endVisit(aDocument: nsIWebBrowserPersistDocument, aStatus: nsresult): void; +} + +type nsIWebBrowserPersistWriteCompletion = Callable<{ + onFinish(aDocument: nsIWebBrowserPersistDocument, aStream: nsIOutputStream, aContentType: string, aStatus: nsresult): void; +}> + +interface nsIWebBrowserPersistDocumentReceiver extends nsISupports { + onDocumentReady(aDocument: nsIWebBrowserPersistDocument): void; + onError(aFailure: nsresult): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/extIWebNavigation.idl + +interface extIWebNavigation extends nsISupports { + onDocumentChange(bc: BrowsingContext, transitionData: any, location: nsIURI): void; + onHistoryChange(bc: BrowsingContext, transitionData: any, location: nsIURI, isHistoryStateUpdated: boolean, isReferenceFragmentUpdated: boolean): void; + onStateChange(bc: BrowsingContext, requestURI: nsIURI, status: nsresult, stateFlags: u32): void; + onCreatedNavigationTarget(bc: BrowsingContext, sourceBC: BrowsingContext, url: string): void; + onDOMContentLoaded(bc: BrowsingContext, documentURI: nsIURI): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/mozIExtensionAPIRequestHandling.idl + +interface mozIExtensionServiceWorkerInfo extends nsISupports { + readonly principal: nsIPrincipal; + readonly scriptURL: string; + readonly clientInfoId: string; + readonly descriptorId: u64; +} + +} // global + +declare namespace mozIExtensionListenerCallOptions { + +enum APIObjectType { + NONE = 0, + RUNTIME_PORT = 1, +} + +enum CallbackType { + CALLBACK_NONE = 0, + CALLBACK_SEND_RESPONSE = 1, +} + +} + +declare global { + +interface mozIExtensionListenerCallOptions extends nsISupports, Enums { + readonly apiObjectType: mozIExtensionListenerCallOptions.APIObjectType; + readonly apiObjectDescriptor: any; + readonly apiObjectPrepended: boolean; + callbackType: mozIExtensionListenerCallOptions.CallbackType; +} + +interface mozIExtensionEventListener extends nsISupports { + callListener(args: any[], listenerCallOptions?: mozIExtensionListenerCallOptions): Promise; +} + +} // global + +declare namespace mozIExtensionAPIRequest { + +enum RequestType { + CALL_FUNCTION = 0, + CALL_FUNCTION_NO_RETURN = 1, + CALL_FUNCTION_ASYNC = 2, + ADD_LISTENER = 3, + REMOVE_LISTENER = 4, + GET_PROPERTY = 5, +} + +} + +declare global { + +interface mozIExtensionAPIRequest extends nsISupports, Enums { + toString(): string; + readonly requestType: string; + readonly apiNamespace: string; + readonly apiName: string; + readonly apiObjectType: string; + readonly apiObjectId: string; + readonly args: any; + normalizedArgs: any; + readonly callerSavedFrame: any; + readonly serviceWorkerInfo: mozIExtensionServiceWorkerInfo; + readonly eventListener: mozIExtensionEventListener; +} + +} // global + +declare namespace mozIExtensionAPIRequestResult { + +enum ResultType { + RETURN_VALUE = 0, + EXTENSION_ERROR = 1, +} + +} + +declare global { + +interface mozIExtensionAPIRequestResult extends nsISupports, Enums { + readonly type: mozIExtensionAPIRequestResult.ResultType; + readonly value: any; +} + +interface mozIExtensionAPIRequestHandler extends nsISupports { + handleAPIRequest(extension: nsISupports, apiRequest: mozIExtensionAPIRequest): OutParam; + initExtensionWorker(extension: nsISupports, serviceWorkerInfo: mozIExtensionServiceWorkerInfo): void; + onExtensionWorkerLoaded(extension: nsISupports, serviceWorkerDescriptorId: u64): void; + onExtensionWorkerDestroyed(extension: nsISupports, serviceWorkerDescriptorId: u64): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/mozIExtensionProcessScript.idl + +interface mozIExtensionProcessScript extends nsISupports { + preloadContentScript(contentScript: nsISupports): void; + loadContentScript(contentScript: WebExtensionContentScript, window: mozIDOMWindow): Promise; + initExtensionDocument(extension: nsISupports, doc: Document, privileged: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/nsINativeMessagingPortal.idl + +interface nsINativeMessagingPortal extends nsISupports { + shouldUse(): boolean; + readonly available: Promise; + createSession(aApplication: string): Promise; + closeSession(aHandle: string): Promise; + getManifest(aHandle: string, aName: string, aExtension: string): Promise; + start(aHandle: string, aName: string, aExtension: string): Promise; +} + +// https://searchfox.org/mozilla-central/source/dom/media/webvtt/nsIWebVTTListener.idl + +interface nsIWebVTTListener extends nsISupports { + onCue(cue: any): void; + onRegion(region: any): void; + onParsingError(errorCode: i32): void; +} + +// https://searchfox.org/mozilla-central/source/dom/media/webvtt/nsIWebVTTParserWrapper.idl + +interface nsIWebVTTParserWrapper extends nsISupports { + loadParser(window: mozIDOMWindow): void; + parse(data: string): void; + flush(): void; + watch(callback: nsIWebVTTListener): void; + cancel(): void; + convertCueToDOMTree(window: mozIDOMWindow, cue: nsISupports): DocumentFragment; + processCues(window: mozIDOMWindow, cues: nsIVariant, overlay: nsISupports, controls: nsISupports): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIAppShell.idl + +// https://searchfox.org/mozilla-central/source/widget/nsIBaseWindow.idl + +interface nsIBaseWindow extends nsISupports { + readonly eRepaint: 1; + readonly eDelayResize: 2; + + destroy(): void; + setPosition(x: i32, y: i32): void; + setPositionDesktopPix(x: i32, y: i32): void; + getPosition(x: OutParam, y: OutParam): void; + setSize(cx: i32, cy: i32, fRepaint: boolean): void; + getSize(cx: OutParam, cy: OutParam): void; + setPositionAndSize(x: i32, y: i32, cx: i32, cy: i32, flags: u32): void; + getPositionAndSize(x: OutParam, y: OutParam, cx: OutParam, cy: OutParam): void; + repaint(force: boolean): void; + readonly nativeHandle: string; + visibility: boolean; + enabled: boolean; + readonly devicePixelsPerDesktopPixel: double; + title: string; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIBidiKeyboard.idl + +interface nsIBidiKeyboard extends nsISupports { + reset(): void; + isLangRTL(): boolean; + readonly haveBidiKeyboards: boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIClipboard.idl + +interface nsIAsyncSetClipboardData extends nsISupports { + setData(aTransferable: nsITransferable, aOwner?: nsIClipboardOwner): void; + abort(aReason: nsresult): void; +} + +type nsIAsyncClipboardRequestCallback = Callable<{ + onComplete(aResult: nsresult): void; +}> + +interface nsIClipboardDataSnapshot extends nsISupports { + readonly valid: boolean; + readonly flavorList: string[]; + getData(aTransferable: nsITransferable, aCallback: nsIAsyncClipboardRequestCallback): void; + getDataSync(aTransferable: nsITransferable): void; +} + +interface nsIClipboardGetDataSnapshotCallback extends nsISupports { + onSuccess(aClipboardDataSnapshot: nsIClipboardDataSnapshot): void; + onError(aResult: nsresult): void; +} + +} // global + +declare namespace nsIClipboard { + +enum ClipboardType { + kSelectionClipboard = 0, + kGlobalClipboard = 1, + kFindClipboard = 2, + kSelectionCache = 3, +} + +} + +declare global { + +interface nsIClipboard extends nsISupports, Enums { + setData(aTransferable: nsITransferable, anOwner: nsIClipboardOwner, aWhichClipboard: nsIClipboard.ClipboardType, aSettingWindowContext?: WindowContext): void; + asyncSetData(aWhichClipboard: nsIClipboard.ClipboardType, aSettingWindowContext?: WindowContext, aCallback?: nsIAsyncClipboardRequestCallback): nsIAsyncSetClipboardData; + getData(aTransferable: nsITransferable, aWhichClipboard: nsIClipboard.ClipboardType, aRequestingWindowContext?: WindowContext): void; + getDataSnapshot(aFlavorList: string[], aWhichClipboard: nsIClipboard.ClipboardType, aRequestingWindowContext: WindowContext, aRequestingPrincipal: nsIPrincipal, aCallback: nsIClipboardGetDataSnapshotCallback): void; + getDataSnapshotSync(aFlavorList: string[], aWhichClipboard: nsIClipboard.ClipboardType, aRequestingWindowContext?: WindowContext): nsIClipboardDataSnapshot; + emptyClipboard(aWhichClipboard: nsIClipboard.ClipboardType): void; + hasDataMatchingFlavors(aFlavorList: string[], aWhichClipboard: nsIClipboard.ClipboardType): boolean; + isClipboardTypeSupported(aWhichClipboard: nsIClipboard.ClipboardType): boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIClipboardHelper.idl + +} // global + +declare namespace nsIClipboardHelper { + +enum SensitiveData { + NotSensitive = 0, + Sensitive = 1, +} + +} + +declare global { + +interface nsIClipboardHelper extends nsISupports, Enums { + copyStringToClipboard(aString: string, aClipboardID: nsIClipboard.ClipboardType, aSettingWindowContext?: WindowContext, aSensitive?: nsIClipboardHelper.SensitiveData): void; + copyString(aString: string, aSettingWindowContext?: WindowContext, aSensitive?: nsIClipboardHelper.SensitiveData): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIClipboardOwner.idl + +interface nsIClipboardOwner extends nsISupports { + LosingOwnership(aTransferable: nsITransferable): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIColorPicker.idl + +interface nsIColorPickerShownCallback extends nsISupports { + update(color: string): void; + done(color: string): void; +} + +interface nsIColorPicker extends nsISupports { + init(browsingContext: BrowsingContext, title: string, initialColor: string, defaultColors: string[]): void; + open(aColorPickerShownCallback: nsIColorPickerShownCallback): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIDisplayInfo.idl + +interface nsIDisplayInfo extends nsISupports { + readonly id: i32; + readonly connected: boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIDragService.idl + +interface nsIDragService extends nsISupports { + readonly DRAGDROP_ACTION_NONE: 0; + readonly DRAGDROP_ACTION_COPY: 1; + readonly DRAGDROP_ACTION_MOVE: 2; + readonly DRAGDROP_ACTION_LINK: 4; + readonly DRAGDROP_ACTION_UNINITIALIZED: 64; + + getCurrentSession(aWidgetProvider?: nsISupports): nsIDragSession; + startDragSessionForTests(aWidgetProvider: nsISupports, aAllowedEffect: u32): void; + suppress(): void; + unsuppress(): void; + getMockDragController(): nsIMockDragServiceController; + readonly isMockService: boolean; + neverAllowSessionIsSynthesizedForTests: boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIDragSession.idl + +interface nsIDragSession extends nsISupports { + canDrop: boolean; + onlyChromeDrop: boolean; + dragAction: u32; + readonly numDropItems: u32; + sourceWindowContext: WindowContext; + sourceTopWindowContext: WindowContext; + readonly sourceNode: Node; + triggeringPrincipal: nsIPrincipal; + csp: nsIContentSecurityPolicy; + dataTransfer: DataTransfer; + getData(aTransferable: nsITransferable, aItemIndex: u32): void; + isDataFlavorSupported(aDataFlavor: string): boolean; + userCancelled(): void; + dragEventDispatchedToChildProcess(): void; + updateDragEffect(): void; + updateDragImage(aImage: Node, aImageX: i32, aImageY: i32): void; + setDragEndPoint(aScreenX: i32, aScreenY: i32): void; + setDragEndPointForTests(aScreenX: i32, aScreenY: i32): void; + endDragSession(aDoneDrag: boolean, aKeyModifiers?: u32): void; + sendStoreDropTargetAndDelayEndDragSession(aEvent: DragEvent): void; + sendDispatchToDropTargetAndResumeEndDragSession(aShouldDrop: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIFilePicker.idl + +} // global + +declare namespace nsIFilePicker { + +enum Mode { + modeOpen = 0, + modeSave = 1, + modeGetFolder = 2, + modeOpenMultiple = 3, +} + +enum ResultCode { + returnOK = 0, + returnCancel = 1, + returnReplace = 2, +} + +enum CaptureTarget { + captureNone = 0, + captureDefault = 1, + captureUser = 2, + captureEnv = 3, +} + +} + +declare global { + +interface nsIFilePicker extends nsISupports, Enums { + readonly filterAll: 1; + readonly filterHTML: 2; + readonly filterText: 4; + readonly filterImages: 8; + readonly filterXML: 16; + readonly filterXUL: 32; + readonly filterApps: 64; + readonly filterAllowURLs: 128; + readonly filterAudio: 256; + readonly filterVideo: 512; + readonly filterPDF: 1024; + + init(browsingContext: BrowsingContext, title: string, mode: nsIFilePicker.Mode): void; + isModeSupported(mode: nsIFilePicker.Mode): Promise; + appendFilters(filterMask: i32): void; + appendFilter(title: string, filter: string): void; + appendRawFilter(filter: string): void; + defaultString: string; + defaultExtension: string; + filterIndex: i32; + displayDirectory: nsIFile; + displaySpecialDirectory: string; + readonly file: nsIFile; + readonly fileURL: nsIURI; + readonly files: nsISimpleEnumerator; + readonly domFileOrDirectory: nsISupports; + readonly domFileOrDirectoryEnumerator: nsISimpleEnumerator; + addToRecentDocs: boolean; + open(aFilePickerShownCallback: nsIFilePickerShownCallback): void; + readonly mode: nsIFilePicker.Mode; + okButtonLabel: string; + capture: nsIFilePicker.CaptureTarget; +} + +type nsIFilePickerShownCallback = Callable<{ + done(aResult: nsIFilePicker.ResultCode): void; +}> + +// https://searchfox.org/mozilla-central/source/widget/nsIFormatConverter.idl + +interface nsIFormatConverter extends nsISupports { + getInputDataFlavors(): string[]; + getOutputDataFlavors(): string[]; + canConvert(aFromDataFlavor: string, aToDataFlavor: string): boolean; + convert(aFromDataFlavor: string, aFromData: nsISupports, aToDataFlavor: string, aToData: OutParam): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIGfxInfo.idl + +} // global + +declare namespace nsIGfxInfo { + +enum FontVisibilityDeviceDetermination { + Unassigned = 0, + Unknown_Platform = 1, + Windows_Platform = 2, + MacOS_Unknown = 3, + Android_Unknown_Release_Version = 4, + Android_Unknown_Peloton = 5, + Android_Unknown_vbox = 6, + Android_Unknown_mitv = 7, + Android_Chromebook = 8, + Android_Amazon = 9, + Android_sub_9 = 10, + Android_9_11 = 11, + Android_12_plus = 12, + Linux_Unknown = 13, + Linux_Ubuntu_any = 14, + Linux_Ubuntu_20 = 15, + Linux_Ubuntu_22 = 16, + Linux_Fedora_any = 17, + Linux_Fedora_38 = 18, + Linux_Fedora_39 = 19, + MacOS_13_plus = 20, + MacOS_sub_13 = 21, +} + +} + +declare global { + +interface nsIGfxInfo extends nsISupports, Enums { + readonly D2DEnabled: boolean; + readonly DWriteEnabled: boolean; + readonly EmbeddedInFirefoxReality: boolean; + readonly AzureCanvasBackend: string; + readonly AzureContentBackend: string; + readonly usingGPUProcess: boolean; + readonly usingRemoteCanvas: boolean; + readonly usingAcceleratedCanvas: boolean; + readonly hasBattery: boolean; + readonly DWriteVersion: string; + readonly cleartypeParameters: string; + readonly textScaleFactor: float; + readonly windowProtocol: string; + readonly testType: string; + readonly ContentBackend: string; + readonly isHeadless: boolean; + readonly TargetFrameRate: u32; + readonly CodecSupportInfo: string; + readonly fontVisibilityDetermination: nsIGfxInfo.FontVisibilityDeviceDetermination; + readonly fontVisibilityDeterminationStr: string; + readonly adapterDescription: string; + readonly adapterDescription2: string; + readonly adapterDriver: string; + readonly adapterDriver2: string; + readonly adapterVendorID: string; + readonly adapterVendorID2: string; + readonly adapterDeviceID: string; + readonly adapterDeviceID2: string; + readonly adapterSubsysID: string; + readonly adapterSubsysID2: string; + readonly adapterRAM: u32; + readonly adapterRAM2: u32; + readonly adapterDriverVendor: string; + readonly adapterDriverVendor2: string; + readonly adapterDriverVersion: string; + readonly adapterDriverVersion2: string; + readonly adapterDriverDate: string; + readonly adapterDriverDate2: string; + readonly isGPU2Active: boolean; + readonly drmRenderDevice: string; + getMonitors(): any; + getFailures(indices: OutParam): string[]; + getFeatureStatus(aFeature: i32, aFailureId?: OutParam): i32; + getFeatureStatusStr(aFeature: string, aFailureId?: OutParam): string; + getFeatureSuggestedDriverVersion(aFeature: i32): string; + getFeatureSuggestedDriverVersionStr(aFeature: string): string; + getInfo(): any; + getFeatureLog(): any; + getFeatures(): any; + getActiveCrashGuards(): any; + controlGPUProcessForXPCShell(aEnable: boolean): boolean; + killGPUProcessForTests(): void; + crashGPUProcessForTests(): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIGfxInfoDebug.idl + +interface nsIGfxInfoDebug extends nsISupports { + spoofVendorID(aVendorID: string): void; + spoofDeviceID(aDeviceID: string): void; + spoofDriverVersion(aDriverVersion: string): void; + spoofOSVersion(aVersion: u32): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIMockDragServiceController.idl + +} // global + +declare namespace nsIMockDragServiceController { + +enum EventType { + eDragEnter = 0, + eDragOver = 1, + eDragExit = 2, + eDrop = 3, + eMouseDown = 4, + eMouseMove = 5, + eMouseUp = 6, +} + +} + +declare global { + +interface nsIMockDragServiceController extends nsISupports, Enums { + readonly mockDragService: nsIDragService; + sendEvent(aBC: BrowsingContext, aEventType: nsIMockDragServiceController.EventType, aScreenX: i32, aScreenY: i32, aKeyModifiers?: u32): void; + cancelDrag(aKeyModifiers?: u32): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPaper.idl + +interface nsIPaper extends nsISupports { + readonly id: string; + readonly name: string; + readonly width: double; + readonly height: double; + readonly unwriteableMargin: Promise; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPaperMargin.idl + +interface nsIPaperMargin extends nsISupports { + readonly top: double; + readonly right: double; + readonly bottom: double; + readonly left: double; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPrintDialogService.idl + +interface nsIPrintDialogService extends nsISupports { + init(): void; + showPrintDialog(aParent: mozIDOMWindowProxy, aHaveSelection: boolean, aPrintSettings: nsIPrintSettings): void; + showPageSetupDialog(aParent: mozIDOMWindowProxy, aPrintSettings: nsIPrintSettings): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPrintSettings.idl + +} // global + +declare namespace nsIPrintSettings { + +enum OutputDestinationType { + kOutputDestinationPrinter = 0, + kOutputDestinationFile = 1, + kOutputDestinationStream = 2, +} + +} + +declare global { + +interface nsIPrintSettings extends nsISupports, Enums { + readonly kInitSaveHeaderLeft: 2; + readonly kInitSaveHeaderCenter: 4; + readonly kInitSaveHeaderRight: 8; + readonly kInitSaveFooterLeft: 16; + readonly kInitSaveFooterCenter: 32; + readonly kInitSaveFooterRight: 64; + readonly kInitSaveBGColors: 128; + readonly kInitSaveBGImages: 256; + readonly kInitSavePaperSize: 512; + readonly kInitSaveDuplex: 2048; + readonly kInitSaveUnwriteableMargins: 16384; + readonly kInitSaveEdges: 32768; + readonly kInitSaveReversed: 65536; + readonly kInitSaveInColor: 131072; + readonly kInitSaveOrientation: 262144; + readonly kInitSavePrinterName: 1048576; + readonly kInitSavePrintToFile: 2097152; + readonly kInitSaveToFileName: 4194304; + readonly kInitSavePageDelay: 8388608; + readonly kInitSaveMargins: 16777216; + readonly kInitSaveShrinkToFit: 134217728; + readonly kInitSaveScaling: 268435456; + readonly kInitSaveAll: 4294967295; + readonly kGlobalSettings: 134447614; + readonly kPrintDialogPersistSettings: 428313598; + readonly kJustLeft: 0; + readonly kJustCenter: 1; + readonly kJustRight: 2; + readonly kPaperSizeInches: 0; + readonly kPaperSizeMillimeters: 1; + readonly kPortraitOrientation: 0; + readonly kLandscapeOrientation: 1; + readonly kOutputFormatNative: 0; + readonly kOutputFormatPDF: 2; + readonly kDuplexNone: 0; + readonly kDuplexFlipOnLongEdge: 1; + readonly kDuplexFlipOnShortEdge: 2; + + GetEffectivePageSize(aWidth: OutParam, aHeight: OutParam): void; + clone(): nsIPrintSettings; + assign(aPS: nsIPrintSettings): void; + equivalentTo(aPrintSettings: nsIPrintSettings): boolean; + edgeTop: double; + edgeLeft: double; + edgeBottom: double; + edgeRight: double; + marginTop: double; + marginLeft: double; + marginBottom: double; + marginRight: double; + unwriteableMarginTop: double; + unwriteableMarginLeft: double; + unwriteableMarginBottom: double; + unwriteableMarginRight: double; + scaling: double; + printBGColors: boolean; + printBGImages: boolean; + honorPageRuleMargins: boolean; + usePageRuleSizeAsPaperSize: boolean; + ignoreUnwriteableMargins: boolean; + showMarginGuides: boolean; + printSelectionOnly: boolean; + title: string; + docURL: string; + headerStrLeft: string; + headerStrCenter: string; + headerStrRight: string; + footerStrLeft: string; + footerStrCenter: string; + footerStrRight: string; + printSilent: boolean; + shrinkToFit: boolean; + paperId: string; + paperWidth: double; + paperHeight: double; + paperSizeUnit: i16; + printReversed: boolean; + printInColor: boolean; + orientation: i32; + numCopies: i32; + numPagesPerSheet: i32; + outputDestination: nsIPrintSettings.OutputDestinationType; + outputFormat: i16; + printerName: string; + toFileName: string; + outputStream: nsIOutputStream; + printPageDelay: i32; + resolution: i32; + duplex: i32; + isInitializedFromPrinter: boolean; + isInitializedFromPrefs: boolean; + pageRanges: i32[]; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPrintSettingsService.idl + +interface nsIPrintSettingsService extends nsISupports { + createNewPrintSettings(): nsIPrintSettings; + readonly lastUsedPrinterName: string; + initPrintSettingsFromPrinter(aPrinterName: string, aPrintSettings: nsIPrintSettings): void; + initPrintSettingsFromPrefs(aPrintSettings: nsIPrintSettings, aUsePrinterNamePrefix: boolean, aFlags: u32): void; + maybeSavePrintSettingsToPrefs(aPrintSettings: nsIPrintSettings, aFlags: u32): void; + maybeSaveLastUsedPrinterNameToPrefs(aPrinterName: string): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPrinter.idl + +interface nsIPrinterInfo extends nsISupports { + readonly paperList: nsIPaper[]; + readonly defaultSettings: nsIPrintSettings; +} + +interface nsIPrinter extends nsISupports { + readonly name: string; + readonly systemName: string; + readonly printerInfo: Promise; + copyFromWithValidation(aSettingsToCopyFrom: nsIPrintSettings): Promise; + readonly supportsDuplex: Promise; + readonly supportsColor: Promise; + readonly supportsMonochrome: Promise; + readonly supportsCollation: Promise; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIPrinterList.idl + +interface nsIPrinterList extends nsISupports { + initPrintSettingsFromPrinter(aPrinterName: string, aPrintSettings: nsIPrintSettings): void; + readonly systemDefaultPrinterName: string; + getPrinterByName(aPrinterName: string): Promise; + getPrinterBySystemName(aPrinterName: string): Promise; + getNamedOrDefaultPrinter(aPrinterName: string): Promise; + readonly printers: Promise; + readonly fallbackPaperList: Promise; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIScreen.idl + +interface nsIScreen extends nsISupports { + GetRect(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; + GetAvailRect(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; + GetRectDisplayPix(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; + GetAvailRectDisplayPix(left: OutParam, top: OutParam, width: OutParam, height: OutParam): void; + readonly pixelDepth: i32; + readonly colorDepth: i32; + readonly contentsScaleFactor: double; + readonly defaultCSSScaleFactor: double; + readonly dpi: float; + readonly refreshRate: i32; + readonly isPseudoDisplay: boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIScreenManager.idl + +interface nsIScreenManager extends nsISupports { + screenForRect(left: i32, top: i32, width: i32, height: i32): nsIScreen; + readonly primaryScreen: nsIScreen; + readonly totalScreenPixels: i64; +} + +// https://searchfox.org/mozilla-central/source/widget/nsISharePicker.idl + +interface nsISharePicker extends nsISupports { + init(openerWindow: mozIDOMWindowProxy): void; + readonly openerWindow: mozIDOMWindowProxy; + share(title: string, text: string, url: nsIURI): Promise; +} + +// https://searchfox.org/mozilla-central/source/widget/nsISound.idl + +interface nsISound extends nsISupports { + readonly EVENT_NEW_MAIL_RECEIVED: 0; + readonly EVENT_ALERT_DIALOG_OPEN: 1; + readonly EVENT_CONFIRM_DIALOG_OPEN: 2; + readonly EVENT_PROMPT_DIALOG_OPEN: 3; + readonly EVENT_SELECT_DIALOG_OPEN: 4; + readonly EVENT_MENU_EXECUTE: 5; + readonly EVENT_MENU_POPUP: 6; + readonly EVENT_EDITOR_MAX_LEN: 7; + + play(aURL: nsIURL): void; + beep(): void; + init(): void; + playEventSound(aEventId: u32): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsISystemStatusBar.idl + +interface nsISystemStatusBar extends nsISupports { + addItem(aMenuElement: Element): void; + removeItem(aMenuElement: Element): void; +} + +// https://searchfox.org/mozilla-central/source/widget/nsITransferable.idl + +interface nsIFlavorDataProvider extends nsISupports { + getFlavorData(aTransferable: nsITransferable, aFlavor: string, aData: OutParam): void; +} + +interface nsITransferable extends nsISupports { + init(aContext: nsILoadContext): void; + flavorsTransferableCanExport(): string[]; + getTransferData(aFlavor: string, aData: OutParam): void; + getAnyTransferData(aFlavor: OutParam, aData: OutParam): void; + flavorsTransferableCanImport(): string[]; + setTransferData(aFlavor: string, aData: nsISupports): void; + clearAllData(): void; + addDataFlavor(aDataFlavor: string): void; + removeDataFlavor(aDataFlavor: string): void; + converter: nsIFormatConverter; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIUserIdleService.idl + +interface nsIUserIdleService extends nsISupports { + readonly idleTime: u32; + addIdleObserver(observer: nsIObserver, time: u32): void; + removeIdleObserver(observer: nsIObserver, time: u32): void; + disabled: boolean; +} + +// https://searchfox.org/mozilla-central/source/widget/nsIUserIdleServiceInternal.idl + +interface nsIUserIdleServiceInternal extends nsIUserIdleService { + resetIdleTimeOut(idleDeltaInMS: u32): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowcreator/nsIWindowCreator.idl + +interface nsIWindowCreator extends nsISupports { + createChromeWindow(parent: nsIWebBrowserChrome, chromeFlags: u32, aOpenWindowInfo: nsIOpenWindowInfo, cancel: OutParam): nsIWebBrowserChrome; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowcreator/nsIWindowProvider.idl + +interface nsIWindowProvider extends nsISupports { +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIDialogParamBlock.idl + +interface nsIDialogParamBlock extends nsISupports { + GetInt(inIndex: i32): i32; + SetInt(inIndex: i32, inInt: i32): void; + SetNumberStrings(inNumStrings: i32): void; + GetString(inIndex: i32): string; + SetString(inIndex: i32, inString: string): void; + objects: nsIMutableArray; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIOpenWindowInfo.idl + +interface nsIOpenWindowInfo extends nsISupports { + readonly parent: BrowsingContext; + readonly isRemote: boolean; + readonly forceNoOpener: boolean; + readonly isForPrinting: boolean; + readonly isForWindowDotPrint: boolean; + readonly isTopLevelCreatedByWebContent: boolean; + readonly hasValidUserGestureActivation: boolean; + readonly textDirectiveUserActivation: boolean; + readonly originAttributes: any; + cancel(): void; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptCollection.idl + +interface nsIPromptCollection extends nsISupports { + asyncBeforeUnloadCheck(aBrowsingContext: BrowsingContext): Promise; + confirmRepost(aBrowsingContext: BrowsingContext): boolean; + confirmFolderUpload(aBrowsingContext: BrowsingContext, aDirectoryName: string): boolean; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptFactory.idl + +interface nsIPromptFactory extends nsISupports { + getPrompt(aParent: mozIDOMWindowProxy, iid: T): nsQIResult; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptService.idl + +interface nsIPromptService extends nsISupports { + readonly BUTTON_POS_0: 1; + readonly BUTTON_POS_1: 256; + readonly BUTTON_POS_2: 65536; + readonly BUTTON_TITLE_OK: 1; + readonly BUTTON_TITLE_CANCEL: 2; + readonly BUTTON_TITLE_YES: 3; + readonly BUTTON_TITLE_NO: 4; + readonly BUTTON_TITLE_SAVE: 5; + readonly BUTTON_TITLE_DONT_SAVE: 6; + readonly BUTTON_TITLE_REVERT: 7; + readonly BUTTON_TITLE_IS_STRING: 127; + readonly BUTTON_POS_0_DEFAULT: 0; + readonly BUTTON_POS_1_DEFAULT: 16777216; + readonly BUTTON_POS_2_DEFAULT: 33554432; + readonly BUTTON_DELAY_ENABLE: 67108864; + readonly SHOW_SPINNER: 134217728; + readonly BUTTON_NONE_ENABLE_BIT: 268435456; + readonly BUTTON_NONE: 268435583; + readonly BUTTON_POS_1_IS_SECONDARY: 536870912; + readonly STD_OK_CANCEL_BUTTONS: 513; + readonly STD_YES_NO_BUTTONS: 1027; + readonly MODAL_TYPE_CONTENT: 1; + readonly MODAL_TYPE_TAB: 2; + readonly MODAL_TYPE_WINDOW: 3; + readonly MODAL_TYPE_INTERNAL_WINDOW: 4; + + alert(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string): void; + alertBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): void; + asyncAlert(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): Promise; + alertCheck(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): void; + alertCheckBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): void; + asyncAlertCheck(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: boolean): Promise; + confirm(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string): boolean; + confirmBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): boolean; + asyncConfirm(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string): Promise; + confirmCheck(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): boolean; + confirmCheckBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: InOutParam): boolean; + asyncConfirmCheck(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aCheckMsg: string, aCheckState: boolean): Promise; + confirmEx(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aButtonFlags: u32, aButton0Title: string, aButton1Title: string, aButton2Title: string, aCheckMsg: string, aCheckState: InOutParam): i32; + confirmExBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aButtonFlags: u32, aButton0Title: string, aButton1Title: string, aButton2Title: string, aCheckMsg: string, aCheckState: InOutParam): i32; + asyncConfirmEx(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aButtonFlags: u32, aButton0Title: string, aButton1Title: string, aButton2Title: string, aCheckMsg: string, aCheckState: boolean, aExtraArgs?: any): Promise; + prompt(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aValue: InOutParam, aCheckMsg: string, aCheckState: InOutParam): boolean; + promptBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aValue: InOutParam, aCheckMsg: string, aCheckState: InOutParam): boolean; + asyncPrompt(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aValue: string, aCheckMsg: string, aCheckState: boolean): Promise; + promptUsernameAndPassword(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aUsername: InOutParam, aPassword: InOutParam): boolean; + promptUsernameAndPasswordBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aUsername: InOutParam, aPassword: InOutParam): boolean; + asyncPromptUsernameAndPassword(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aUsername: string, aPassword: string): Promise; + promptPassword(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aPassword: InOutParam): boolean; + promptPasswordBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aPassword: InOutParam): boolean; + asyncPromptPassword(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aPassword: string): Promise; + select(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string, aSelectList: string[], aOutSelection: OutParam): boolean; + selectBC(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aSelectList: string[], aOutSelection: OutParam): boolean; + asyncSelect(aBrowsingContext: BrowsingContext, modalType: u32, aDialogTitle: string, aText: string, aSelectList: string[]): Promise; + promptAuth(aParent: mozIDOMWindowProxy, aChannel: nsIChannel, level: u32, authInfo: nsIAuthInformation): boolean; + promptAuthBC(aBrowsingContext: BrowsingContext, modalType: u32, aChannel: nsIChannel, level: u32, authInfo: nsIAuthInformation): boolean; + asyncPromptAuth(aBrowsingContext: BrowsingContext, modalType: u32, aChannel: nsIChannel, level: u32, authInfo: nsIAuthInformation): Promise; + confirmUserPaste(aWindow: WindowGlobalParent): Promise; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIWindowWatcher.idl + +interface nsIWindowWatcher extends nsISupports { + openWindow(aParent: mozIDOMWindowProxy, aUrl: string, aName: string, aFeatures: string, aArguments: nsISupports): mozIDOMWindowProxy; + registerNotification(aObserver: nsIObserver): void; + unregisterNotification(aObserver: nsIObserver): void; + getWindowEnumerator(): nsISimpleEnumerator; + getNewPrompter(aParent: mozIDOMWindowProxy): nsIPrompt; + getNewAuthPrompter(aParent: mozIDOMWindowProxy): nsIAuthPrompt; + setWindowCreator(creator: nsIWindowCreator): void; + hasWindowCreator(): boolean; + getChromeForWindow(aWindow: mozIDOMWindowProxy): nsIWebBrowserChrome; + getWindowByName(aTargetName: string): mozIDOMWindowProxy; + readonly activeWindow: mozIDOMWindowProxy; +} + +// https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsPIWindowWatcher.idl + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIAvailableMemoryWatcherBase.idl + +interface nsITabUnloader extends nsISupports { + unloadTabAsync(): void; +} + +interface nsIAvailableMemoryWatcherBase extends nsISupports { + registerTabUnloader(aTabUnloader: nsITabUnloader): void; + onUnloadAttemptCompleted(aResult: nsresult): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIConsoleListener.idl + +type nsIConsoleListener = Callable<{ + observe(aMessage: nsIConsoleMessage): void; +}> + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIConsoleMessage.idl + +interface nsIConsoleMessage extends nsISupports { + readonly debug: 0; + readonly info: 1; + readonly warn: 2; + readonly error: 3; + + readonly logLevel: u32; + readonly timeStamp: i64; + readonly microSecondTimeStamp: i64; + readonly message: string; + isForwardedFromContentProcess: boolean; + toString(): string; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIConsoleService.idl + +} // global + +declare namespace nsIConsoleService { + +enum OutputMode { + SuppressLog = 0, + OutputToLog = 1, +} + +} + +declare global { + +interface nsIConsoleService extends nsISupports, Enums { + logMessage(message: nsIConsoleMessage): void; + callFunctionAndLogException(targetGlobal: any, func: any): any; + logMessageWithMode(message: nsIConsoleMessage, mode: nsIConsoleService.OutputMode): void; + logStringMessage(message: string): void; + getMessageArray(): nsIConsoleMessage[]; + registerListener(listener: nsIConsoleListener): void; + unregisterListener(listener: nsIConsoleListener): void; + reset(): void; + resetWindow(windowInnerId: u64): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsICycleCollectorListener.idl + +interface nsICycleCollectorHandler extends nsISupports { + noteRefCountedObject(aAddress: string, aRefCount: u32, aObjectDescription: string): void; + noteGCedObject(aAddress: string, aMarked: boolean, aObjectDescription: string, aCompartmentAddress: string): void; + noteEdge(aFromAddress: string, aToAddress: string, aEdgeName: string): void; + describeRoot(aAddress: string, aKnownEdges: u32): void; + describeGarbage(aAddress: string): void; +} + +interface nsICycleCollectorLogSink extends nsISupports { + closeGCLog(): void; + closeCCLog(): void; + filenameIdentifier: string; + processIdentifier: i32; + readonly gcLog: nsIFile; + readonly ccLog: nsIFile; +} + +interface nsICycleCollectorListener extends nsISupports { + allTraces(): nsICycleCollectorListener; + readonly wantAllTraces: boolean; + disableLog: boolean; + logSink: nsICycleCollectorLogSink; + wantAfterProcessing: boolean; + processNext(aHandler: nsICycleCollectorHandler): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIDebug2.idl + +interface nsIDebug2 extends nsISupports { + readonly isDebugBuild: boolean; + readonly assertionCount: i32; + readonly isDebuggerAttached: boolean; + assertion(aStr: string, aExpr: string, aFile: string, aLine: i32): void; + warning(aStr: string, aFile: string, aLine: i32): void; + break(aFile: string, aLine: i32): void; + abort(aFile: string, aLine: i32): void; + rustPanic(aMessage: string): void; + rustLog(aTarget: string, aMessage: string): void; + crashWithOOM(): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIException.idl + +interface nsIStackFrame extends nsISupports { + readonly filename: string; + readonly name: string; + readonly sourceId: i32; + readonly lineNumber: i32; + readonly columnNumber: i32; + readonly asyncCause: string; + readonly asyncCaller: nsIStackFrame; + readonly caller: nsIStackFrame; + readonly formattedStack: string; + readonly nativeSavedFrame: any; + toString(): string; +} + +interface nsIException extends nsISupports { +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIInterfaceRequestor.idl + +interface nsIInterfaceRequestor extends nsISupports { + getInterface(uuid: T): nsQIResult; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIMemoryInfoDumper.idl + +type nsIFinishDumpingCallback = Callable<{ + callback(data: nsISupports): void; +}> + +interface nsIDumpGCAndCCLogsCallback extends nsISupports { + onDump(aGCLog: nsIFile, aCCLog: nsIFile, aIsParent: boolean): void; + onFinish(): void; +} + +interface nsIMemoryInfoDumper extends nsISupports { + dumpMemoryReportsToNamedFile(aFilename: string, aFinishDumping: nsIFinishDumpingCallback, aFinishDumpingData: nsISupports, aAnonymize: boolean, aMinimizeMemoryUsage: boolean): void; + dumpMemoryInfoToTempDir(aIdentifier: string, aAnonymize: boolean, aMinimizeMemoryUsage: boolean): void; + dumpGCAndCCLogsToFile(aIdentifier: string, aDumpAllTraces: boolean, aDumpChildProcesses: boolean, aCallback: nsIDumpGCAndCCLogsCallback): void; + dumpGCAndCCLogsToSink(aDumpAllTraces: boolean, aSink: nsICycleCollectorLogSink): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIMemoryReporter.idl + +type nsIHandleReportCallback = Callable<{ + callback(process: string, path: string, kind: i32, units: i32, amount: i64, description: string, data: nsISupports): void; +}> + +interface nsIMemoryReporter extends nsISupports { + readonly KIND_NONHEAP: 0; + readonly KIND_HEAP: 1; + readonly KIND_OTHER: 2; + readonly UNITS_BYTES: 0; + readonly UNITS_COUNT: 1; + readonly UNITS_COUNT_CUMULATIVE: 2; + readonly UNITS_PERCENTAGE: 3; + + collectReports(callback: nsIHandleReportCallback, data: nsISupports, anonymize: boolean): void; +} + +type nsIFinishReportingCallback = Callable<{ + callback(data: nsISupports): void; +}> + +type nsIHeapAllocatedCallback = Callable<{ + callback(bytesAllocated: i64): void; +}> + +interface nsIMemoryReporterManager extends nsISupports { + init(): void; + registerStrongReporter(reporter: nsIMemoryReporter): void; + registerStrongAsyncReporter(reporter: nsIMemoryReporter): void; + registerWeakReporter(reporter: nsIMemoryReporter): void; + registerWeakAsyncReporter(reporter: nsIMemoryReporter): void; + unregisterStrongReporter(reporter: nsIMemoryReporter): void; + unregisterWeakReporter(reporter: nsIMemoryReporter): void; + blockRegistrationAndHideExistingReporters(): void; + unblockRegistrationAndRestoreOriginalReporters(): void; + registerStrongReporterEvenIfBlocked(aReporter: nsIMemoryReporter): void; + getReports(handleReport: nsIHandleReportCallback, handleReportData: nsISupports, finishReporting: nsIFinishReportingCallback, finishReportingData: nsISupports, anonymize: boolean): void; + getReportsExtended(handleReport: nsIHandleReportCallback, handleReportData: nsISupports, finishReporting: nsIFinishReportingCallback, finishReportingData: nsISupports, anonymize: boolean, minimizeMemoryUsage: boolean, DMDDumpIdent: string): void; + readonly vsize: i64; + readonly vsizeMaxContiguous: i64; + readonly resident: i64; + readonly residentFast: i64; + readonly residentPeak: i64; + readonly residentUnique: i64; + readonly heapAllocated: i64; + readonly heapOverheadFraction: i64; + readonly JSMainRuntimeGCHeap: i64; + readonly JSMainRuntimeTemporaryPeak: i64; + readonly JSMainRuntimeCompartmentsSystem: i64; + readonly JSMainRuntimeCompartmentsUser: i64; + readonly JSMainRuntimeRealmsSystem: i64; + readonly JSMainRuntimeRealmsUser: i64; + readonly imagesContentUsedUncompressed: i64; + readonly storageSQLite: i64; + readonly lowMemoryEventsPhysical: i64; + readonly ghostWindows: i64; + readonly pageFaultsHard: i64; + readonly hasMozMallocUsableSize: boolean; + readonly isDMDEnabled: boolean; + readonly isDMDRunning: boolean; + minimizeMemoryUsage(callback: nsIRunnable): void; + sizeOfTab(window: mozIDOMWindowProxy, jsObjectsSize: OutParam, jsStringsSize: OutParam, jsOtherSize: OutParam, domSize: OutParam, styleSize: OutParam, otherSize: OutParam, totalSize: OutParam, jsMilliseconds: OutParam, nonJSMilliseconds: OutParam): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsISecurityConsoleMessage.idl + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsISupports.idl + +interface nsISupports { + QueryInterface?(aIID: T): nsQIResult; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIUUIDGenerator.idl + +interface nsIUUIDGenerator extends nsISupports { + generateUUID(): nsID; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIVersionComparator.idl + +interface nsIVersionComparator extends nsISupports { + compare(A: string, B: string): i32; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsIWeakReference.idl + +interface nsIWeakReference extends nsISupports { + QueryReferent(uuid: T): nsQIResult; +} + +interface nsISupportsWeakReference extends nsISupports { + GetWeakReference(): nsIWeakReference; +} + +// https://searchfox.org/mozilla-central/source/xpcom/base/nsrootidl.idl + +// https://searchfox.org/mozilla-central/source/xpcom/components/nsICategoryManager.idl + +interface nsICategoryEntry extends nsISupportsCString { + readonly entry: string; + readonly value: string; +} + +interface nsICategoryManager extends nsISupports { + getCategoryEntry(aCategory: string, aEntry: string): string; + addCategoryEntry(aCategory: string, aEntry: string, aValue: string, aPersist: boolean, aReplace: boolean): string; + deleteCategoryEntry(aCategory: string, aEntry: string, aPersist: boolean): void; + deleteCategory(aCategory: string): void; + enumerateCategory(aCategory: string): nsISimpleEnumerator; + enumerateCategories(): nsISimpleEnumerator; +} + +// https://searchfox.org/mozilla-central/source/xpcom/components/nsIClassInfo.idl + +interface nsIClassInfo extends nsISupports { + readonly SINGLETON: 1; + readonly THREADSAFE: 2; + readonly SINGLETON_CLASSINFO: 32; + readonly RESERVED: 2147483648; + + readonly interfaces: nsID[]; + readonly contractID: string; + readonly classDescription: string; + readonly classID: nsID; + readonly flags: u32; +} + +// https://searchfox.org/mozilla-central/source/xpcom/components/nsIComponentManager.idl + +interface nsIComponentManager extends nsISupports { + getClassObject(aClass: nsID, aIID: T): nsQIResult; + getClassObjectByContractID(aContractID: string, aIID: T): nsQIResult; + addBootstrappedManifestLocation(aLocation: nsIFile): void; + removeBootstrappedManifestLocation(aLocation: nsIFile): void; + getManifestLocations(): nsIArray; + getComponentESModules(): nsIUTF8StringEnumerator; +} + +// https://searchfox.org/mozilla-central/source/xpcom/components/nsIComponentRegistrar.idl + +interface nsIComponentRegistrar extends nsISupports { + autoRegister(aSpec: nsIFile): void; + registerFactory(aClass: nsID, aClassName: string, aContractID: string, aFactory: nsIFactory): void; + unregisterFactory(aClass: nsID, aFactory: nsIFactory): void; + isCIDRegistered(aClass: nsID): boolean; + isContractIDRegistered(aContractID: string): boolean; + getContractIDs(): string[]; + contractIDToCID(aContractID: string): nsID; +} + +// https://searchfox.org/mozilla-central/source/xpcom/components/nsIFactory.idl + +interface nsIFactory extends nsISupports { + createInstance(iid: T): nsQIResult; +} + +// https://searchfox.org/mozilla-central/source/xpcom/components/nsIServiceManager.idl + +interface nsIServiceManager extends nsISupports { + getService(aClass: nsID, aIID: T): nsQIResult; + getServiceByContractID(aContractID: string, aIID: T): nsQIResult; + isServiceInstantiated(aClass: nsID, aIID: nsID): boolean; + isServiceInstantiatedByContractID(aContractID: string, aIID: nsID): boolean; } // https://searchfox.org/mozilla-central/source/xpcom/ds/nsIArray.idl @@ -13480,448 +13948,1119 @@ interface nsIWritablePropertyBag2 extends nsIPropertyBag2 { setPropertyAsInterface(prop: string, value: nsISupports): void; } -// https://searchfox.org/mozilla-central/source/netwerk/wifi/nsIWifiAccessPoint.idl +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIAsyncInputStream.idl -interface nsIWifiAccessPoint extends nsISupports { - readonly mac: string; - readonly ssid: string; - readonly rawSSID: string; - readonly signal: i32; +interface nsIAsyncInputStream extends nsIInputStream { + readonly WAIT_CLOSURE_ONLY: 1; + + closeWithStatus(aStatus: nsresult): void; + asyncWait(aCallback: nsIInputStreamCallback, aFlags: u32, aRequestedCount: u32, aEventTarget: nsIEventTarget): void; } -// https://searchfox.org/mozilla-central/source/netwerk/wifi/nsIWifiListener.idl +type nsIInputStreamCallback = Callable<{ + onInputStreamReady(aStream: nsIAsyncInputStream): void; +}> -interface nsIWifiListener extends nsISupports { - onChange(accessPoints: nsIWifiAccessPoint[]): void; - onError(error: nsresult): void; +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIAsyncOutputStream.idl + +interface nsIAsyncOutputStream extends nsIOutputStream { + readonly WAIT_CLOSURE_ONLY: 1; + + closeWithStatus(reason: nsresult): void; + asyncWait(aCallback: nsIOutputStreamCallback, aFlags: u32, aRequestedCount: u32, aEventTarget: nsIEventTarget): void; } -// https://searchfox.org/mozilla-central/source/netwerk/wifi/nsIWifiMonitor.idl +type nsIOutputStreamCallback = Callable<{ + onOutputStreamReady(aStream: nsIAsyncOutputStream): void; +}> -interface nsIWifiMonitor extends nsISupports { - startWatching(aListener: nsIWifiListener, aForcePolling: boolean): void; - stopWatching(aListener: nsIWifiListener): void; +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIBinaryInputStream.idl + +interface nsIBinaryInputStream extends nsIInputStream { + setInputStream(aInputStream: nsIInputStream): void; + readBoolean(): boolean; + read8(): u8; + read16(): u16; + read32(): u32; + read64(): u64; + readFloat(): float; + readDouble(): double; + readCString(): string; + readString(): string; + readBytes(aLength: u32): OutParam; + readByteArray(aLength: u32): u8[]; + readArrayBuffer(aLength: u64, aArrayBuffer: any): u64; } -// https://searchfox.org/mozilla-central/source/caps/nsIAddonPolicyService.idl +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIBinaryOutputStream.idl -interface nsIAddonPolicyService extends nsISupports { - readonly defaultCSP: string; - readonly defaultCSPV3: string; - getBaseCSP(aAddonId: string): string; - getExtensionPageCSP(aAddonId: string): string; - getGeneratedBackgroundPageUrl(aAddonId: string): string; - addonHasPermission(aAddonId: string, aPerm: string): boolean; - addonMayLoadURI(aAddonId: string, aURI: nsIURI, aExplicit?: boolean): boolean; - getExtensionName(aAddonId: string): string; - sourceMayLoadExtensionURI(aSourceURI: nsIURI, aExtensionURI: nsIURI, aFromPrivateWindow?: boolean): boolean; - extensionURIToAddonId(aURI: nsIURI): string; +interface nsIBinaryOutputStream extends nsIOutputStream { + setOutputStream(aOutputStream: nsIOutputStream): void; + writeBoolean(aBoolean: boolean): void; + write8(aByte: u8): void; + write16(a16: u16): void; + write32(a32: u32): void; + write64(a64: u64): void; + writeFloat(aFloat: float): void; + writeDouble(aDouble: double): void; + writeStringZ(aString: string): void; + writeWStringZ(aString: string): void; + writeUtf8Z(aString: string): void; + writeBytes(aString: string, aLength?: u32): void; + writeByteArray(aBytes: u8[]): void; } -interface nsIAddonContentPolicy extends nsISupports { - readonly CSP_ALLOW_ANY: 65535; - readonly CSP_ALLOW_LOCALHOST: 1; - readonly CSP_ALLOW_EVAL: 2; - readonly CSP_ALLOW_REMOTE: 4; - readonly CSP_ALLOW_WASM: 8; +// https://searchfox.org/mozilla-central/source/xpcom/io/nsICloneableInputStream.idl - validateAddonCSP(aPolicyString: string, aPermittedPolicy: u32): string; +interface nsICloneableInputStream extends nsISupports { + readonly cloneable: boolean; + clone(): nsIInputStream; } -// https://searchfox.org/mozilla-central/source/caps/nsIDomainPolicy.idl - -interface nsIDomainPolicy extends nsISupports { - readonly blocklist: nsIDomainSet; - readonly superBlocklist: nsIDomainSet; - readonly allowlist: nsIDomainSet; - readonly superAllowlist: nsIDomainSet; - deactivate(): void; +interface nsICloneableInputStreamWithRange extends nsICloneableInputStream { + cloneWithRange(start: u64, length: u64): nsIInputStream; } -interface nsIDomainSet extends nsISupports { - add(aDomain: nsIURI): void; - remove(aDomain: nsIURI): void; - clear(): void; - contains(aDomain: nsIURI): boolean; - containsSuperDomain(aDomain: nsIURI): boolean; +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIConverterInputStream.idl + +interface nsIConverterInputStream extends nsIUnicharInputStream { + readonly DEFAULT_REPLACEMENT_CHARACTER: 65533; + readonly ERRORS_ARE_FATAL: 0; + + init(aStream: nsIInputStream, aCharset: string, aBufferSize: i32, aReplacementChar: u16): void; } -// https://searchfox.org/mozilla-central/source/caps/nsIPrincipal.idl +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIConverterOutputStream.idl -interface nsIPrincipal extends nsISupports { - equals(other: nsIPrincipal): boolean; - equalsForPermission(other: nsIPrincipal, aExactHost: boolean): boolean; - equalsConsideringDomain(other: nsIPrincipal): boolean; - equalsURI(aOtherURI: nsIURI): boolean; - readonly URI: nsIURI; - subsumes(other: nsIPrincipal): boolean; - subsumesConsideringDomain(other: nsIPrincipal): boolean; - subsumesConsideringDomainIgnoringFPD(other: nsIPrincipal): boolean; - checkMayLoad(uri: nsIURI, allowIfInheritsPrincipal: boolean): void; - checkMayLoadWithReporting(uri: nsIURI, allowIfInheritsPrincipal: boolean, innerWindowID: u64): void; - isThirdPartyURI(uri: nsIURI): boolean; - isThirdPartyPrincipal(principal: nsIPrincipal): boolean; - isThirdPartyChannel(channel: nsIChannel): boolean; - readonly originAttributes: any; - readonly origin: string; - readonly hostPort: string; - readonly asciiHost: string; - readonly host: string; - readonly prePath: string; - readonly filePath: string; - readonly asciiSpec: string; - readonly spec: string; - readonly exposablePrePath: string; - readonly exposableSpec: string; - readonly scheme: string; - schemeIs(scheme: string): boolean; - isURIInPrefList(pref: string): boolean; - isURIInList(list: string): boolean; - isContentAccessibleAboutURI(): boolean; - isSameOrigin(otherURI: nsIURI): boolean; - hasFirstpartyStorageAccess(aWindow: mozIDOMWindow, rejectedReason: OutParam): boolean; - readonly localStorageQuotaKey: string; - readonly isOriginPotentiallyTrustworthy: boolean; - readonly isLoopbackHost: boolean; - getAboutModuleFlags(): u32; - readonly storageOriginKey: string; - readonly originNoSuffix: string; - readonly originSuffix: string; - readonly siteOrigin: string; - readonly siteOriginNoSuffix: string; - readonly baseDomain: string; - readonly addonId: string; - readonly addonPolicy: WebExtensionPolicy; - readonly contentScriptAddonPolicy: WebExtensionPolicy; - readonly userContextId: u32; - readonly privateBrowsingId: u32; - readonly isInPrivateBrowsing: boolean; - readonly isNullPrincipal: boolean; - readonly isContentPrincipal: boolean; - readonly isExpandedPrincipal: boolean; - readonly isSystemPrincipal: boolean; - readonly isAddonOrExpandedAddonPrincipal: boolean; - readonly isOnion: boolean; - readonly isScriptAllowedByPolicy: boolean; - isL10nAllowed(aDocumentURI: nsIURI): boolean; - readonly nextSubDomainPrincipal: nsIPrincipal; - readonly isIpAddress: boolean; - readonly isLocalIpAddress: boolean; - readonly precursorPrincipal: nsIPrincipal; +interface nsIConverterOutputStream extends nsIUnicharOutputStream { + init(aOutStream: nsIOutputStream, aCharset: string): void; } -// https://searchfox.org/mozilla-central/source/caps/nsIScriptSecurityManager.idl +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIDirectoryEnumerator.idl -interface nsIScriptSecurityManager extends nsISupports { - readonly STANDARD: 0; - readonly LOAD_IS_AUTOMATIC_DOCUMENT_REPLACEMENT: 1; - readonly ALLOW_CHROME: 2; - readonly DISALLOW_INHERIT_PRINCIPAL: 4; - readonly DISALLOW_SCRIPT_OR_DATA: 4; - readonly DISALLOW_SCRIPT: 8; - readonly DONT_REPORT_ERRORS: 16; - readonly DEFAULT_USER_CONTEXT_ID: 0; - readonly DEFAULT_PRIVATE_BROWSING_ID: 0; - - checkLoadURIWithPrincipalXPCOM(aPrincipal: nsIPrincipal, uri: nsIURI, flags: u32, innerWindowID?: u64): void; - checkLoadURIWithPrincipal(aPrincipal: nsIPrincipal, uri: nsIURI, flags?: u32, innerWindowID?: u64): void; - checkLoadURIStrWithPrincipalXPCOM(aPrincipal: nsIPrincipal, uri: string, flags: u32): void; - checkLoadURIStrWithPrincipal(aPrincipal: nsIPrincipal, uri: string, flags?: u32): void; - inFileURIAllowlist(aUri: nsIURI): boolean; - getSystemPrincipal(): nsIPrincipal; - getLoadContextContentPrincipal(uri: nsIURI, loadContext: nsILoadContext): nsIPrincipal; - getDocShellContentPrincipal(uri: nsIURI, docShell: nsIDocShell): nsIPrincipal; - principalWithOA(principal: nsIPrincipal, originAttributes: any): nsIPrincipal; - createContentPrincipal(uri: nsIURI, originAttributes: any): nsIPrincipal; - createContentPrincipalFromOrigin(origin: string): nsIPrincipal; - principalToJSON(principal: nsIPrincipal): string; - JSONToPrincipal(json: string): nsIPrincipal; - createNullPrincipal(originAttributes: any): nsIPrincipal; - checkSameOriginURI(aSourceURI: nsIURI, aTargetURI: nsIURI, reportError: boolean, fromPrivateWindow: boolean): void; - getChannelResultPrincipal(aChannel: nsIChannel): nsIPrincipal; - getChannelResultStoragePrincipal(aChannel: nsIChannel): nsIPrincipal; - getChannelResultPrincipals(aChannel: nsIChannel, aPrincipal: OutParam, aPartitionedPrincipal: OutParam): void; - getChannelURIPrincipal(aChannel: nsIChannel): nsIPrincipal; - activateDomainPolicy(): nsIDomainPolicy; - readonly domainPolicyActive: boolean; - policyAllowsScript(aDomain: nsIURI): boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/extIWebNavigation.idl - -interface extIWebNavigation extends nsISupports { - onDocumentChange(bc: BrowsingContext, transitionData: any, location: nsIURI): void; - onHistoryChange(bc: BrowsingContext, transitionData: any, location: nsIURI, isHistoryStateUpdated: boolean, isReferenceFragmentUpdated: boolean): void; - onStateChange(bc: BrowsingContext, requestURI: nsIURI, status: nsresult, stateFlags: u32): void; - onCreatedNavigationTarget(bc: BrowsingContext, sourceBC: BrowsingContext, url: string): void; - onDOMContentLoaded(bc: BrowsingContext, documentURI: nsIURI): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/mozIExtensionAPIRequestHandling.idl - -interface mozIExtensionServiceWorkerInfo extends nsISupports { - readonly principal: nsIPrincipal; - readonly scriptURL: string; - readonly clientInfoId: string; - readonly descriptorId: u64; -} - -} // global - -declare namespace mozIExtensionListenerCallOptions { - -enum APIObjectType { - NONE = 0, - RUNTIME_PORT = 1, -} - -enum CallbackType { - CALLBACK_NONE = 0, - CALLBACK_SEND_RESPONSE = 1, -} - -} - -declare global { - -interface mozIExtensionListenerCallOptions extends nsISupports, Enums { - readonly apiObjectType: mozIExtensionListenerCallOptions.APIObjectType; - readonly apiObjectDescriptor: any; - readonly apiObjectPrepended: boolean; - callbackType: mozIExtensionListenerCallOptions.CallbackType; -} - -interface mozIExtensionEventListener extends nsISupports { - callListener(args: any[], listenerCallOptions?: mozIExtensionListenerCallOptions): Promise; -} - -} // global - -declare namespace mozIExtensionAPIRequest { - -enum RequestType { - CALL_FUNCTION = 0, - CALL_FUNCTION_NO_RETURN = 1, - CALL_FUNCTION_ASYNC = 2, - ADD_LISTENER = 3, - REMOVE_LISTENER = 4, - GET_PROPERTY = 5, -} - -} - -declare global { - -interface mozIExtensionAPIRequest extends nsISupports, Enums { - toString(): string; - readonly requestType: string; - readonly apiNamespace: string; - readonly apiName: string; - readonly apiObjectType: string; - readonly apiObjectId: string; - readonly args: any; - normalizedArgs: any; - readonly callerSavedFrame: any; - readonly serviceWorkerInfo: mozIExtensionServiceWorkerInfo; - readonly eventListener: mozIExtensionEventListener; -} - -} // global - -declare namespace mozIExtensionAPIRequestResult { - -enum ResultType { - RETURN_VALUE = 0, - EXTENSION_ERROR = 1, -} - -} - -declare global { - -interface mozIExtensionAPIRequestResult extends nsISupports, Enums { - readonly type: mozIExtensionAPIRequestResult.ResultType; - readonly value: any; -} - -interface mozIExtensionAPIRequestHandler extends nsISupports { - handleAPIRequest(extension: nsISupports, apiRequest: mozIExtensionAPIRequest): OutParam; - initExtensionWorker(extension: nsISupports, serviceWorkerInfo: mozIExtensionServiceWorkerInfo): void; - onExtensionWorkerLoaded(extension: nsISupports, serviceWorkerDescriptorId: u64): void; - onExtensionWorkerDestroyed(extension: nsISupports, serviceWorkerDescriptorId: u64): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/mozIExtensionProcessScript.idl - -interface mozIExtensionProcessScript extends nsISupports { - preloadContentScript(contentScript: nsISupports): void; - loadContentScript(contentScript: WebExtensionContentScript, window: mozIDOMWindow): Promise; - initExtensionDocument(extension: nsISupports, doc: Document, privileged: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/extensions/nsINativeMessagingPortal.idl - -interface nsINativeMessagingPortal extends nsISupports { - shouldUse(): boolean; - readonly available: Promise; - createSession(aApplication: string): Promise; - closeSession(aHandle: string): Promise; - getManifest(aHandle: string, aName: string, aExtension: string): Promise; - start(aHandle: string, aName: string, aExtension: string): Promise; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/urlformatter/nsIURLFormatter.idl - -interface nsIURLFormatter extends nsISupports { - formatURL(aFormat: string): string; - formatURLPref(aPref: string): string; - trimSensitiveURLs(aMsg: string): string; -} - -// https://searchfox.org/mozilla-central/source/dom/localstorage/nsILocalStorageManager.idl - -interface nsILocalStorageManager extends nsISupports { - readonly nextGenLocalStorageEnabled: boolean; - preload(aPrincipal: nsIPrincipal): Promise; - isPreloaded(aPrincipal: nsIPrincipal): Promise; - getState(aPrincipal: nsIPrincipal): Promise; -} - -// https://searchfox.org/mozilla-central/source/services/interfaces/mozIAppServicesLogger.idl - -interface mozIAppServicesLogger extends nsISupports { - register(target: string, logger: mozIServicesLogSink): void; -} - -// https://searchfox.org/mozilla-central/source/services/interfaces/mozIBridgedSyncEngine.idl - -interface mozIBridgedSyncEngineCallback extends nsISupports { - handleSuccess(result: nsIVariant): void; - handleError(code: nsresult, message: string): void; -} - -interface mozIBridgedSyncEngineApplyCallback extends nsISupports { - handleSuccess(outgoingEnvelopesAsJSON: string[]): void; - handleError(code: nsresult, message: string): void; -} - -interface mozIBridgedSyncEngine extends nsISupports { - readonly storageVersion: i32; - readonly allowSkippedRecord: boolean; - logger: mozIServicesLogSink; - getLastSync(callback: mozIBridgedSyncEngineCallback): void; - setLastSync(lastSyncMillis: i64, callback: mozIBridgedSyncEngineCallback): void; - getSyncId(callback: mozIBridgedSyncEngineCallback): void; - resetSyncId(callback: mozIBridgedSyncEngineCallback): void; - ensureCurrentSyncId(newSyncId: string, callback: mozIBridgedSyncEngineCallback): void; - syncStarted(callback: mozIBridgedSyncEngineCallback): void; - storeIncoming(incomingEnvelopesAsJSON: string[], callback: mozIBridgedSyncEngineCallback): void; - apply(callback: mozIBridgedSyncEngineApplyCallback): void; - setUploaded(newTimestampMillis: i64, uploadedIds: string[], callback: mozIBridgedSyncEngineCallback): void; - syncFinished(callback: mozIBridgedSyncEngineCallback): void; - reset(callback: mozIBridgedSyncEngineCallback): void; - wipe(callback: mozIBridgedSyncEngineCallback): void; -} - -// https://searchfox.org/mozilla-central/source/services/interfaces/mozIInterruptible.idl - -interface mozIInterruptible extends nsISupports { - interrupt(): void; -} - -// https://searchfox.org/mozilla-central/source/services/interfaces/mozIServicesLogSink.idl - -interface mozIServicesLogSink extends nsISupports { - readonly LEVEL_OFF: 0; - readonly LEVEL_ERROR: 1; - readonly LEVEL_WARN: 2; - readonly LEVEL_INFO: 3; - readonly LEVEL_DEBUG: 4; - readonly LEVEL_TRACE: 5; - - maxLevel: i16; - error(message: string): void; - warn(message: string): void; - debug(message: string): void; - trace(message: string): void; - info(message: string): void; -} - -// https://searchfox.org/mozilla-central/source/modules/libjar/nsIJARChannel.idl - -interface nsIJARChannel extends nsIChannel { - jarFile: nsIFile; - readonly zipEntry: nsIZipEntry; - ensureCached(): boolean; -} - -// https://searchfox.org/mozilla-central/source/modules/libjar/nsIJARURI.idl - -interface nsIJARURI extends nsIURL { - readonly JARFile: nsIURI; - readonly JAREntry: string; -} - -// https://searchfox.org/mozilla-central/source/modules/libjar/nsIZipReader.idl - -interface nsIZipEntry extends nsISupports { - readonly compression: u16; - readonly size: u32; - readonly realSize: u32; - readonly CRC32: u32; - readonly isDirectory: boolean; - readonly lastModifiedTime: PRTime; - readonly isSynthetic: boolean; - readonly permissions: u32; -} - -interface nsIZipReader extends nsISupports { - open(zipFile: nsIFile): void; - openInner(zipReader: nsIZipReader, zipEntry: string): void; - readonly file: nsIFile; +interface nsIDirectoryEnumerator extends nsISimpleEnumerator { + readonly nextFile: nsIFile; close(): void; - test(aEntryName: string): void; - extract(zipEntry: string, outFile: nsIFile): void; - getEntry(zipEntry: string): nsIZipEntry; - hasEntry(zipEntry: string): boolean; - findEntries(aPattern: string): nsIUTF8StringEnumerator; - getInputStream(zipEntry: string): nsIInputStream; } -interface nsIZipReaderCache extends nsISupports { - init(cacheSize: u32): void; - getZip(zipFile: nsIFile): nsIZipReader; - getZipIfCached(zipFile: nsIFile): nsIZipReader; - isCached(zipFile: nsIFile): boolean; - getInnerZip(zipFile: nsIFile, zipEntry: string): nsIZipReader; +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIDirectoryService.idl + +interface nsIDirectoryServiceProvider extends nsISupports { + getFile(prop: string, persistent: OutParam): nsIFile; } -// https://searchfox.org/mozilla-central/source/toolkit/components/processtools/nsIProcessToolsService.idl - -interface nsIProcessToolsService extends nsISupports { - kill(pid: u64): void; - crash(pid: u64): void; - readonly pid: u64; +interface nsIDirectoryServiceProvider2 extends nsIDirectoryServiceProvider { + getFiles(prop: string): nsISimpleEnumerator; } -// https://searchfox.org/mozilla-central/source/dom/interfaces/notification/nsINotificationStorage.idl - -interface nsINotificationStorageCallback extends nsISupports { - handle(id: string, title: string, dir: string, lang: string, body: string, tag: string, icon: string, data: string, serviceWorkerRegistrationScope: string): void; - done(): void; +interface nsIDirectoryService extends nsISupports { + init(): void; + registerProvider(prov: nsIDirectoryServiceProvider): void; + unregisterProvider(prov: nsIDirectoryServiceProvider): void; } -interface nsINotificationStorage extends nsISupports { - put(origin: string, id: string, title: string, dir: string, lang: string, body: string, tag: string, icon: string, alertName: string, data: string, serviceWorkerRegistrationScope: string): void; - get(origin: string, tag: string, aCallback: nsINotificationStorageCallback): void; - delete(origin: string, id: string): void; +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIFile.idl + +interface nsIFile extends nsISupports { + readonly NORMAL_FILE_TYPE: 0; + readonly DIRECTORY_TYPE: 1; + readonly OS_READAHEAD: 1073741824; + readonly DELETE_ON_CLOSE: 2147483648; + + append(node: string): void; + normalize(): void; + create(type: u32, permissions: u32, skipAncestors?: boolean): void; + leafName: string; + readonly displayName: string; + hostPath(): Promise; + copyTo(newParentDir: nsIFile, newName: string): void; + copyToFollowingLinks(newParentDir: nsIFile, newName: string): void; + moveTo(newParentDir: nsIFile, newName: string): void; + moveToFollowingLinks(newParentDir: nsIFile, newName: string): void; + renameTo(newParentDir: nsIFile, newName: string): void; + remove(recursive: boolean, removeCount?: InOutParam): void; + permissions: u32; + permissionsOfLink: u32; + lastAccessedTime: PRTime; + lastAccessedTimeOfLink: PRTime; + lastModifiedTime: PRTime; + lastModifiedTimeOfLink: PRTime; + readonly creationTime: PRTime; + readonly creationTimeOfLink: PRTime; + fileSize: i64; + readonly fileSizeOfLink: i64; + readonly target: string; + readonly path: string; + exists(): boolean; + isWritable(): boolean; + isReadable(): boolean; + isExecutable(): boolean; + isHidden(): boolean; + isDirectory(): boolean; + isFile(): boolean; + isSymlink(): boolean; + isSpecial(): boolean; + createUnique(type: u32, permissions: u32): void; + clone(): nsIFile; + equals(inFile: nsIFile): boolean; + contains(inFile: nsIFile): boolean; + readonly parent: nsIFile; + readonly directoryEntries: nsIDirectoryEnumerator; + initWithPath(filePath: string): void; + initWithFile(aFile: nsIFile): void; + readonly diskSpaceAvailable: i64; + readonly diskCapacity: i64; + appendRelativePath(relativeFilePath: string): void; + persistentDescriptor: string; + reveal(): void; + launch(): void; + getRelativeDescriptor(fromFile: nsIFile): string; + setRelativeDescriptor(fromFile: nsIFile, relativeDesc: string): void; + getRelativePath(fromFile: nsIFile): string; + setRelativePath(fromFile: nsIFile, relativeDesc: string): void; } -// https://searchfox.org/mozilla-central/source/toolkit/components/cascade_bloom_filter/nsICascadeFilter.idl +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIIOUtil.idl -interface nsICascadeFilter extends nsISupports { - setFilterData(data: u8[]): void; - has(key: string): boolean; +interface nsIIOUtil extends nsISupports { + inputStreamIsBuffered(aStream: nsIInputStream): boolean; + outputStreamIsBuffered(aStream: nsIOutputStream): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStream.idl + +interface nsIInputStream extends nsISupports { + close(): void; + available(): u64; + streamStatus(): void; + isNonBlocking(): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStreamLength.idl + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStreamPriority.idl + +interface nsIInputStreamPriority extends nsISupports { + priority: u32; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIInputStreamTee.idl + +interface nsIInputStreamTee extends nsIInputStream { + source: nsIInputStream; + sink: nsIOutputStream; + eventTarget: nsIEventTarget; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsILineInputStream.idl + +interface nsILineInputStream extends nsISupports { + readLine(aLine: OutParam): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsILocalFileWin.idl + +interface nsILocalFileWin extends nsIFile { + initWithCommandLine(aCommandLine: string): void; + getVersionInfoField(aField: string): string; + readOnly: boolean; + useDOSDevicePathSyntax: boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIMultiplexInputStream.idl + +interface nsIMultiplexInputStream extends nsISupports { + readonly count: u32; + appendStream(stream: nsIInputStream): void; + getStream(index: u32): nsIInputStream; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIObjectInputStream.idl + +interface nsIObjectInputStream extends nsIBinaryInputStream { + readObject(aIsStrongRef: boolean): nsISupports; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIObjectOutputStream.idl + +interface nsIObjectOutputStream extends nsIBinaryOutputStream { + writeObject(aObject: nsISupports, aIsStrongRef: boolean): void; + writeSingleRefObject(aObject: nsISupports): void; + writeCompoundObject(aObject: nsISupports, aIID: nsID, aIsStrongRef: boolean): void; + writeID(aID: nsID): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIOutputStream.idl + +interface nsIOutputStream extends nsISupports { + close(): void; + flush(): void; + streamStatus(): void; + write(aBuf: string, aCount: u32): u32; + writeFrom(aFromStream: nsIInputStream, aCount: u32): u32; + isNonBlocking(): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIPipe.idl + +interface nsIPipe extends nsISupports { + init(nonBlockingInput: boolean, nonBlockingOutput: boolean, segmentSize: u32, segmentCount: u32): void; + readonly inputStream: nsIAsyncInputStream; + readonly outputStream: nsIAsyncOutputStream; +} + +interface nsISearchableInputStream extends nsISupports { + search(forString: string, ignoreCase: boolean, found: OutParam, offsetSearchedTo: OutParam): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIRandomAccessStream.idl + +interface nsIRandomAccessStream extends nsISeekableStream { + getInputStream(): nsIInputStream; + getOutputStream(): nsIOutputStream; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsISafeOutputStream.idl + +interface nsISafeOutputStream extends nsISupports { + finish(): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIScriptableBase64Encoder.idl + +interface nsIScriptableBase64Encoder extends nsISupports { + encodeToCString(stream: nsIInputStream, length: u32): string; + encodeToString(stream: nsIInputStream, length: u32): string; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIScriptableInputStream.idl + +interface nsIScriptableInputStream extends nsISupports { + close(): void; + init(aInputStream: nsIInputStream): void; + available(): u64; + read(aCount: u32): string; + readBytes(aCount: u32): string; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsISeekableStream.idl + +interface nsISeekableStream extends nsITellableStream { + readonly NS_SEEK_SET: 0; + readonly NS_SEEK_CUR: 1; + readonly NS_SEEK_END: 2; + + seek(whence: i32, offset: i64): void; + setEOF(): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIStorageStream.idl + +interface nsIStorageStream extends nsISupports { + init(segmentSize: u32, maxSize: u32): void; + getOutputStream(startPosition: i32): nsIOutputStream; + newInputStream(startPosition: i32): nsIInputStream; + length: u32; + readonly writeInProgress: boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIStreamBufferAccess.idl + +interface nsIStreamBufferAccess extends nsISupports { + disableBuffering(): void; + enableBuffering(): void; + readonly unbufferedStream: nsISupports; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIStringStream.idl + +interface nsIStringInputStream extends nsIInputStream { + setByteStringData(data: string): void; + setUTF8Data(data: string): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsITellableStream.idl + +interface nsITellableStream extends nsISupports { + tell(): i64; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIUnicharInputStream.idl + +interface nsIUnicharInputStream extends nsISupports { + readString(aCount: u32, aString: OutParam): u32; + close(): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIUnicharLineInputStream.idl + +interface nsIUnicharLineInputStream extends nsISupports { + readLine(aLine: OutParam): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/io/nsIUnicharOutputStream.idl + +interface nsIUnicharOutputStream extends nsISupports { + write(aCount: u32, c: u16[]): boolean; + writeString(str: string): boolean; + flush(): void; + close(): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIBlocklistService.idl + +interface nsIBlocklistService extends nsISupports { + readonly STATE_NOT_BLOCKED: 0; + readonly STATE_SOFTBLOCKED: 1; + readonly STATE_BLOCKED: 2; + readonly STATE_MAX: 3; + + readonly isLoaded: boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsICrashReporter.idl + +interface nsICrashReporter extends nsISupports { + readonly crashReporterEnabled: boolean; + serverURL: nsIURL; + minidumpPath: nsIFile; + getMinidumpForID(id: string): nsIFile; + getExtraFileForID(id: string): nsIFile; + annotateCrashReport(key: string, data: any): void; + removeCrashReportAnnotation(key: string): void; + isAnnotationAllowedForPing(value: string): boolean; + appendAppNotesToCrashReport(data: string): void; + registerAppMemory(ptr: u64, size: u64): void; + submitReports: boolean; + UpdateCrashEventsDir(): void; + saveMemoryReport(): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIDeviceSensors.idl + +interface nsIDeviceSensorData extends nsISupports { + readonly TYPE_ORIENTATION: 0; + readonly TYPE_ACCELERATION: 1; + readonly TYPE_PROXIMITY: 2; + readonly TYPE_LINEAR_ACCELERATION: 3; + readonly TYPE_GYROSCOPE: 4; + readonly TYPE_LIGHT: 5; + readonly TYPE_ROTATION_VECTOR: 6; + readonly TYPE_GAME_ROTATION_VECTOR: 7; + + readonly type: u32; + readonly x: double; + readonly y: double; + readonly z: double; +} + +interface nsIDeviceSensors extends nsISupports { + hasWindowListener(aType: u32, aWindow: nsIDOMWindow): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIGIOService.idl + +interface nsIGIOHandlerApp extends nsIHandlerApp { + readonly id: string; + launchFile(fileName: string): void; + getMozIconURL(): string; +} + +interface nsIGIOMimeApp extends nsIHandlerApp { + readonly EXPECTS_URIS: 0; + readonly EXPECTS_PATHS: 1; + readonly EXPECTS_URIS_FOR_NON_FILES: 2; + + readonly id: string; + readonly command: string; + readonly expectsURIs: i32; + readonly supportedURISchemes: nsIUTF8StringEnumerator; + setAsDefaultForMimeType(mimeType: string): void; + setAsDefaultForFileExtensions(extensions: string): void; + setAsDefaultForURIScheme(uriScheme: string): void; +} + +interface nsIGIOService extends nsISupports { + getMimeTypeFromExtension(extension: string): string; + getAppForURIScheme(aURIScheme: string): nsIHandlerApp; + getAppsForURIScheme(aURIScheme: string): nsIMutableArray; + getAppForMimeType(mimeType: string): nsIHandlerApp; + createHandlerAppFromAppId(appId: string): nsIGIOHandlerApp; + createAppFromCommand(cmd: string, appName: string): nsIGIOMimeApp; + findAppFromCommand(cmd: string): nsIGIOMimeApp; + getDescriptionForMimeType(mimeType: string): string; + readonly isRunningUnderFlatpak: boolean; + readonly isRunningUnderSnap: boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIGSettingsService.idl + +interface nsIGSettingsCollection extends nsISupports { + setString(key: string, value: string): void; + setBoolean(key: string, value: boolean): void; + setInt(key: string, value: i32): void; + getString(key: string): string; + getBoolean(key: string): boolean; + getInt(key: string): i32; + getStringList(key: string): nsIArray; +} + +interface nsIGSettingsService extends nsISupports { + getCollectionForSchema(schema: string): nsIGSettingsCollection; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIGeolocationProvider.idl + +interface nsIGeolocationUpdate extends nsISupports { + update(position: nsIDOMGeoPosition): void; + notifyError(error: u16): void; +} + +interface nsIGeolocationProvider extends nsISupports { + startup(): void; + watch(callback: nsIGeolocationUpdate): void; + shutdown(): void; + setHighAccuracy(enable: boolean): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIHapticFeedback.idl + +interface nsIHapticFeedback extends nsISupports { + readonly ShortPress: 0; + readonly LongPress: 1; + + performSimpleAction(isLongPress: i32): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIPlatformInfo.idl + +interface nsIPlatformInfo extends nsISupports { + readonly platformVersion: string; + readonly platformBuildID: string; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsISystemInfo.idl + +interface nsISystemInfo extends nsISupports { + readonly diskInfo: Promise; + readonly countryCode: Promise; + readonly osInfo: Promise; + readonly processInfo: Promise; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIXULAppInfo.idl + +interface nsIXULAppInfo extends nsIPlatformInfo { + readonly vendor: string; + readonly name: string; + readonly ID: string; + readonly version: string; + readonly appBuildID: string; + readonly UAName: string; + readonly sourceURL: string; + readonly updateURL: string; +} + +// https://searchfox.org/mozilla-central/source/xpcom/system/nsIXULRuntime.idl + +} // global + +declare namespace nsIXULRuntime { + +enum ExperimentStatus { + eExperimentStatusUnenrolled = 0, + eExperimentStatusControl = 1, + eExperimentStatusTreatment = 2, + eExperimentStatusDisqualified = 3, + eExperimentStatusRollout = 4, + eExperimentStatusCount = 5, +} + +enum ContentWin32kLockdownState { + LockdownEnabled = 1, + MissingWebRender = 2, + OperatingSystemNotSupported = 3, + PrefNotSet = 4, + MissingRemoteWebGL = 5, + MissingNonNativeTheming = 6, + DisabledByEnvVar = 7, + DisabledBySafeMode = 8, + DisabledByE10S = 9, + DisabledByUserPref = 10, + EnabledByUserPref = 11, + DisabledByControlGroup = 12, + EnabledByTreatmentGroup = 13, + DisabledByDefault = 14, + EnabledByDefault = 15, + DecodersArentRemote = 16, + IncompatibleMitigationPolicy = 17, +} + +enum FissionDecisionStatus { + eFissionStatusUnknown = 0, + eFissionDisabledByE10sEnv = 3, + eFissionEnabledByEnv = 4, + eFissionDisabledByEnv = 5, + eFissionEnabledByDefault = 7, + eFissionDisabledByDefault = 8, + eFissionEnabledByUserPref = 9, + eFissionDisabledByUserPref = 10, + eFissionDisabledByE10sOther = 11, +} + +} + +declare global { + +interface nsIXULRuntime extends nsISupports, Enums { + readonly PROCESS_TYPE_DEFAULT: 0; + readonly PROCESS_TYPE_CONTENT: 2; + readonly PROCESS_TYPE_IPDLUNITTEST: 3; + readonly PROCESS_TYPE_GMPLUGIN: 4; + readonly PROCESS_TYPE_GPU: 5; + readonly PROCESS_TYPE_VR: 6; + readonly PROCESS_TYPE_RDD: 7; + readonly PROCESS_TYPE_SOCKET: 8; + readonly PROCESS_TYPE_FORKSERVER: 10; + readonly PROCESS_TYPE_UTILITY: 11; + readonly E10S_MULTI_EXPERIMENT: 1; + + readonly inSafeMode: boolean; + readonly win32kExperimentStatus: nsIXULRuntime.ExperimentStatus; + readonly win32kLiveStatusTestingOnly: nsIXULRuntime.ContentWin32kLockdownState; + readonly win32kSessionStatus: nsIXULRuntime.ContentWin32kLockdownState; + readonly fissionAutostart: boolean; + readonly fissionDecisionStatus: nsIXULRuntime.FissionDecisionStatus; + readonly fissionDecisionStatusString: string; + readonly sessionHistoryInParent: boolean; + readonly sessionStorePlatformCollection: boolean; + logConsoleErrors: boolean; + readonly OS: string; + readonly XPCOMABI: string; + readonly widgetToolkit: string; + readonly processType: u32; + readonly processID: u32; + readonly uniqueProcessID: u64; + readonly remoteType: string; + readonly browserTabsRemoteAutostart: boolean; + readonly maxWebProcessCount: u32; + readonly accessibilityEnabled: boolean; + readonly accessibilityInstantiator: string; + readonly is64Bit: boolean; + readonly isTextRecognitionSupported: boolean; + invalidateCachesOnRestart(): void; + readonly replacedLockTime: PRTime; + readonly defaultUpdateChannel: string; + readonly distributionID: string; + readonly windowsDLLBlocklistStatus: boolean; + readonly restartedByOS: boolean; + readonly chromeColorSchemeIsDark: boolean; + readonly contentThemeDerivedColorSchemeIsDark: boolean; + readonly prefersReducedMotion: boolean; + readonly drawInTitlebar: boolean; + readonly caretBlinkCount: i32; + readonly caretBlinkTime: i32; + readonly desktopEnvironment: string; + readonly isWayland: boolean; + readonly processStartupShortcut: string; + readonly launcherProcessState: u32; + readonly lastAppVersion: string; + readonly lastAppBuildID: string; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIDirectTaskDispatcher.idl + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIEnvironment.idl + +interface nsIEnvironment extends nsISupports { + set(aName: string, aValue: string): void; + get(aName: string): string; + exists(aName: string): boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIEventTarget.idl + +interface nsIEventTarget extends nsISupports { + readonly DISPATCH_NORMAL: 0; + readonly DISPATCH_AT_END: 2; + readonly DISPATCH_EVENT_MAY_BLOCK: 4; + readonly DISPATCH_IGNORE_BLOCK_DISPATCH: 8; + + isOnCurrentThread(): boolean; + dispatch(event: nsIRunnable, flags: u32): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIIdlePeriod.idl + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsINamed.idl + +interface nsINamed extends nsISupports { + readonly name: string; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIProcess.idl + +interface nsIProcess extends nsISupports { + init(executable: nsIFile): void; + kill(): void; + run(blocking: boolean, args: string[], count: u32): void; + runAsync(args: string[], count: u32, observer?: nsIObserver, holdWeak?: boolean): void; + runw(blocking: boolean, args: string[], count: u32): void; + runwAsync(args: string[], count: u32, observer?: nsIObserver, holdWeak?: boolean): void; + startHidden: boolean; + noShell: boolean; + readonly pid: u32; + readonly exitValue: i32; + readonly isRunning: boolean; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIRunnable.idl + +type nsIRunnable = Callable<{ + run(): void; +}> + +interface nsIRunnablePriority extends nsISupports { + readonly PRIORITY_IDLE: 0; + readonly PRIORITY_DEFERRED_TIMERS: 1; + readonly PRIORITY_LOW: 2; + readonly PRIORITY_NORMAL: 4; + readonly PRIORITY_MEDIUMHIGH: 5; + readonly PRIORITY_INPUT_HIGH: 6; + readonly PRIORITY_VSYNC: 7; + readonly PRIORITY_RENDER_BLOCKING: 9; + readonly PRIORITY_CONTROL: 10; + + readonly priority: u32; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsISerialEventTarget.idl + +interface nsISerialEventTarget extends nsIEventTarget { +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsISupportsPriority.idl + +interface nsISupportsPriority extends nsISupports { + readonly PRIORITY_HIGHEST: -20; + readonly PRIORITY_HIGH: -10; + readonly PRIORITY_NORMAL: 0; + readonly PRIORITY_LOW: 10; + readonly PRIORITY_LOWEST: 20; + + priority: i32; + adjustPriority(delta: i32): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThread.idl + +} // global + +declare namespace nsIThread { + +enum QoSPriority { + QOS_PRIORITY_NORMAL = 0, + QOS_PRIORITY_LOW = 1, +} + +} + +declare global { + +interface nsIThread extends nsISerialEventTarget, Enums { + shutdown(): void; + hasPendingEvents(): boolean; + hasPendingHighPriorityEvents(): boolean; + processNextEvent(mayWait: boolean): boolean; + asyncShutdown(): void; + beginShutdown(): nsIThreadShutdown; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadInternal.idl + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadManager.idl + +type nsINestedEventLoopCondition = Callable<{ + isDone(): boolean; +}> + +interface nsIThreadManager extends nsISupports { + readonly mainThread: nsIThread; + readonly currentThread: nsIThread; + dispatchToMainThread(event: nsIRunnable, priority?: u32): void; + dispatchToMainThreadWithMicroTask(event: nsIRunnable, priority?: u32): void; + idleDispatchToMainThread(event: nsIRunnable, timeout?: u32): void; + dispatchDirectTaskToCurrentThread(event: nsIRunnable): void; + spinEventLoopUntil(aVeryGoodReasonToDoThis: string, condition: nsINestedEventLoopCondition): void; + spinEventLoopUntilOrQuit(aVeryGoodReasonToDoThis: string, condition: nsINestedEventLoopCondition): void; + spinEventLoopUntilEmpty(): void; + readonly mainThreadEventTarget: nsIEventTarget; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadPool.idl + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsIThreadShutdown.idl + +interface nsIThreadShutdown extends nsISupports { + onCompletion(aEvent: nsIRunnable): void; + readonly completed: boolean; + stopWaitingAndLeakThread(): void; +} + +// https://searchfox.org/mozilla-central/source/xpcom/threads/nsITimer.idl + +type nsITimerCallback = Callable<{ + notify(timer: nsITimer): void; +}> + +interface nsITimer extends nsISupports { + readonly TYPE_ONE_SHOT: 0; + readonly TYPE_REPEATING_SLACK: 1; + readonly TYPE_REPEATING_PRECISE: 2; + readonly TYPE_REPEATING_PRECISE_CAN_SKIP: 3; + readonly TYPE_REPEATING_SLACK_LOW_PRIORITY: 4; + readonly TYPE_ONE_SHOT_LOW_PRIORITY: 5; + + init(aObserver: nsIObserver, aDelayInMs: u32, aType: u32): void; + initWithCallback(aCallback: nsITimerCallback, aDelayInMs: u32, aType: u32): void; + cancel(): void; + delay: u32; + type: u32; + readonly callback: nsITimerCallback; + target: nsIEventTarget; + readonly name: string; +} + +interface nsITimerManager extends nsISupports { + getTimers(): nsITimer[]; +} + +// https://searchfox.org/mozilla-central/source/xpcom/tests/NotXPCOMTest.idl + +interface nsIScriptableOK extends nsISupports { + method1(): void; +} + +interface nsIScriptableWithNotXPCOM extends nsISupports { +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/mozIJSSubScriptLoader.idl + +interface mozIJSSubScriptLoader extends nsISupports { + loadSubScript(url: string, obj?: any): any; + loadSubScriptWithOptions(url: string, options: any): any; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/nsIXPCScriptable.idl + +// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/xpcIJSWeakReference.idl + +interface xpcIJSWeakReference extends nsISupports { + get(): any; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/idl/xpccomponents.idl + +interface nsIXPCComponents_Classes extends nsISupports { +} + +interface nsIXPCComponents_Results extends nsISupports { +} + +interface nsIXPCComponents_ID extends nsISupports { +} + +interface nsIXPCComponents_Exception extends nsISupports { +} + +interface nsIXPCComponents_Constructor extends nsISupports { +} + +interface nsIXPCComponents_utils_Sandbox extends nsISupports { +} + +type nsIScheduledGCCallback = Callable<{ + callback(): void; +}> + +interface nsIXPCComponents_Utils extends nsISupports { + printStderr(message: string): void; + reportError(error: any, stack?: any): void; + readonly Sandbox: nsIXPCComponents_utils_Sandbox; + evalInSandbox(source: string, sandbox: any, version?: any, filename?: string, lineNo?: i32, enforceFilenameRestrictions?: boolean): any; + getUAWidgetScope(principal: nsIPrincipal): any; + getSandboxMetadata(sandbox: any): any; + setSandboxMetadata(sandbox: any, metadata: any): void; + isESModuleLoaded(aResourceURI: string): boolean; + importGlobalProperties(aPropertyList: any): void; + getWeakReference(obj: any): xpcIJSWeakReference; + forceGC(): void; + forceCC(aListener?: nsICycleCollectorListener): void; + createCCLogger(): nsICycleCollectorListener; + finishCC(): void; + ccSlice(budget: i64): void; + getMaxCCSliceTimeSinceClear(): i32; + clearMaxCCTime(): void; + forceShrinkingGC(): void; + schedulePreciseGC(callback: nsIScheduledGCCallback): void; + schedulePreciseShrinkingGC(callback: nsIScheduledGCCallback): void; + unlinkGhostWindows(): void; + intentionallyLeak(): void; + getJSTestingFunctions(): any; + getFunctionSourceLocation(func: any): any; + callFunctionWithAsyncStack(func: any, stack: nsIStackFrame, asyncCause: string): any; + getGlobalForObject(obj: any): any; + isProxy(vobject: any): boolean; + exportFunction(vfunction: any, vscope: any, voptions?: any): any; + createObjectIn(vobj: any, voptions?: any): any; + makeObjectPropsNormal(vobj: any): void; + isDeadWrapper(obj: any): boolean; + isRemoteProxy(val: any): boolean; + recomputeWrappers(vobj?: any): void; + setWantXrays(vscope: any): void; + dispatch(runnable: any, scope?: any): void; + readonly isInAutomation: boolean; + exitIfInAutomation(): void; + crashIfNotInAutomation(): void; + setGCZeal(zeal: i32): void; + nukeSandbox(obj: any): void; + blockScriptForGlobal(global: any): void; + unblockScriptForGlobal(global: any): void; + isOpaqueWrapper(obj: any): boolean; + isXrayWrapper(obj: any): boolean; + waiveXrays(aVal: any): any; + unwaiveXrays(aVal: any): any; + getClassName(aObj: any, aUnwrap: boolean): string; + getIncumbentGlobal(callback?: any): any; + getDebugName(obj: any): string; + getWatchdogTimestamp(aCategory: string): PRTime; + getJSEngineTelemetryValue(): any; + cloneInto(value: any, scope: any, options?: any): any; + getWebIDLCallerPrincipal(): nsIPrincipal; + getObjectPrincipal(obj: any): nsIPrincipal; + getRealmLocation(obj: any): string; + now(): double; + readUTF8File(file: nsIFile): string; + readUTF8URI(url: nsIURI): string; + createSpellChecker(): nsIEditorSpellCheck; + createCommandLine(args: string[], workingDir: nsIFile, state: u32): nsISupports; + createCommandParams(): nsICommandParams; + createLoadContext(): nsILoadContext; + createPrivateLoadContext(): nsILoadContext; + createPersistentProperties(): nsIPersistentProperties; + createDocumentEncoder(contentType: string): nsIDocumentEncoder; + createHTMLCopyEncoder(): nsIDocumentEncoder; + readonly loadedESModules: string[]; + getModuleImportStack(aLocation: string): string; +} + +interface nsIXPCComponents extends nsISupports { + readonly interfaces: nsIXPCComponents_Interfaces; + readonly results: nsIXPCComponents_Results; + isSuccessCode(result: nsresult): boolean; + readonly classes: nsIXPCComponents_Classes; + readonly stack: nsIStackFrame; + readonly manager: nsIComponentManager; + readonly utils: nsIXPCComponents_Utils; + readonly ID: nsIXPCComponents_ID; + readonly Exception: nsIXPCComponents_Exception; + readonly Constructor: nsIXPCComponents_Constructor; + returnCode: any; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_attributes.idl + +interface nsIXPCTestObjectReadOnly extends nsISupports { + readonly strReadOnly: string; + readonly boolReadOnly: boolean; + readonly shortReadOnly: i16; + readonly longReadOnly: i32; + readonly floatReadOnly: float; + readonly charReadOnly: string; + readonly timeReadOnly: PRTime; +} + +interface nsIXPCTestObjectReadWrite extends nsISupports { + stringProperty: string; + booleanProperty: boolean; + shortProperty: i16; + longProperty: i32; + floatProperty: float; + charProperty: string; + timeProperty: PRTime; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_bug809674.idl + +interface nsIXPCTestBug809674 extends nsISupports { + addArgs(x: u32, y: u32): u32; + addSubMulArgs(x: u32, y: u32, subOut: OutParam, mulOut: OutParam): u32; + addVals(x: any, y: any): any; + methodNoArgs(): u32; + methodNoArgsNoRetVal(): void; + addMany(x1: u32, x2: u32, x3: u32, x4: u32, x5: u32, x6: u32, x7: u32, x8: u32): u32; + valProperty: any; + uintProperty: u32; + methodWithOptionalArgc(): void; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_cenums.idl + +} // global + +declare namespace nsIXPCTestCEnums { + +enum testFlagsExplicit { + shouldBe1Explicit = 1, + shouldBe2Explicit = 2, + shouldBe4Explicit = 4, + shouldBe8Explicit = 8, + shouldBe12Explicit = 12, +} + +enum testFlagsImplicit { + shouldBe0Implicit = 0, + shouldBe1Implicit = 1, + shouldBe2Implicit = 2, + shouldBe3Implicit = 3, + shouldBe5Implicit = 5, + shouldBe6Implicit = 6, + shouldBe2AgainImplicit = 2, + shouldBe3AgainImplicit = 3, +} + +} + +declare global { + +interface nsIXPCTestCEnums extends nsISupports, Enums { + readonly testConst: 1; + + testCEnumInput(abc: nsIXPCTestCEnums.testFlagsExplicit): void; + testCEnumOutput(): nsIXPCTestCEnums.testFlagsExplicit; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_interfaces.idl + +interface nsIXPCTestInterfaceA extends nsISupports { + name: string; +} + +interface nsIXPCTestInterfaceB extends nsISupports { + name: string; +} + +interface nsIXPCTestInterfaceC extends nsISupports { + someInteger: i32; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_params.idl + +interface nsIXPCTestParams extends nsISupports { + testBoolean(a: boolean, b: InOutParam): boolean; + testOctet(a: u8, b: InOutParam): u8; + testShort(a: i16, b: InOutParam): i16; + testLong(a: i32, b: InOutParam): i32; + testLongLong(a: i64, b: InOutParam): i64; + testUnsignedShort(a: u16, b: InOutParam): u16; + testUnsignedLong(a: u32, b: InOutParam): u32; + testUnsignedLongLong(a: u64, b: InOutParam): u64; + testFloat(a: float, b: InOutParam): float; + testDouble(a: double, b: InOutParam): double; + testChar(a: string, b: InOutParam): string; + testString(a: string, b: InOutParam): string; + testWchar(a: string, b: InOutParam): string; + testWstring(a: string, b: InOutParam): string; + testAString(a: string, b: InOutParam): string; + testAUTF8String(a: string, b: InOutParam): string; + testACString(a: string, b: InOutParam): string; + testJsval(a: any, b: InOutParam): any; + testShortSequence(a: i16[], b: InOutParam): i16[]; + testDoubleSequence(a: double[], b: InOutParam): double[]; + testInterfaceSequence(a: nsIXPCTestInterfaceA[], b: InOutParam): nsIXPCTestInterfaceA[]; + testAStringSequence(a: string[], b: InOutParam): string[]; + testACStringSequence(a: string[], b: InOutParam): string[]; + testJsvalSequence(a: any[], b: InOutParam): any[]; + testSequenceSequence(a: i16[][], b: InOutParam): i16[][]; + testOptionalSequence(arr?: u8[]): u8[]; + testShortArray(aLength: u32, a: i16[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testDoubleArray(aLength: u32, a: double[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testStringArray(aLength: u32, a: string[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testWstringArray(aLength: u32, a: string[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testInterfaceArray(aLength: u32, a: nsIXPCTestInterfaceA[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testByteArrayOptionalLength(a: u8[], aLength?: u32): u32; + testSizedString(aLength: u32, a: string, bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testSizedWstring(aLength: u32, a: string, bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testJsvalArray(aLength: u32, a: any[], bLength: InOutParam, b: InOutParam, rvLength: OutParam): OutParam; + testOutAString(o: OutParam): void; + testStringArrayOptionalSize(a: string[], aLength?: u32): string; + testOmittedOptionalOut(aJSObj: nsIXPCTestParams, aOut?: OutParam): void; + readonly testNaN: double; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_returncode.idl + +interface nsIXPCTestReturnCodeParent extends nsISupports { + callChild(childBehavior: i32): nsresult; +} + +interface nsIXPCTestReturnCodeChild extends nsISupports { + readonly CHILD_SHOULD_THROW: 0; + readonly CHILD_SHOULD_RETURN_SUCCESS: 1; + readonly CHILD_SHOULD_RETURN_RESULTCODE: 2; + readonly CHILD_SHOULD_NEST_RESULTCODES: 3; + + doIt(behavior: i32): void; +} + +// https://searchfox.org/mozilla-central/source/js/xpconnect/tests/idl/xpctest_utils.idl + +type nsIXPCTestFunctionInterface = Callable<{ + echo(arg: string): string; +}> + +interface nsIXPCTestUtils extends nsISupports { + doubleWrapFunction(f: nsIXPCTestFunctionInterface): nsIXPCTestFunctionInterface; +} + +interface nsIXPCTestTypeScript extends nsISupports { + exposedProp: i32; + exposedMethod(arg: i32): void; +} + +// https://searchfox.org/mozilla-central/source/dom/xul/nsIBrowserController.idl + +interface nsIBrowserController extends nsISupports { + enableDisableCommands(action: string, enabledCommands: string[], disabledCommands: string[]): void; +} + +// https://searchfox.org/mozilla-central/source/dom/xul/nsIController.idl + +interface nsIController extends nsISupports { + isCommandEnabled(command: string): boolean; + supportsCommand(command: string): boolean; + doCommand(command: string): void; + onEvent(eventName: string): void; +} + +interface nsICommandController extends nsISupports { + getCommandStateWithParams(command: string, aCommandParams: nsICommandParams): void; + doCommandWithParams(command: string, aCommandParams: nsICommandParams): void; + getSupportedCommands(): string[]; +} + +// https://searchfox.org/mozilla-central/source/dom/xul/nsIControllers.idl + +interface nsIControllers extends nsISupports { + getControllerForCommand(command: string): nsIController; + insertControllerAt(index: u32, controller: nsIController): void; + removeControllerAt(index: u32): nsIController; + getControllerAt(index: u32): nsIController; + appendController(controller: nsIController): void; + removeController(controller: nsIController): void; + getControllerId(controller: nsIController): u32; + getControllerById(controllerID: u32): nsIController; + getControllerCount(): u32; } // https://searchfox.org/mozilla-central/source/toolkit/xre/nsINativeAppSupport.idl @@ -13940,1636 +15079,67 @@ interface nsIXREDirProvider extends nsISupports { getInstallHash(): string; } -// https://searchfox.org/mozilla-central/source/editor/spellchecker/nsIInlineSpellChecker.idl - -interface nsIInlineSpellChecker extends nsISupports { - readonly spellChecker: nsIEditorSpellCheck; - init(aEditor: nsIEditor): void; - cleanup(aDestroyingFrames: boolean): void; - enableRealTimeSpell: boolean; - spellCheckRange(aSelection: Range): void; - getMisspelledWord(aNode: Node, aOffset: u32): Range; - replaceWord(aNode: Node, aOffset: u32, aNewword: string): void; - addWordToDictionary(aWord: string): void; - removeWordFromDictionary(aWord: string): void; - ignoreWord(aWord: string): void; - ignoreWords(aWordsToIgnore: string[]): void; - updateCurrentDictionary(): void; - readonly spellCheckPending: boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/timermanager/nsIUpdateTimerManager.idl - -interface nsIUpdateTimerManager extends nsISupports { - registerTimer(id: string, callback: nsITimerCallback, interval: u32, skipFirst?: boolean): void; - unregisterTimer(id: string): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/nsIUpdateService.idl - -interface nsIUpdatePatch extends nsISupports { - readonly type: string; - readonly URL: string; - finalURL: string; - readonly size: u32; - state: string; - errorCode: i32; - selected: boolean; - serialize(updates: Document): Element; -} - -interface nsIUpdate extends nsISupports { - readonly type: string; - readonly name: string; - readonly displayVersion: string; - readonly appVersion: string; - readonly platformVersion: string; - readonly previousAppVersion: string; - readonly buildID: string; - readonly detailsURL: string; - readonly serviceURL: string; - readonly channel: string; - readonly unsupported: boolean; - promptWaitTime: i64; - isCompleteUpdate: boolean; - installDate: i64; - statusText: string; - readonly selectedPatch: nsIUpdatePatch; - state: string; - errorCode: i32; - elevationFailure: boolean; - readonly patchCount: u32; - getPatchAt(index: u32): nsIUpdatePatch; - serialize(updates: Document): Element; -} - -interface nsIUpdateCheckResult extends nsISupports { - readonly checksAllowed: boolean; - readonly succeeded: boolean; - readonly request: any; - readonly updates: nsIUpdate[]; -} - -interface nsIUpdateCheck extends nsISupports { - readonly id: i32; - readonly result: Promise; -} - -interface nsIUpdateCheckerInternal extends nsISupports { - checkForUpdates(checkType: i32): nsIUpdateCheck; -} - -interface nsIUpdateChecker extends nsISupports { - readonly BACKGROUND_CHECK: 1; - readonly FOREGROUND_CHECK: 2; - - checkForUpdates(checkType: i32): nsIUpdateCheck; - getUpdateURL(checkType: i32): Promise; - stopCheck(id: i32): void; - stopAllChecks(): void; - readonly internal: nsIUpdateCheckerInternal; -} - -interface nsIApplicationUpdateServiceInternal extends nsISupports { - init(force: boolean): Promise; - downloadUpdate(update: nsIUpdate): Promise; - stopDownload(): Promise; -} - -interface nsIApplicationUpdateService extends nsISupports { - readonly DOWNLOAD_SUCCESS: 1; - readonly DOWNLOAD_FAILURE_CANNOT_RESUME_IN_BACKGROUND: 2; - readonly DOWNLOAD_FAILURE_GENERIC: 3; - readonly STATE_IDLE: 1; - readonly STATE_DOWNLOADING: 2; - readonly STATE_STAGING: 4; - readonly STATE_PENDING: 5; - readonly STATE_SWAP: 6; - - init(): Promise; - checkForBackgroundUpdates(): Promise; - selectUpdate(updates: nsIUpdate[]): Promise; - addDownloadListener(listener: nsIRequestObserver): void; - removeDownloadListener(listener: nsIRequestObserver): void; - downloadUpdate(update: nsIUpdate): Promise; - onCheckComplete(result: nsIUpdateCheckResult): Promise; - stopDownload(): Promise; - readonly disabled: boolean; - readonly canUsuallyCheckForUpdates: boolean; - readonly canCheckForUpdates: boolean; - readonly elevationRequired: boolean; - readonly canUsuallyApplyUpdates: boolean; - readonly canApplyUpdates: boolean; - readonly isOtherInstanceHandlingUpdates: boolean; - readonly canUsuallyStageUpdates: boolean; - readonly canStageUpdates: boolean; - readonly canUsuallyUseBits: boolean; - readonly canUseBits: boolean; - readonly manualUpdateOnly: boolean; - readonly isAppBaseDirWritable: boolean; - onlyDownloadUpdatesThisSession: boolean; - getStateName(state: i32): string; - readonly currentState: i32; - readonly stateTransition: Promise; - readonly internal: nsIApplicationUpdateServiceInternal; -} - -interface nsIUpdateProcessor extends nsISupports { - processUpdate(): void; - getServiceRegKeyExists(): boolean; - attemptAutomaticApplicationRestartWithLaunchArgs(argvExtra: string[]): i32; - waitForProcessExit(pid: u32, timeoutMS: u32): void; -} - -interface nsIUpdateSyncManager extends nsISupports { - isOtherInstanceRunning(): boolean; - resetLock(anAppFile?: nsIFile): void; -} - -interface nsIUpdateMutex extends nsISupports { - isLocked(): boolean; - tryLock(): boolean; - unlock(): void; -} - -interface nsIUpdateManagerInternal extends nsISupports { - reload(skipFiles: boolean): Promise; - getHistory(): nsIUpdate[]; - addUpdateToHistory(update: nsIUpdate): void; - readyUpdate: nsIUpdate; - downloadingUpdate: nsIUpdate; - refreshUpdateStatus(): Promise; -} - -interface nsIUpdateManager extends nsISupports { - getHistory(): Promise; - getReadyUpdate(): Promise; - getDownloadingUpdate(): Promise; - updateInstalledAtStartup(): Promise; - lastUpdateInstalled(): Promise; - addUpdateToHistory(update: nsIUpdate): Promise; - saveUpdates(): void; - refreshUpdateStatus(): Promise; - elevationOptedIn(): Promise; - cleanupDownloadingUpdate(): Promise; - cleanupReadyUpdate(): Promise; - cleanupActiveUpdates(): Promise; - doInstallCleanup(): Promise; - doUninstallCleanup(): Promise; - readonly internal: nsIUpdateManagerInternal; -} - -interface nsIApplicationUpdateServiceStub extends nsISupports { - init(): Promise; - initUpdate(): Promise; - readonly updateDisabled: boolean; - readonly updateDisabledForTesting: boolean; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/windowcreator/nsIWindowCreator.idl - -interface nsIWindowCreator extends nsISupports { - createChromeWindow(parent: nsIWebBrowserChrome, chromeFlags: u32, aOpenWindowInfo: nsIOpenWindowInfo, cancel: OutParam): nsIWebBrowserChrome; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/windowcreator/nsIWindowProvider.idl - -interface nsIWindowProvider extends nsISupports { -} - -// https://searchfox.org/mozilla-central/source/netwerk/base/http-sfv/nsIStructuredFieldValues.idl - -interface nsISFVBareItem extends nsISupports { - readonly BOOL: 1; - readonly STRING: 2; - readonly DECIMAL: 3; - readonly INTEGER: 4; - readonly TOKEN: 5; - readonly BYTE_SEQUENCE: 6; - - readonly type: i32; -} - -interface nsISFVInteger extends nsISFVBareItem { - value: i64; -} - -interface nsISFVString extends nsISFVBareItem { - value: string; -} - -interface nsISFVBool extends nsISFVBareItem { - value: boolean; -} - -interface nsISFVDecimal extends nsISFVBareItem { - value: double; -} - -interface nsISFVToken extends nsISFVBareItem { - value: string; -} - -interface nsISFVByteSeq extends nsISFVBareItem { - value: string; -} - -interface nsISFVParams extends nsISupports { - get(key: string): nsISFVBareItem; - set(key: string, item: nsISFVBareItem): void; - delete(key: string): void; - keys(): string[]; -} - -interface nsISFVParametrizable extends nsISupports { - readonly params: nsISFVParams; -} - -interface nsISFVItemOrInnerList extends nsISFVParametrizable { -} - -interface nsISFVSerialize extends nsISupports { - serialize(): string; -} - -interface nsISFVItem extends nsISFVItemOrInnerList { - readonly value: nsISFVBareItem; - serialize(): string; -} - -interface nsISFVInnerList extends nsISFVItemOrInnerList { - items: nsISFVItem[]; -} - -interface nsISFVList extends nsISFVSerialize { - members: nsISFVItemOrInnerList[]; - parseMore(header: string): void; -} - -interface nsISFVDictionary extends nsISFVSerialize { - get(key: string): nsISFVItemOrInnerList; - set(key: string, member_value: nsISFVItemOrInnerList): void; - delete(key: string): void; - keys(): string[]; - parseMore(header: string): void; -} - -interface nsISFVService extends nsISupports { - parseDictionary(header: string): nsISFVDictionary; - parseList(header: string): nsISFVList; - parseItem(header: string): nsISFVItem; - newInteger(value: i64): nsISFVInteger; - newBool(value: boolean): nsISFVBool; - newDecimal(value: double): nsISFVDecimal; - newString(value: string): nsISFVString; - newByteSequence(value: string): nsISFVByteSeq; - newToken(value: string): nsISFVToken; - newParameters(): nsISFVParams; - newInnerList(items: nsISFVItem[], params: nsISFVParams): nsISFVInnerList; - newItem(value: nsISFVBareItem, params: nsISFVParams): nsISFVItem; - newList(members: nsISFVItemOrInnerList[]): nsISFVList; - newDictionary(): nsISFVDictionary; -} - -// https://searchfox.org/mozilla-central/source/toolkit/modules/nsIBrowserWindowTracker.idl - -interface nsIVisibleTab extends nsISupports { - contentTitle: string; - browserId: i64; -} - -interface nsIBrowserWindowTracker extends nsISupports { - getAllVisibleTabs(): nsIVisibleTab[]; - getBrowserById(aBrowserId: u64): nsISupports; -} - -// https://searchfox.org/mozilla-central/source/toolkit/modules/nsIRegion.idl - -interface nsIRegion extends nsISupports { - readonly current: string; - readonly home: string; -} - -// https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/amIAddonManagerStartup.idl - -interface amIAddonManagerStartup extends nsISupports { - readStartupData(): any; - registerChrome(manifestURI: nsIURI, entries: any): nsIJSRAIIHelper; - encodeBlob(value: any): any; - decodeBlob(value: any): any; - enumerateJAR(uri: nsIURI, pattern: string): string[]; - enumerateJARSubtree(uri: nsIURI): string[]; - initializeURLPreloader(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/amIWebInstallPrompt.idl - -interface amIWebInstallPrompt extends nsISupports { - confirm(aBrowser: Element, aUri: nsIURI, aInstalls: nsIVariant[]): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsIClickRule.idl - -} // global - -declare namespace nsIClickRule { - -enum RunContext { - RUN_TOP = 0, - RUN_CHILD = 1, - RUN_ALL = 2, -} - -} - -declare global { - -interface nsIClickRule extends nsISupports, Enums { - readonly presence: string; - readonly skipPresenceVisibilityCheck: boolean; - readonly runContext: nsIClickRule.RunContext; - readonly hide: string; - readonly optOut: string; - readonly optIn: string; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerListService.idl - -interface nsICookieBannerListService extends nsISupports { - init(): void; - initForTest(): Promise; - shutdown(): void; - importAllRules(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerRule.idl - -interface nsICookieBannerRule extends nsISupports { - id: string; - domains: string[]; - readonly cookiesOptOut: nsICookieRule[]; - readonly cookiesOptIn: nsICookieRule[]; - clearCookies(): void; - addCookie(aIsOptOut: boolean, aName: string, aValue: string, aHost: string, aPath: string, aExpiryRelative: i64, aUnsetValue: string, aIsSecure: boolean, aIsHttpOnly: boolean, aIsSession: boolean, aSameSite: i32, aSchemeMap: nsICookie.schemeType): void; - readonly clickRule: nsIClickRule; - addClickRule(aPresence: string, aSkipPresenceVisibilityCheck?: boolean, aRunContext?: nsIClickRule.RunContext, aHide?: string, aOptOut?: string, aOptIn?: string): void; - clearClickRule(): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerService.idl - -} // global - -declare namespace nsICookieBannerService { - -enum Modes { - MODE_DISABLED = 0, - MODE_REJECT = 1, - MODE_REJECT_OR_ACCEPT = 2, - MODE_UNSET = 3, -} - -} - -declare global { - -interface nsICookieBannerService extends nsISupports, Enums { - readonly isEnabled: boolean; - readonly rules: nsICookieBannerRule[]; - resetRules(doImport?: boolean): void; - getCookiesForURI(aURI: nsIURI, aIsPrivateBrowsing: boolean): nsICookieRule[]; - getClickRulesForDomain(aDomain: string, aIsTopLevel: boolean): nsIClickRule[]; - insertRule(aRule: nsICookieBannerRule): void; - removeRule(aRule: nsICookieBannerRule): void; - hasRuleForBrowsingContextTree(aBrowsingContext: BrowsingContext): boolean; - getDomainPref(aTopLevelURI: nsIURI, aIsPrivate: boolean): nsICookieBannerService.Modes; - setDomainPref(aTopLevelURI: nsIURI, aMode: nsICookieBannerService.Modes, aIsPrivate: boolean): void; - setDomainPrefAndPersistInPrivateBrowsing(aTopLevelURI: nsIURI, aMode: nsICookieBannerService.Modes): void; - removeDomainPref(aTopLevelURI: nsIURI, aIsPrivate: boolean): void; - removeAllDomainPrefs(aIsPrivate: boolean): void; - shouldStopBannerClickingForSite(aSite: string, aIsTopLevel: boolean, aIsPrivate: boolean): boolean; - markSiteExecuted(aSite: string, aIsTopLevel: boolean, aIsPrivate: boolean): void; - removeExecutedRecordForSite(aSite: string, aIsPrivate: boolean): void; - removeAllExecutedRecords(aIsPrivate: boolean): void; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieBannerTelemetryService.idl - -interface nsICookieBannerTelemetryService extends nsISupports { -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/cookiebanners/nsICookieRule.idl - -interface nsICookieRule extends nsISupports { - readonly cookie: nsICookie; - readonly expiryRelative: i64; - readonly unsetValue: string; -} - -// https://searchfox.org/mozilla-central/source/xpcom/tests/NotXPCOMTest.idl - -interface nsIScriptableOK extends nsISupports { - method1(): void; -} - -interface nsIScriptableWithNotXPCOM extends nsISupports { -} - -// https://searchfox.org/mozilla-central/source/editor/composer/nsIEditingSession.idl - -interface nsIEditingSession extends nsISupports { - readonly eEditorOK: 0; - readonly eEditorCreationInProgress: 1; - readonly eEditorErrorCantEditMimeType: 2; - readonly eEditorErrorFileNotFound: 3; - readonly eEditorErrorCantEditFramesets: 8; - readonly eEditorErrorUnknown: 9; - - readonly editorStatus: u32; - makeWindowEditable(window: mozIDOMWindowProxy, aEditorType: string, doAfterUriLoad: boolean, aMakeWholeDocumentEditable: boolean, aInteractive: boolean): void; - windowIsEditable(window: mozIDOMWindowProxy): boolean; - getEditorForWindow(window: mozIDOMWindowProxy): nsIEditor; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibilityService.idl - -interface nsIAccessibilityService extends nsISupports { - getApplicationAccessible(): nsIAccessible; - getAccessibleFor(aNode: Node): nsIAccessible; - getAccessibleDescendantFor(aNode: Node): nsIAccessible; - getStringRole(aRole: u32): string; - getStringStates(aStates: u32, aExtraStates: u32): nsISupports; - getStringEventType(aEventType: u32): string; - getStringRelationType(aRelationType: u32): string; - getAccessibleFromCache(aNode: Node): nsIAccessible; - setCacheDomains(aCacheDomains: u64): void; - createAccessiblePivot(aRoot: nsIAccessible): nsIAccessiblePivot; - createTextLeafPoint(aAccessible: nsIAccessible, aOffset: i32): nsIAccessibleTextLeafPoint; - setLogging(aModules: string): void; - isLogged(aModule: string): boolean; - getConsumers(): string; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessible.idl - -interface nsIAccessible extends nsISupports { - readonly parent: nsIAccessible; - readonly nextSibling: nsIAccessible; - readonly previousSibling: nsIAccessible; - readonly firstChild: nsIAccessible; - readonly lastChild: nsIAccessible; - readonly children: nsIArray; - readonly childCount: i32; - readonly indexInParent: i32; - readonly uniqueID: i64; - readonly DOMNode: Node; - readonly id: string; - readonly document: nsIAccessibleDocument; - readonly rootDocument: nsIAccessibleDocument; - readonly language: string; - readonly name: string; - readonly value: string; - readonly description: string; - readonly accessKey: string; - readonly keyboardShortcut: string; - readonly role: u32; - getState(aState: OutParam, aExtraState: OutParam): void; - readonly focusedChild: nsIAccessible; - readonly attributes: nsIPersistentProperties; - readonly cache: nsIPersistentProperties; - readonly nativeInterface: nsISupports; - groupPosition(aGroupLevel: OutParam, aSimilarItemsInGroup: OutParam, aPositionInGroup: OutParam): void; - getChildAtPoint(x: i32, y: i32): nsIAccessible; - getDeepestChildAtPoint(x: i32, y: i32): nsIAccessible; - getDeepestChildAtPointInProcess(x: i32, y: i32): nsIAccessible; - getChildAt(aChildIndex: i32): nsIAccessible; - getRelationByType(aRelationType: u32): nsIAccessibleRelation; - getRelations(): nsIArray; - getBounds(x: OutParam, y: OutParam, width: OutParam, height: OutParam): void; - getBoundsInCSSPixels(aX: OutParam, aY: OutParam, aWidth: OutParam, aHeight: OutParam): void; - setSelected(isSelected: boolean): void; - takeSelection(): void; - takeFocus(): void; - readonly actionCount: u8; - getActionName(index: u8): string; - getActionDescription(aIndex: u8): string; - doAction(index: u8): void; - scrollTo(aScrollType: u32): void; - scrollToPoint(coordinateType: u32, x: i32, y: i32): void; - announce(announcement: string, priority: u16): void; - readonly computedARIARole: string; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleAnnouncementEvent.idl - -interface nsIAccessibleAnnouncementEvent extends nsIAccessibleEvent { - readonly POLITE: 0; - readonly ASSERTIVE: 1; - - readonly announcement: string; - readonly priority: u16; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleApplication.idl - -interface nsIAccessibleApplication extends nsISupports { - readonly appName: string; - readonly appVersion: string; - readonly platformName: string; - readonly platformVersion: string; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleCaretMoveEvent.idl - -interface nsIAccessibleCaretMoveEvent extends nsIAccessibleEvent { - readonly caretOffset: i32; - readonly isSelectionCollapsed: boolean; - readonly isAtEndOfLine: boolean; - readonly granularity: i32; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleDocument.idl - -interface nsIAccessibleDocument extends nsISupports { - readonly URL: string; - readonly title: string; - readonly mimeType: string; - readonly docType: string; - readonly DOMDocument: Document; - readonly window: mozIDOMWindowProxy; - readonly parentDocument: nsIAccessibleDocument; - readonly childDocumentCount: u32; - getChildDocumentAt(index: u32): nsIAccessibleDocument; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleEditableText.idl - -interface nsIAccessibleEditableText extends nsISupports { - setTextContents(text: string): void; - insertText(text: string, position: i32): void; - copyText(startPos: i32, endPos: i32): void; - cutText(startPos: i32, endPos: i32): void; - deleteText(startPos: i32, endPos: i32): void; - pasteText(position: i32): void; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleEvent.idl - -interface nsIAccessibleEvent extends nsISupports { - readonly EVENT_SHOW: 1; - readonly EVENT_HIDE: 2; - readonly EVENT_REORDER: 3; - readonly EVENT_FOCUS: 4; - readonly EVENT_STATE_CHANGE: 5; - readonly EVENT_NAME_CHANGE: 6; - readonly EVENT_DESCRIPTION_CHANGE: 7; - readonly EVENT_VALUE_CHANGE: 8; - readonly EVENT_SELECTION: 9; - readonly EVENT_SELECTION_ADD: 10; - readonly EVENT_SELECTION_REMOVE: 11; - readonly EVENT_SELECTION_WITHIN: 12; - readonly EVENT_ALERT: 13; - readonly EVENT_MENU_START: 14; - readonly EVENT_MENU_END: 15; - readonly EVENT_MENUPOPUP_START: 16; - readonly EVENT_MENUPOPUP_END: 17; - readonly EVENT_DRAGDROP_START: 18; - readonly EVENT_SCROLLING_START: 19; - readonly EVENT_SCROLLING_END: 20; - readonly EVENT_DOCUMENT_LOAD_COMPLETE: 21; - readonly EVENT_DOCUMENT_RELOAD: 22; - readonly EVENT_DOCUMENT_LOAD_STOPPED: 23; - readonly EVENT_TEXT_ATTRIBUTE_CHANGED: 24; - readonly EVENT_TEXT_CARET_MOVED: 25; - readonly EVENT_TEXT_INSERTED: 26; - readonly EVENT_TEXT_REMOVED: 27; - readonly EVENT_TEXT_SELECTION_CHANGED: 28; - readonly EVENT_WINDOW_ACTIVATE: 29; - readonly EVENT_WINDOW_DEACTIVATE: 30; - readonly EVENT_WINDOW_MAXIMIZE: 31; - readonly EVENT_WINDOW_MINIMIZE: 32; - readonly EVENT_WINDOW_RESTORE: 33; - readonly EVENT_OBJECT_ATTRIBUTE_CHANGED: 34; - readonly EVENT_TEXT_VALUE_CHANGE: 35; - readonly EVENT_SCROLLING: 36; - readonly EVENT_ANNOUNCEMENT: 37; - readonly EVENT_LIVE_REGION_ADDED: 38; - readonly EVENT_LIVE_REGION_REMOVED: 39; - readonly EVENT_INNER_REORDER: 40; - readonly EVENT_LIVE_REGION_CHANGED: 41; - readonly EVENT_LAST_ENTRY: 42; - - readonly eventType: u32; - readonly accessible: nsIAccessible; - readonly accessibleDocument: nsIAccessibleDocument; - readonly DOMNode: Node; - readonly isFromUserInput: boolean; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleHideEvent.idl - -interface nsIAccessibleHideEvent extends nsIAccessibleEvent { - readonly targetParent: nsIAccessible; - readonly targetNextSibling: nsIAccessible; - readonly targetPrevSibling: nsIAccessible; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleHyperLink.idl - -interface nsIAccessibleHyperLink extends nsISupports { - readonly startIndex: i32; - readonly endIndex: i32; - readonly valid: boolean; - readonly anchorCount: i32; - getURI(index: i32): nsIURI; - getAnchor(index: i32): nsIAccessible; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleHyperText.idl - -interface nsIAccessibleHyperText extends nsISupports { - readonly linkCount: i32; - getLinkAt(index: i32): nsIAccessibleHyperLink; - getLinkIndex(link: nsIAccessibleHyperLink): i32; - getLinkIndexAtOffset(offset: i32): i32; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleImage.idl - -interface nsIAccessibleImage extends nsISupports { - getImagePosition(coordType: u32, x: OutParam, y: OutParam): void; - getImageSize(width: OutParam, height: OutParam): void; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleMacInterface.idl - -interface nsIAccessibleMacNSObjectWrapper extends nsISupports { -} - -interface nsIAccessibleMacInterface extends nsISupports { - readonly attributeNames: string[]; - readonly parameterizedAttributeNames: string[]; - readonly actionNames: string[]; - getAttributeValue(attributeName: string): any; - getParameterizedAttributeValue(attributeName: string, parameter: any): any; - performAction(actionName: string): void; - isAttributeSettable(attributeName: string): boolean; - setAttributeValue(attributeName: string, attributeValue: any): void; -} - -interface nsIAccessibleMacEvent extends nsISupports { - readonly macIface: nsIAccessibleMacInterface; - readonly data: any; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleObjectAttributeChangedEvent.idl - -interface nsIAccessibleObjectAttributeChangedEvent extends nsIAccessibleEvent { - readonly changedAttribute: string; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessiblePivot.idl - -interface nsIAccessiblePivot extends nsISupports { - next(aAnchor: nsIAccessible, aRule: nsIAccessibleTraversalRule, aIncludeStart?: boolean): nsIAccessible; - prev(aAnchor: nsIAccessible, aRule: nsIAccessibleTraversalRule, aIncludeStart?: boolean): nsIAccessible; - first(aRule: nsIAccessibleTraversalRule): nsIAccessible; - last(aRule: nsIAccessibleTraversalRule): nsIAccessible; - atPoint(aX: i32, aY: i32, aRule: nsIAccessibleTraversalRule): nsIAccessible; -} - -interface nsIAccessibleTraversalRule extends nsISupports { - readonly FILTER_IGNORE: 0; - readonly FILTER_MATCH: 1; - readonly FILTER_IGNORE_SUBTREE: 2; - - match(aAccessible: nsIAccessible): u16; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleRelation.idl - -interface nsIAccessibleRelation extends nsISupports { - readonly RELATION_LABELLED_BY: 0; - readonly RELATION_LABEL_FOR: 1; - readonly RELATION_DESCRIBED_BY: 2; - readonly RELATION_DESCRIPTION_FOR: 3; - readonly RELATION_NODE_CHILD_OF: 4; - readonly RELATION_NODE_PARENT_OF: 5; - readonly RELATION_CONTROLLED_BY: 6; - readonly RELATION_CONTROLLER_FOR: 7; - readonly RELATION_FLOWS_TO: 8; - readonly RELATION_FLOWS_FROM: 9; - readonly RELATION_MEMBER_OF: 10; - readonly RELATION_SUBWINDOW_OF: 11; - readonly RELATION_EMBEDS: 12; - readonly RELATION_EMBEDDED_BY: 13; - readonly RELATION_POPUP_FOR: 14; - readonly RELATION_PARENT_WINDOW_OF: 15; - readonly RELATION_DEFAULT_BUTTON: 16; - readonly RELATION_CONTAINING_DOCUMENT: 17; - readonly RELATION_CONTAINING_TAB_PANE: 18; - readonly RELATION_CONTAINING_WINDOW: 19; - readonly RELATION_CONTAINING_APPLICATION: 20; - readonly RELATION_DETAILS: 21; - readonly RELATION_DETAILS_FOR: 22; - readonly RELATION_ERRORMSG: 23; - readonly RELATION_ERRORMSG_FOR: 24; - readonly RELATION_LINKS_TO: 25; - - readonly relationType: u32; - readonly targetsCount: u32; - getTarget(index: u32): nsIAccessible; - getTargets(): nsIArray; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleRole.idl - -interface nsIAccessibleRole extends nsISupports { - readonly ROLE_NOTHING: 0; - readonly ROLE_MENUBAR: 1; - readonly ROLE_SCROLLBAR: 2; - readonly ROLE_ALERT: 3; - readonly ROLE_INTERNAL_FRAME: 4; - readonly ROLE_MENUPOPUP: 5; - readonly ROLE_MENUITEM: 6; - readonly ROLE_TOOLTIP: 7; - readonly ROLE_APPLICATION: 8; - readonly ROLE_DOCUMENT: 9; - readonly ROLE_PANE: 10; - readonly ROLE_DIALOG: 11; - readonly ROLE_GROUPING: 12; - readonly ROLE_SEPARATOR: 13; - readonly ROLE_TOOLBAR: 14; - readonly ROLE_STATUSBAR: 15; - readonly ROLE_TABLE: 16; - readonly ROLE_COLUMNHEADER: 17; - readonly ROLE_ROWHEADER: 18; - readonly ROLE_ROW: 19; - readonly ROLE_CELL: 20; - readonly ROLE_LINK: 21; - readonly ROLE_LIST: 22; - readonly ROLE_LISTITEM: 23; - readonly ROLE_OUTLINE: 24; - readonly ROLE_OUTLINEITEM: 25; - readonly ROLE_PAGETAB: 26; - readonly ROLE_PROPERTYPAGE: 27; - readonly ROLE_GRAPHIC: 28; - readonly ROLE_STATICTEXT: 29; - readonly ROLE_TEXT_LEAF: 30; - readonly ROLE_PUSHBUTTON: 31; - readonly ROLE_CHECKBUTTON: 32; - readonly ROLE_RADIOBUTTON: 33; - readonly ROLE_COMBOBOX: 34; - readonly ROLE_PROGRESSBAR: 35; - readonly ROLE_SLIDER: 36; - readonly ROLE_SPINBUTTON: 37; - readonly ROLE_DIAGRAM: 38; - readonly ROLE_ANIMATION: 39; - readonly ROLE_BUTTONDROPDOWN: 40; - readonly ROLE_BUTTONMENU: 41; - readonly ROLE_WHITESPACE: 42; - readonly ROLE_PAGETABLIST: 43; - readonly ROLE_CANVAS: 44; - readonly ROLE_CHECK_MENU_ITEM: 45; - readonly ROLE_DATE_EDITOR: 46; - readonly ROLE_CHROME_WINDOW: 47; - readonly ROLE_LABEL: 48; - readonly ROLE_PASSWORD_TEXT: 49; - readonly ROLE_RADIO_MENU_ITEM: 50; - readonly ROLE_TEXT_CONTAINER: 51; - readonly ROLE_TOGGLE_BUTTON: 52; - readonly ROLE_TREE_TABLE: 53; - readonly ROLE_PARAGRAPH: 54; - readonly ROLE_ENTRY: 55; - readonly ROLE_CAPTION: 56; - readonly ROLE_NON_NATIVE_DOCUMENT: 57; - readonly ROLE_HEADING: 58; - readonly ROLE_SECTION: 59; - readonly ROLE_FORM: 60; - readonly ROLE_APP_ROOT: 61; - readonly ROLE_PARENT_MENUITEM: 62; - readonly ROLE_COMBOBOX_LIST: 63; - readonly ROLE_COMBOBOX_OPTION: 64; - readonly ROLE_IMAGE_MAP: 65; - readonly ROLE_OPTION: 66; - readonly ROLE_RICH_OPTION: 67; - readonly ROLE_LISTBOX: 68; - readonly ROLE_FLAT_EQUATION: 69; - readonly ROLE_GRID_CELL: 70; - readonly ROLE_NOTE: 71; - readonly ROLE_FIGURE: 72; - readonly ROLE_CHECK_RICH_OPTION: 73; - readonly ROLE_DEFINITION_LIST: 74; - readonly ROLE_TERM: 75; - readonly ROLE_DEFINITION: 76; - readonly ROLE_KEY: 77; - readonly ROLE_SWITCH: 78; - readonly ROLE_MATHML_MATH: 79; - readonly ROLE_MATHML_IDENTIFIER: 80; - readonly ROLE_MATHML_NUMBER: 81; - readonly ROLE_MATHML_OPERATOR: 82; - readonly ROLE_MATHML_TEXT: 83; - readonly ROLE_MATHML_STRING_LITERAL: 84; - readonly ROLE_MATHML_GLYPH: 85; - readonly ROLE_MATHML_ROW: 86; - readonly ROLE_MATHML_FRACTION: 87; - readonly ROLE_MATHML_SQUARE_ROOT: 88; - readonly ROLE_MATHML_ROOT: 89; - readonly ROLE_MATHML_ENCLOSED: 90; - readonly ROLE_MATHML_STYLE: 91; - readonly ROLE_MATHML_SUB: 92; - readonly ROLE_MATHML_SUP: 93; - readonly ROLE_MATHML_SUB_SUP: 94; - readonly ROLE_MATHML_UNDER: 95; - readonly ROLE_MATHML_OVER: 96; - readonly ROLE_MATHML_UNDER_OVER: 97; - readonly ROLE_MATHML_MULTISCRIPTS: 98; - readonly ROLE_MATHML_TABLE: 99; - readonly ROLE_MATHML_LABELED_ROW: 100; - readonly ROLE_MATHML_TABLE_ROW: 101; - readonly ROLE_MATHML_CELL: 102; - readonly ROLE_MATHML_ACTION: 103; - readonly ROLE_MATHML_ERROR: 104; - readonly ROLE_MATHML_STACK: 105; - readonly ROLE_MATHML_LONG_DIVISION: 106; - readonly ROLE_MATHML_STACK_GROUP: 107; - readonly ROLE_MATHML_STACK_ROW: 108; - readonly ROLE_MATHML_STACK_CARRIES: 109; - readonly ROLE_MATHML_STACK_CARRY: 110; - readonly ROLE_MATHML_STACK_LINE: 111; - readonly ROLE_RADIO_GROUP: 112; - readonly ROLE_TEXT: 113; - readonly ROLE_DETAILS: 114; - readonly ROLE_SUMMARY: 115; - readonly ROLE_LANDMARK: 116; - readonly ROLE_NAVIGATION: 117; - readonly ROLE_FOOTNOTE: 118; - readonly ROLE_ARTICLE: 119; - readonly ROLE_REGION: 120; - readonly ROLE_EDITCOMBOBOX: 121; - readonly ROLE_BLOCKQUOTE: 122; - readonly ROLE_CONTENT_DELETION: 123; - readonly ROLE_CONTENT_INSERTION: 124; - readonly ROLE_FORM_LANDMARK: 125; - readonly ROLE_MARK: 126; - readonly ROLE_SUGGESTION: 127; - readonly ROLE_COMMENT: 128; - readonly ROLE_CODE: 129; - readonly ROLE_TIME_EDITOR: 130; - readonly ROLE_LISTITEM_MARKER: 131; - readonly ROLE_METER: 132; - readonly ROLE_SUBSCRIPT: 133; - readonly ROLE_SUPERSCRIPT: 134; - readonly ROLE_EMPHASIS: 135; - readonly ROLE_STRONG: 136; - readonly ROLE_TIME: 137; - readonly ROLE_GRID: 138; - readonly ROLE_ROWGROUP: 139; - readonly ROLE_SEARCHBOX: 140; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleScrollingEvent.idl - -interface nsIAccessibleScrollingEvent extends nsIAccessibleEvent { - readonly scrollX: u32; - readonly scrollY: u32; - readonly maxScrollX: u32; - readonly maxScrollY: u32; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleSelectable.idl - -interface nsIAccessibleSelectable extends nsISupports { - readonly selectedItems: nsIArray; - readonly selectedItemCount: u32; - getSelectedItemAt(index: u32): nsIAccessible; - isItemSelected(index: u32): boolean; - addItemToSelection(index: u32): void; - removeItemFromSelection(index: u32): void; - selectAll(): boolean; - unselectAll(): void; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleStateChangeEvent.idl - -interface nsIAccessibleStateChangeEvent extends nsIAccessibleEvent { - readonly state: u32; - readonly isExtraState: boolean; - readonly isEnabled: boolean; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleStates.idl - -interface nsIAccessibleStates extends nsISupports { - readonly STATE_UNAVAILABLE: 1; - readonly STATE_SELECTED: 2; - readonly STATE_FOCUSED: 4; - readonly STATE_PRESSED: 8; - readonly STATE_CHECKED: 16; - readonly STATE_MIXED: 32; - readonly STATE_READONLY: 64; - readonly STATE_HOTTRACKED: 128; - readonly STATE_DEFAULT: 256; - readonly STATE_EXPANDED: 512; - readonly STATE_COLLAPSED: 1024; - readonly STATE_BUSY: 2048; - readonly STATE_FLOATING: 4096; - readonly STATE_MARQUEED: 8192; - readonly STATE_ANIMATED: 16384; - readonly STATE_INVISIBLE: 32768; - readonly STATE_OFFSCREEN: 65536; - readonly STATE_SIZEABLE: 131072; - readonly STATE_MOVEABLE: 262144; - readonly STATE_SELFVOICING: 524288; - readonly STATE_FOCUSABLE: 1048576; - readonly STATE_SELECTABLE: 2097152; - readonly STATE_LINKED: 4194304; - readonly STATE_TRAVERSED: 8388608; - readonly STATE_MULTISELECTABLE: 16777216; - readonly STATE_EXTSELECTABLE: 33554432; - readonly STATE_ALERT_LOW: 67108864; - readonly STATE_ALERT_MEDIUM: 134217728; - readonly STATE_ALERT_HIGH: 268435456; - readonly STATE_PROTECTED: 536870912; - readonly STATE_HASPOPUP: 1073741824; - readonly STATE_REQUIRED: 67108864; - readonly STATE_IMPORTANT: 134217728; - readonly STATE_INVALID: 268435456; - readonly STATE_CHECKABLE: 8192; - readonly EXT_STATE_SUPPORTS_AUTOCOMPLETION: 1; - readonly EXT_STATE_DEFUNCT: 2; - readonly EXT_STATE_SELECTABLE_TEXT: 4; - readonly EXT_STATE_EDITABLE: 8; - readonly EXT_STATE_ACTIVE: 16; - readonly EXT_STATE_MODAL: 32; - readonly EXT_STATE_MULTI_LINE: 64; - readonly EXT_STATE_HORIZONTAL: 128; - readonly EXT_STATE_OPAQUE: 256; - readonly EXT_STATE_SINGLE_LINE: 512; - readonly EXT_STATE_TRANSIENT: 1024; - readonly EXT_STATE_VERTICAL: 2048; - readonly EXT_STATE_STALE: 4096; - readonly EXT_STATE_ENABLED: 8192; - readonly EXT_STATE_SENSITIVE: 16384; - readonly EXT_STATE_EXPANDABLE: 32768; - readonly EXT_STATE_PINNED: 65536; - readonly EXT_STATE_CURRENT: 131072; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTable.idl - -interface nsIAccessibleTable extends nsISupports { - readonly caption: nsIAccessible; - readonly summary: string; - readonly columnCount: i32; - readonly rowCount: i32; - getCellAt(rowIndex: i32, columnIndex: i32): nsIAccessible; - getCellIndexAt(rowIndex: i32, columnIndex: i32): i32; - getColumnIndexAt(cellIndex: i32): i32; - getRowIndexAt(cellIndex: i32): i32; - getRowAndColumnIndicesAt(cellIndex: i32, rowIndex: OutParam, columnIndex: OutParam): void; - getColumnExtentAt(row: i32, column: i32): i32; - getRowExtentAt(row: i32, column: i32): i32; - getColumnDescription(columnIndex: i32): string; - getRowDescription(rowIndex: i32): string; - isColumnSelected(columnIndex: i32): boolean; - isRowSelected(rowIndex: i32): boolean; - isCellSelected(rowIndex: i32, columnIndex: i32): boolean; - readonly selectedCellCount: u32; - readonly selectedColumnCount: u32; - readonly selectedRowCount: u32; - readonly selectedCells: nsIArray; - getSelectedCellIndices(): u32[]; - getSelectedColumnIndices(): u32[]; - getSelectedRowIndices(): u32[]; - isProbablyForLayout(): boolean; -} - -interface nsIAccessibleTableCell extends nsISupports { - readonly table: nsIAccessibleTable; - readonly columnIndex: i32; - readonly rowIndex: i32; - readonly columnExtent: i32; - readonly rowExtent: i32; - readonly columnHeaderCells: nsIArray; - readonly rowHeaderCells: nsIArray; - isSelected(): boolean; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTableChangeEvent.idl - -interface nsIAccessibleTableChangeEvent extends nsIAccessibleEvent { - readonly rowOrColIndex: i32; - readonly RowsOrColsCount: i32; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleText.idl - -interface nsIAccessibleText extends nsISupports { - readonly TEXT_OFFSET_END_OF_TEXT: -1; - readonly TEXT_OFFSET_CARET: -2; - readonly BOUNDARY_CHAR: 0; - readonly BOUNDARY_WORD_START: 1; - readonly BOUNDARY_WORD_END: 2; - readonly BOUNDARY_SENTENCE_START: 3; - readonly BOUNDARY_SENTENCE_END: 4; - readonly BOUNDARY_LINE_START: 5; - readonly BOUNDARY_LINE_END: 6; - readonly BOUNDARY_PARAGRAPH: 7; - readonly BOUNDARY_CLUSTER: 8; - - caretOffset: i32; - getCaretRect(x: OutParam, y: OutParam, width: OutParam, height: OutParam): void; - readonly characterCount: i32; - readonly selectionCount: i32; - getText(startOffset: i32, endOffset: i32): string; - getTextAfterOffset(offset: i32, boundaryType: AccessibleTextBoundary, startOffset: OutParam, endOffset: OutParam): string; - getTextAtOffset(offset: i32, boundaryType: AccessibleTextBoundary, startOffset: OutParam, endOffset: OutParam): string; - getTextBeforeOffset(offset: i32, boundaryType: AccessibleTextBoundary, startOffset: OutParam, endOffset: OutParam): string; - getCharacterAtOffset(offset: i32): string; - getTextAttributes(includeDefAttrs: boolean, offset: i32, rangeStartOffset: OutParam, rangeEndOffset: OutParam): nsIPersistentProperties; - readonly defaultTextAttributes: nsIPersistentProperties; - getCharacterExtents(offset: i32, x: OutParam, y: OutParam, width: OutParam, height: OutParam, coordType: u32): void; - getRangeExtents(startOffset: i32, endOffset: i32, x: OutParam, y: OutParam, width: OutParam, height: OutParam, coordType: u32): void; - getOffsetAtPoint(x: i32, y: i32, coordType: u32): i32; - getSelectionBounds(selectionNum: i32, startOffset: OutParam, endOffset: OutParam): void; - setSelectionBounds(selectionNum: i32, startOffset: i32, endOffset: i32): void; - addSelection(startOffset: i32, endOffset: i32): void; - removeSelection(selectionNum: i32): void; - scrollSubstringTo(startIndex: i32, endIndex: i32, scrollType: u32): void; - scrollSubstringToPoint(startIndex: i32, endIndex: i32, coordinateType: u32, x: i32, y: i32): void; - readonly selectionRanges: nsIArray; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextChangeEvent.idl - -interface nsIAccessibleTextChangeEvent extends nsIAccessibleEvent { - readonly start: i32; - readonly length: u32; - readonly isInserted: boolean; - readonly modifiedText: string; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextLeafRange.idl - -interface nsIAccessibleTextLeafPoint extends nsISupports { - readonly DIRECTION_NEXT: 0; - readonly DIRECTION_PREVIOUS: 1; - readonly BOUNDARY_FLAG_DEFAULT: 0; - readonly BOUNDARY_FLAG_INCLUDE_ORIGIN: 1; - readonly BOUNDARY_FLAG_STOP_IN_EDITABLE: 2; - readonly BOUNDARY_FLAG_SKIP_LIST_ITEM_MARKER: 4; - - accessible: nsIAccessible; - offset: i32; - findBoundary(aBoundaryType: AccessibleTextBoundary, aDirection: u32, aFlags: u32): nsIAccessibleTextLeafPoint; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextRange.idl - -interface nsIAccessibleTextRange extends nsISupports { - readonly EndPoint_Start: 1; - readonly EndPoint_End: 2; - readonly AlignToTop: 0; - readonly AlignToBottom: 1; - - readonly startContainer: nsIAccessibleText; - readonly startOffset: i32; - readonly endContainer: nsIAccessibleText; - readonly endOffset: i32; - readonly container: nsIAccessible; - compare(aOtherRange: nsIAccessibleTextRange): boolean; - compareEndPoints(aEndPoint: u32, aOtherRange: nsIAccessibleTextRange, aOtherRangeEndPoint: u32): i32; - crop(aContainer: nsIAccessible): boolean; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTextSelectionChangeEvent.idl - -interface nsIAccessibleTextSelectionChangeEvent extends nsIAccessibleEvent { - readonly selectionRanges: nsIArray; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleTypes.idl - -interface nsIAccessibleScrollType extends nsISupports { - readonly SCROLL_TYPE_TOP_LEFT: 0; - readonly SCROLL_TYPE_BOTTOM_RIGHT: 1; - readonly SCROLL_TYPE_TOP_EDGE: 2; - readonly SCROLL_TYPE_BOTTOM_EDGE: 3; - readonly SCROLL_TYPE_LEFT_EDGE: 4; - readonly SCROLL_TYPE_RIGHT_EDGE: 5; - readonly SCROLL_TYPE_ANYWHERE: 6; -} - -interface nsIAccessibleCoordinateType extends nsISupports { - readonly COORDTYPE_SCREEN_RELATIVE: 0; - readonly COORDTYPE_WINDOW_RELATIVE: 1; - readonly COORDTYPE_PARENT_RELATIVE: 2; -} - -// https://searchfox.org/mozilla-central/source/accessible/interfaces/nsIAccessibleValue.idl - -interface nsIAccessibleValue extends nsISupports { - readonly maximumValue: double; - readonly minimumValue: double; - currentValue: double; - readonly minimumIncrement: double; -} - -// https://searchfox.org/mozilla-central/source/toolkit/components/reputationservice/nsIApplicationReputation.idl - -interface nsIApplicationReputationService extends nsISupports { - readonly VERDICT_SAFE: 0; - readonly VERDICT_DANGEROUS: 1; - readonly VERDICT_UNCOMMON: 2; - readonly VERDICT_POTENTIALLY_UNWANTED: 3; - readonly VERDICT_DANGEROUS_HOST: 4; - - queryReputation(aQuery: nsIApplicationReputationQuery, aCallback: nsIApplicationReputationCallback): void; - isBinary(aFilename: string): boolean; - isExecutable(aFilename: string): boolean; -} - -interface nsIApplicationReputationQuery extends nsISupports { - readonly sourceURI: nsIURI; - readonly referrerInfo: nsIReferrerInfo; - readonly suggestedFileName: string; - readonly fileSize: u32; - readonly sha256Hash: string; - readonly signatureInfo: u8[][][]; - readonly redirects: nsIArray; -} - -type nsIApplicationReputationCallback = Callable<{ - onComplete(aShouldBlock: boolean, aStatus: nsresult, aVerdict: u32): void; -}> - -// https://searchfox.org/mozilla-central/source/toolkit/components/bitsdownload/nsIBits.idl - -interface nsIBits extends nsISupports { - readonly ERROR_TYPE_SUCCESS: 0; - readonly ERROR_TYPE_UNKNOWN: 1; - readonly ERROR_TYPE_METHOD_THREW: 2; - readonly ERROR_TYPE_METHOD_TIMEOUT: 3; - readonly ERROR_TYPE_NULL_ARGUMENT: 4; - readonly ERROR_TYPE_INVALID_ARGUMENT: 5; - readonly ERROR_TYPE_NOT_INITIALIZED: 6; - readonly ERROR_TYPE_NO_UTF8_CONVERSION: 7; - readonly ERROR_TYPE_INVALID_GUID: 8; - readonly ERROR_TYPE_PIPE_NOT_CONNECTED: 9; - readonly ERROR_TYPE_PIPE_TIMEOUT: 10; - readonly ERROR_TYPE_PIPE_BAD_WRITE_COUNT: 11; - readonly ERROR_TYPE_PIPE_API_ERROR: 12; - readonly ERROR_TYPE_FAILED_TO_CREATE_BITS_JOB: 13; - readonly ERROR_TYPE_FAILED_TO_ADD_FILE_TO_JOB: 14; - readonly ERROR_TYPE_FAILED_TO_APPLY_BITS_JOB_SETTINGS: 15; - readonly ERROR_TYPE_FAILED_TO_RESUME_BITS_JOB: 16; - readonly ERROR_TYPE_OTHER_BITS_ERROR: 17; - readonly ERROR_TYPE_OTHER_BITS_CLIENT_ERROR: 18; - readonly ERROR_TYPE_BITS_JOB_NOT_FOUND: 19; - readonly ERROR_TYPE_FAILED_TO_GET_BITS_JOB: 20; - readonly ERROR_TYPE_FAILED_TO_SUSPEND_BITS_JOB: 21; - readonly ERROR_TYPE_FAILED_TO_COMPLETE_BITS_JOB: 22; - readonly ERROR_TYPE_PARTIALLY_COMPLETED_BITS_JOB: 23; - readonly ERROR_TYPE_FAILED_TO_CANCEL_BITS_JOB: 24; - readonly ERROR_TYPE_MISSING_RESULT_DATA: 25; - readonly ERROR_TYPE_MISSING_CALLBACK: 26; - readonly ERROR_TYPE_CALLBACK_ON_WRONG_THREAD: 27; - readonly ERROR_TYPE_MISSING_BITS_SERVICE: 28; - readonly ERROR_TYPE_BITS_SERVICE_ON_WRONG_THREAD: 29; - readonly ERROR_TYPE_MISSING_BITS_REQUEST: 30; - readonly ERROR_TYPE_BITS_REQUEST_ON_WRONG_THREAD: 31; - readonly ERROR_TYPE_MISSING_OBSERVER: 32; - readonly ERROR_TYPE_OBSERVER_ON_WRONG_THREAD: 33; - readonly ERROR_TYPE_MISSING_CONTEXT: 34; - readonly ERROR_TYPE_CONTEXT_ON_WRONG_THREAD: 35; - readonly ERROR_TYPE_FAILED_TO_START_THREAD: 36; - readonly ERROR_TYPE_FAILED_TO_CONSTRUCT_TASK_RUNNABLE: 37; - readonly ERROR_TYPE_FAILED_TO_DISPATCH_RUNNABLE: 38; - readonly ERROR_TYPE_TRANSFER_ALREADY_COMPLETE: 39; - readonly ERROR_TYPE_OPERATION_ALREADY_IN_PROGRESS: 40; - readonly ERROR_TYPE_MISSING_BITS_CLIENT: 41; - readonly ERROR_TYPE_FAILED_TO_GET_JOB_STATUS: 42; - readonly ERROR_TYPE_BITS_STATE_ERROR: 43; - readonly ERROR_TYPE_BITS_STATE_TRANSIENT_ERROR: 44; - readonly ERROR_TYPE_BITS_STATE_CANCELLED: 45; - readonly ERROR_TYPE_BITS_STATE_UNEXPECTED: 46; - readonly ERROR_TYPE_VERIFICATION_FAILURE: 47; - readonly ERROR_TYPE_ACCESS_DENIED_EXPECTED: 48; - readonly ERROR_TYPE_FAILED_TO_CONNECT_TO_BCM: 49; - readonly ERROR_TYPE_USE_AFTER_REQUEST_SHUTDOWN: 50; - readonly ERROR_TYPE_BROWSER_SHUTTING_DOWN: 51; - readonly ERROR_ACTION_UNKNOWN: 1; - readonly ERROR_ACTION_NONE: 2; - readonly ERROR_ACTION_START_DOWNLOAD: 3; - readonly ERROR_ACTION_MONITOR_DOWNLOAD: 4; - readonly ERROR_ACTION_CHANGE_MONITOR_INTERVAL: 5; - readonly ERROR_ACTION_CANCEL: 6; - readonly ERROR_ACTION_SET_PRIORITY: 7; - readonly ERROR_ACTION_COMPLETE: 8; - readonly ERROR_ACTION_SUSPEND: 9; - readonly ERROR_ACTION_RESUME: 10; - readonly ERROR_ACTION_SET_NO_PROGRESS_TIMEOUT: 11; - readonly ERROR_STAGE_UNKNOWN: 1; - readonly ERROR_STAGE_PRETASK: 2; - readonly ERROR_STAGE_COMMAND_THREAD: 3; - readonly ERROR_STAGE_AGENT_COMMUNICATION: 4; - readonly ERROR_STAGE_BITS_CLIENT: 5; - readonly ERROR_STAGE_MAIN_THREAD: 6; - readonly ERROR_STAGE_MONITOR: 7; - readonly ERROR_STAGE_VERIFICATION: 8; - readonly ERROR_CODE_TYPE_NONE: 1; - readonly ERROR_CODE_TYPE_NSRESULT: 2; - readonly ERROR_CODE_TYPE_HRESULT: 3; - readonly ERROR_CODE_TYPE_STRING: 4; - readonly ERROR_CODE_TYPE_EXCEPTION: 5; - readonly PROXY_NONE: 1; - readonly PROXY_PRECONFIG: 2; - readonly PROXY_AUTODETECT: 3; - - readonly initialized: boolean; - init(jobName: string, savePathPrefix: string, monitorTimeoutMs: u32): void; - startDownload(downloadURL: string, saveRelativePath: string, proxy: nsProxyUsage, noProgressTimeoutSecs: u32, monitorIntervalMs: u32, customHeaders: string, observer: nsIRequestObserver, context: nsISupports, callback: nsIBitsNewRequestCallback): void; - monitorDownload(id: string, monitorIntervalMs: u32, observer: nsIRequestObserver, context: nsISupports, callback: nsIBitsNewRequestCallback): void; -} - -interface nsIBitsNewRequestCallback extends nsISupports { - success(request: nsIBitsRequest): void; - failure(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage): void; - failureNsresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: nsresult): void; - failureHresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: i32): void; - failureString(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorMessage: string): void; -} - -interface nsIBitsRequest extends nsIRequest { - readonly bitsId: string; - readonly transferError: nsBitsErrorType; - changeMonitorInterval(monitorIntervalMs: u32, callback: nsIBitsCallback): void; - cancelAsync(status: nsresult, callback: nsIBitsCallback): void; - setPriorityHigh(callback: nsIBitsCallback): void; - setPriorityLow(callback: nsIBitsCallback): void; - setNoProgressTimeout(timeoutSecs: u32, callback: nsIBitsCallback): void; - complete(callback: nsIBitsCallback): void; - suspendAsync(callback: nsIBitsCallback): void; - resumeAsync(callback: nsIBitsCallback): void; -} - -interface nsIBitsCallback extends nsISupports { - success(): void; - failure(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage): void; - failureNsresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: nsresult): void; - failureHresult(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorCode: i32): void; - failureString(errorType: nsBitsErrorType, errorAction: nsBitsErrorAction, errorStage: nsBitsErrorStage, errorMessage: string): void; +// https://searchfox.org/mozilla-central/source/modules/libjar/zipwriter/nsIZipWriter.idl + +interface nsIZipWriter extends nsISupports { + readonly COMPRESSION_NONE: 0; + readonly COMPRESSION_FASTEST: 1; + readonly COMPRESSION_DEFAULT: 6; + readonly COMPRESSION_BEST: 9; + + comment: string; + readonly inQueue: boolean; + readonly file: nsIFile; + open(aFile: nsIFile, aIoFlags: i32): void; + getEntry(aZipEntry: string): nsIZipEntry; + hasEntry(aZipEntry: string): boolean; + addEntryDirectory(aZipEntry: string, aModTime: PRTime, aQueue: boolean): void; + addEntryFile(aZipEntry: string, aCompression: i32, aFile: nsIFile, aQueue: boolean): void; + addEntryChannel(aZipEntry: string, aModTime: PRTime, aCompression: i32, aChannel: nsIChannel, aQueue: boolean): void; + addEntryStream(aZipEntry: string, aModTime: PRTime, aCompression: i32, aStream: nsIInputStream, aQueue: boolean): void; + removeEntry(aZipEntry: string, aQueue: boolean): void; + processQueue(aObserver: nsIRequestObserver, aContext: nsISupports): void; + close(): void; + alignStoredFiles(aAlignSize: u16): void; } interface nsIXPCComponents_Interfaces { - mozIStorageAsyncConnection: nsJSIID; - mozIStorageAsyncStatement: nsJSIID; - mozIStorageBaseStatement: nsJSIID; - mozIStorageBindingParams: nsJSIID; - mozIStorageBindingParamsArray: nsJSIID; - mozIStorageCompletionCallback: nsJSIID; - mozIStorageConnection: nsJSIID; - mozIStorageError: nsJSIID; - mozIStorageFunction: nsJSIID; - mozIStoragePendingStatement: nsJSIID; - mozIStorageProgressHandler: nsJSIID; - mozIStorageResultSet: nsJSIID; - mozIStorageRow: nsJSIID; - mozIStorageService: nsJSIID; - mozIStorageStatement: nsJSIID; - mozIStorageStatementCallback: nsJSIID; - mozIStorageVacuumParticipant: nsJSIID; - mozIStorageValueArray: nsJSIID; - nsIRemoteService: nsJSIID; - nsIContentHandler: nsJSIID; - nsIDocumentLoader: nsJSIID; - nsITransfer: nsJSIID; - nsIURIContentListener: nsJSIID; - nsIURILoader: nsJSIID; - nsIWebProgress: nsJSIID; - nsIWebProgressListener: nsJSIID; - nsIWebProgressListener2: nsJSIID; - nsIMIMEHeaderParam: nsJSIID; - nsIHandlerInfo: nsJSIID; - nsIMIMEInfo: nsJSIID; - nsIHandlerApp: nsJSIID; - nsILocalHandlerApp: nsJSIID; - nsIWebHandlerApp: nsJSIID; - nsIDBusHandlerApp: nsJSIID; - nsIMIMEService: nsJSIID; - nsICookie: nsJSIID; - nsICookieJarSettings: nsJSIID; - nsICookieManager: nsJSIID; - nsICookieNotification: nsJSIID; - nsICookiePermission: nsJSIID; - nsICookieTransactionCallback: nsJSIID; - nsICookieService: nsJSIID; - nsIThirdPartyCookieBlockingExceptionListService: nsJSIID; - nsIThirdPartyCookieExceptionEntry: nsJSIID; - nsIAsyncShutdownBlocker: nsJSIID; - nsIAsyncShutdownClient: nsJSIID; - nsIAsyncShutdownCompletionCallback: nsJSIID; - nsIAsyncShutdownBarrier: nsJSIID; - nsIAsyncShutdownService: nsJSIID; - nsITerminatorTest: nsJSIID; - nsIWebBrowser: nsJSIID; - nsIWebBrowserChrome: nsJSIID; - nsIWebBrowserPrint: nsJSIID; - nsIBaseWindow: nsJSIID; - nsIBidiKeyboard: nsJSIID; - nsIAsyncSetClipboardData: nsJSIID; - nsIAsyncClipboardRequestCallback: nsJSIID; - nsIClipboardDataSnapshot: nsJSIID; - nsIClipboardGetDataSnapshotCallback: nsJSIID; - nsIClipboard: nsJSIID; - nsIClipboardHelper: nsJSIID; - nsIClipboardOwner: nsJSIID; - nsIColorPickerShownCallback: nsJSIID; - nsIColorPicker: nsJSIID; - nsIDisplayInfo: nsJSIID; - nsIDragService: nsJSIID; - nsIDragSession: nsJSIID; - nsIFilePicker: nsJSIID; - nsIFilePickerShownCallback: nsJSIID; - nsIFormatConverter: nsJSIID; - nsIGfxInfo: nsJSIID; - nsIGfxInfoDebug: nsJSIID; - nsIMacDockSupport: nsJSIID; - nsIMacFinderProgressCanceledCallback: nsJSIID; - nsIMacFinderProgress: nsJSIID; - nsIMacSharingService: nsJSIID; - nsIMacUserActivityUpdater: nsJSIID; - nsITrashAppCallback: nsJSIID; - nsIMacWebAppUtils: nsJSIID; - nsIMockDragServiceController: nsJSIID; - nsIPaper: nsJSIID; - nsIPaperMargin: nsJSIID; - nsIPrintDialogService: nsJSIID; - nsIPrintSettings: nsJSIID; - nsIPrintSettingsService: nsJSIID; - nsIPrinterInfo: nsJSIID; - nsIPrinter: nsJSIID; - nsIPrinterList: nsJSIID; - nsIScreen: nsJSIID; - nsIScreenManager: nsJSIID; - nsISharePicker: nsJSIID; - nsISound: nsJSIID; - nsIStandaloneNativeMenu: nsJSIID; - nsISystemStatusBar: nsJSIID; - nsITaskbarProgress: nsJSIID; - nsITouchBarHelper: nsJSIID; - nsITouchBarInputCallback: nsJSIID; - nsITouchBarInput: nsJSIID; - nsITouchBarUpdater: nsJSIID; - nsIFlavorDataProvider: nsJSIID; - nsITransferable: nsJSIID; - nsIUserIdleService: nsJSIID; - nsIUserIdleServiceInternal: nsJSIID; - nsIAboutModule: nsJSIID; - txIEXSLTFunctions: nsJSIID; - nsICredentialParameters: nsJSIID; - nsIWebAuthnAutoFillEntry: nsJSIID; - nsIWebAuthnService: nsJSIID; - imgICache: nsJSIID; - imgIContainer: nsJSIID; - imgIContainerDebug: nsJSIID; - imgIEncoder: nsJSIID; - imgILoader: nsJSIID; - imgINotificationObserver: nsJSIID; - imgIRequest: nsJSIID; - imgIScriptedNotificationObserver: nsJSIID; - imgITools: nsJSIID; - imgIContainerCallback: nsJSIID; - nsIMozIconURI: nsJSIID; - nsISocketProvider: nsJSIID; - nsISocketProviderService: nsJSIID; - nsISDBCallback: nsJSIID; - nsISDBCloseCallback: nsJSIID; - nsISDBConnection: nsJSIID; - nsISDBRequest: nsJSIID; - nsISDBResult: nsJSIID; - nsICaptivePortalCallback: nsJSIID; - nsICaptivePortalDetector: nsJSIID; - IPeerConnectionObserver: nsJSIID; - IPeerConnection: nsJSIID; - nsIEventListenerChange: nsJSIID; - nsIListenerChangeListener: nsJSIID; - nsIEventListenerInfo: nsJSIID; - nsIEventListenerService: nsJSIID; - nsIWebTransport: nsJSIID; - WebTransportSessionEventListener: nsJSIID; - nsIWebTransportStreamCallback: nsJSIID; - nsIWebTransportHash: nsJSIID; - nsIWebTransportSendStreamStats: nsJSIID; - nsIWebTransportReceiveStreamStats: nsJSIID; - nsIWebTransportStreamStatsCallback: nsJSIID; - nsIWebTransportReceiveStream: nsJSIID; - nsIWebTransportSendStream: nsJSIID; - nsIWebTransportBidirectionalStream: nsJSIID; - nsIUtilityProcessTest: nsJSIID; - nsICacheEntry: nsJSIID; - nsICacheEntryMetaDataVisitor: nsJSIID; - nsICacheEntryDoomCallback: nsJSIID; - nsICacheEntryOpenCallback: nsJSIID; - nsICachePurgeLock: nsJSIID; - nsICacheStorage: nsJSIID; - nsICacheStorageService: nsJSIID; - nsICacheStorageConsumptionObserver: nsJSIID; - nsICacheStorageVisitor: nsJSIID; - nsICacheTesting: nsJSIID; - nsIFind: nsJSIID; - nsIFindService: nsJSIID; - nsIWebBrowserFind: nsJSIID; - nsIWebBrowserFindInFrames: nsJSIID; - nsITabUnloader: nsJSIID; - nsIAvailableMemoryWatcherBase: nsJSIID; - nsIConsoleListener: nsJSIID; - nsIConsoleMessage: nsJSIID; - nsIConsoleService: nsJSIID; - nsICycleCollectorHandler: nsJSIID; - nsICycleCollectorLogSink: nsJSIID; - nsICycleCollectorListener: nsJSIID; - nsIDebug2: nsJSIID; - nsIStackFrame: nsJSIID; - nsIException: nsJSIID; - nsIInterfaceRequestor: nsJSIID; - nsIMacPreferencesReader: nsJSIID; - nsIFinishDumpingCallback: nsJSIID; - nsIDumpGCAndCCLogsCallback: nsJSIID; - nsIMemoryInfoDumper: nsJSIID; - nsIHandleReportCallback: nsJSIID; - nsIMemoryReporter: nsJSIID; - nsIFinishReportingCallback: nsJSIID; - nsIHeapAllocatedCallback: nsJSIID; - nsIMemoryReporterManager: nsJSIID; - nsISupports: nsJSIID; - nsIUUIDGenerator: nsJSIID; - nsIVersionComparator: nsJSIID; - nsIWeakReference: nsJSIID; - nsISupportsWeakReference: nsJSIID; - nsIXULStore: nsJSIID; - nsITransaction: nsJSIID; - nsITransactionManager: nsJSIID; - nsIDataChannel: nsJSIID; - nsIBinaryHttpRequest: nsJSIID; - nsIBinaryHttpResponse: nsJSIID; - nsIBinaryHttp: nsJSIID; - nsIEarlyHintObserver: nsJSIID; - nsIHttpActivityObserver: nsJSIID; - nsIHttpActivityDistributor: nsJSIID; - nsIHttpAuthManager: nsJSIID; - nsIHttpChannel: nsJSIID; - nsIHttpUpgradeListener: nsJSIID; - nsIHttpChannelInternal: nsJSIID; - nsIHttpHeaderVisitor: nsJSIID; - nsIHttpProtocolHandler: nsJSIID; - nsINetworkErrorLogging: nsJSIID; - nsIObliviousHttpClientResponse: nsJSIID; - nsIObliviousHttpClientRequest: nsJSIID; - nsIObliviousHttpServerResponse: nsJSIID; - nsIObliviousHttpServer: nsJSIID; - nsIObliviousHttp: nsJSIID; - nsIObliviousHttpService: nsJSIID; - nsIObliviousHttpChannel: nsJSIID; - nsIRaceCacheWithNetwork: nsJSIID; - nsIReplacedHttpResponse: nsJSIID; - nsIWellKnownOpportunisticUtils: nsJSIID; - nsICompressConvStats: nsJSIID; - nsIPaymentResponseData: nsJSIID; - nsIGeneralResponseData: nsJSIID; - nsIBasicCardResponseData: nsJSIID; - nsIPaymentActionResponse: nsJSIID; - nsIPaymentCanMakeActionResponse: nsJSIID; - nsIPaymentShowActionResponse: nsJSIID; - nsIPaymentAbortActionResponse: nsJSIID; - nsIPaymentCompleteActionResponse: nsJSIID; - nsIMethodChangeDetails: nsJSIID; - nsIGeneralChangeDetails: nsJSIID; - nsIBasicCardChangeDetails: nsJSIID; - nsIPaymentAddress: nsJSIID; - nsIPaymentMethodData: nsJSIID; - nsIPaymentCurrencyAmount: nsJSIID; - nsIPaymentItem: nsJSIID; - nsIPaymentDetailsModifier: nsJSIID; - nsIPaymentShippingOption: nsJSIID; - nsIPaymentDetails: nsJSIID; - nsIPaymentOptions: nsJSIID; - nsIPaymentRequest: nsJSIID; - nsIPaymentRequestService: nsJSIID; - nsIPaymentUIService: nsJSIID; - nsIHttpServer: nsJSIID; - nsIHttpServerStoppedCallback: nsJSIID; - nsIHttpServerIdentity: nsJSIID; - nsIHttpRequestHandler: nsJSIID; - nsIHttpRequest: nsJSIID; - nsIHttpResponse: nsJSIID; - nsIZipWriter: nsJSIID; - nsIPrivateAttributionService: nsJSIID; - nsIEnvironment: nsJSIID; - nsIEventTarget: nsJSIID; - nsINamed: nsJSIID; - nsIProcess: nsJSIID; - nsIRunnable: nsJSIID; - nsIRunnablePriority: nsJSIID; - nsISerialEventTarget: nsJSIID; - nsISupportsPriority: nsJSIID; - nsIThread: nsJSIID; - nsINestedEventLoopCondition: nsJSIID; - nsIThreadManager: nsJSIID; - nsIThreadShutdown: nsJSIID; - nsITimerCallback: nsJSIID; - nsITimer: nsJSIID; - nsITimerManager: nsJSIID; - nsIBTPRemoteExceptionList: nsJSIID; - nsIBounceTrackingMapEntry: nsJSIID; - nsIBounceTrackingPurgeEntry: nsJSIID; - nsIBounceTrackingProtection: nsJSIID; - nsIContentBlockingAllowList: nsJSIID; - nsIPartitioningExceptionListObserver: nsJSIID; - nsIPartitioningExceptionListService: nsJSIID; - nsIPurgeTrackerService: nsJSIID; - nsITrackingDBService: nsJSIID; - nsIURLDecorationAnnotationsService: nsJSIID; - nsIURLQueryStringStripper: nsJSIID; - nsIURLQueryStrippingListObserver: nsJSIID; - nsIURLQueryStrippingListService: nsJSIID; - mozIGeckoMediaPluginChromeService: nsJSIID; - mozIGeckoMediaPluginService: nsJSIID; - nsIPrefBranch: nsJSIID; - nsIPrefLocalizedString: nsJSIID; - nsIPrefStatsCallback: nsJSIID; - nsIPrefObserver: nsJSIID; - nsIPrefService: nsJSIID; - nsIRelativeFilePref: nsJSIID; - nsIStartupCacheInfo: nsJSIID; - nsITreeSelection: nsJSIID; - nsITreeView: nsJSIID; - nsICategoryEntry: nsJSIID; - nsICategoryManager: nsJSIID; - nsIClassInfo: nsJSIID; - nsIComponentManager: nsJSIID; - nsIComponentRegistrar: nsJSIID; - nsIFactory: nsJSIID; - nsIServiceManager: nsJSIID; - nsIOSPermissionRequest: nsJSIID; - mozIMozIntl: nsJSIID; - mozIMozIntlHelper: nsJSIID; - nsIBackgroundTasks: nsJSIID; - nsIBackgroundTasksManager: nsJSIID; - nsIBackgroundTasksRunner: nsJSIID; - nsIDOMGeoPosition: nsJSIID; - nsIDOMGeoPositionCallback: nsJSIID; - nsIDOMGeoPositionCoords: nsJSIID; - nsIDOMGeoPositionErrorCallback: nsJSIID; - nsIBrowserHandler: nsJSIID; - mozIVisitInfo: nsJSIID; - mozIPlaceInfo: nsJSIID; - mozIVisitInfoCallback: nsJSIID; - mozIVisitedStatusCallback: nsJSIID; - mozIAsyncHistory: nsJSIID; - mozIPlacesAutoComplete: nsJSIID; - mozIPlacesPendingOperation: nsJSIID; - mozISyncedBookmarksMirrorProgressListener: nsJSIID; - mozISyncedBookmarksMirrorCallback: nsJSIID; - mozISyncedBookmarksMirrorLogger: nsJSIID; - mozISyncedBookmarksMerger: nsJSIID; - nsIFaviconService: nsJSIID; - nsIFaviconDataCallback: nsJSIID; - nsINavBookmarksService: nsJSIID; - nsINavHistoryResultNode: nsJSIID; - nsINavHistoryContainerResultNode: nsJSIID; - nsINavHistoryQueryResultNode: nsJSIID; - nsINavHistoryResultObserver: nsJSIID; - nsINavHistoryResult: nsJSIID; - nsINavHistoryQuery: nsJSIID; - nsINavHistoryQueryOptions: nsJSIID; - nsINavHistoryService: nsJSIID; - nsIPlacesPreviewsHelperService: nsJSIID; - nsITaggingService: nsJSIID; - nsIQuotaArtificialFailure: nsJSIID; - nsIQuotaUsageCallback: nsJSIID; - nsIQuotaCallback: nsJSIID; - nsIQuotaManagerService: nsJSIID; - nsIQuotaManagerServiceInternal: nsJSIID; - nsIQuotaRequestBase: nsJSIID; - nsIQuotaUsageRequest: nsJSIID; - nsIQuotaRequest: nsJSIID; - nsIQuotaFullOriginMetadataResult: nsJSIID; - nsIQuotaUsageResult: nsJSIID; - nsIQuotaOriginUsageResult: nsJSIID; - nsIQuotaEstimateResult: nsJSIID; - nsIQuotaUtilsService: nsJSIID; - nsIProfileStartup: nsJSIID; - nsIProfileMigrator: nsJSIID; - nsIProfileUnlocker: nsJSIID; - nsIProfileLock: nsJSIID; - nsIToolkitProfile: nsJSIID; - nsIToolkitProfileService: nsJSIID; - nsIProfilerStartParams: nsJSIID; - nsIProfiler: nsJSIID; - nsIFileChannel: nsJSIID; - nsIFileProtocolHandler: nsJSIID; + nsIBits: nsJSIID; + nsIBitsNewRequestCallback: nsJSIID; + nsIBitsRequest: nsJSIID; + nsIBitsCallback: nsJSIID; + nsIAccessibilityService: nsJSIID; + nsIAccessible: nsJSIID; + nsIAccessibleAnnouncementEvent: nsJSIID; + nsIAccessibleApplication: nsJSIID; + nsIAccessibleCaretMoveEvent: nsJSIID; + nsIAccessibleDocument: nsJSIID; + nsIAccessibleEditableText: nsJSIID; + nsIAccessibleEvent: nsJSIID; + nsIAccessibleHideEvent: nsJSIID; + nsIAccessibleHyperLink: nsJSIID; + nsIAccessibleHyperText: nsJSIID; + nsIAccessibleImage: nsJSIID; + nsIAccessibleObjectAttributeChangedEvent: nsJSIID; + nsIAccessiblePivot: nsJSIID; + nsIAccessibleTraversalRule: nsJSIID; + nsIAccessibleRelation: nsJSIID; + nsIAccessibleRole: nsJSIID; + nsIAccessibleScrollingEvent: nsJSIID; + nsIAccessibleSelectable: nsJSIID; + nsIAccessibleStateChangeEvent: nsJSIID; + nsIAccessibleStates: nsJSIID; + nsIAccessibleTable: nsJSIID; + nsIAccessibleTableCell: nsJSIID; + nsIAccessibleTableChangeEvent: nsJSIID; + nsIAccessibleText: nsJSIID; + nsIAccessibleTextChangeEvent: nsJSIID; + nsIAccessibleTextLeafPoint: nsJSIID; + nsIAccessibleTextRange: nsJSIID; + nsIAccessibleTextSelectionChangeEvent: nsJSIID; + nsIAccessibleScrollType: nsJSIID; + nsIAccessibleCoordinateType: nsJSIID; + nsIAccessibleValue: nsJSIID; nsIAlertNotificationImageListener: nsJSIID; nsIAlertAction: nsJSIID; nsIAlertNotification: nsJSIID; @@ -15577,74 +15147,71 @@ interface nsIXPCComponents_Interfaces { nsIAlertsDoNotDisturb: nsJSIID; nsIAlertsIconData: nsJSIID; nsIAlertsIconURI: nsJSIID; - nsIScriptErrorNote: nsJSIID; - nsIScriptError: nsJSIID; - nsIIDBPermissionsRequest: nsJSIID; - nsIIndexedDatabaseManager: nsJSIID; - nsIResProtocolHandler: nsJSIID; - nsISubstitutingProtocolHandler: nsJSIID; - nsIFontEnumerator: nsJSIID; - nsIDOMMozWakeLockListener: nsJSIID; - nsIPowerManagerService: nsJSIID; - nsIWakeLock: nsJSIID; - nsIMacShellService: nsJSIID; - nsIShellService: nsJSIID; - nsIWebBrowserPersist: nsJSIID; - nsIWebBrowserPersistURIMap: nsJSIID; - nsIWebBrowserPersistDocument: nsJSIID; - nsIWebBrowserPersistResourceVisitor: nsJSIID; - nsIWebBrowserPersistWriteCompletion: nsJSIID; - nsIWebBrowserPersistDocumentReceiver: nsJSIID; - nsIUrlClassifierBlockedChannel: nsJSIID; - nsIChannelClassifierService: nsJSIID; - nsIURIClassifierCallback: nsJSIID; - nsIURIClassifier: nsJSIID; - nsIUrlClassifierExceptionListObserver: nsJSIID; - nsIUrlClassifierExceptionListService: nsJSIID; - nsIUrlClassifierFeature: nsJSIID; - nsIUrlClassifierFeatureResult: nsJSIID; - nsIUrlClassifierFeatureCallback: nsJSIID; - IUrlClassifierUITelemetry: nsJSIID; - nsIUrlClassifierCallback: nsJSIID; - nsIUrlClassifierUpdateObserver: nsJSIID; - nsIUrlClassifierDBService: nsJSIID; - nsIFullHashMatch: nsJSIID; - nsIUrlClassifierHashCompleterCallback: nsJSIID; - nsIUrlClassifierHashCompleter: nsJSIID; - nsIUrlClassifierPositiveCacheEntry: nsJSIID; - nsIUrlClassifierCacheEntry: nsJSIID; - nsIUrlClassifierCacheInfo: nsJSIID; - nsIUrlClassifierGetCacheCallback: nsJSIID; - nsIUrlClassifierInfo: nsJSIID; - nsIUrlClassifierPrefixSet: nsJSIID; - nsIUrlClassifierRemoteSettingsService: nsJSIID; - nsIUrlClassifierStreamUpdater: nsJSIID; - nsIUrlClassifierParseFindFullHashCallback: nsJSIID; - nsIUrlClassifierUtils: nsJSIID; - nsIUrlListManager: nsJSIID; - nsIXPCTestObjectReadOnly: nsJSIID; - nsIXPCTestObjectReadWrite: nsJSIID; - nsIXPCTestBug809674: nsJSIID; - nsIXPCTestCEnums: nsJSIID; - nsIXPCTestInterfaceA: nsJSIID; - nsIXPCTestInterfaceB: nsJSIID; - nsIXPCTestInterfaceC: nsJSIID; - nsIXPCTestParams: nsJSIID; - nsIXPCTestReturnCodeParent: nsJSIID; - nsIXPCTestReturnCodeChild: nsJSIID; - nsIXPCTestFunctionInterface: nsJSIID; - nsIXPCTestUtils: nsJSIID; - nsIXPCTestTypeScript: nsJSIID; + nsIAppShellService: nsJSIID; + nsIAppWindow: nsJSIID; + nsIWindowMediator: nsJSIID; + nsIWindowMediatorListener: nsJSIID; + nsIWindowlessBrowser: nsJSIID; + nsIXULBrowserWindow: nsJSIID; nsIAppStartup: nsJSIID; - nsILoginInfo: nsJSIID; - nsILoginSearchCallback: nsJSIID; - nsILoginManager: nsJSIID; - nsILoginManagerAuthPrompter: nsJSIID; - nsILoginManagerCrypto: nsJSIID; - nsILoginManagerPrompter: nsJSIID; - nsILoginMetaInfo: nsJSIID; - nsIPromptInstance: nsJSIID; - nsIEnterprisePolicies: nsJSIID; + nsIAutoCompleteController: nsJSIID; + nsIAutoCompleteInput: nsJSIID; + nsIAutoCompletePopup: nsJSIID; + nsIAutoCompleteResult: nsJSIID; + nsIAutoCompleteSearch: nsJSIID; + nsIAutoCompleteObserver: nsJSIID; + nsIAutoCompleteSimpleResult: nsJSIID; + nsIAutoCompleteSimpleResultListener: nsJSIID; + nsIAutoCompleteSimpleSearch: nsJSIID; + nsIAutoplay: nsJSIID; + nsIHangDetails: nsJSIID; + nsIAboutNewTabService: nsJSIID; + nsIBrowserHandler: nsJSIID; + nsIAddonPolicyService: nsJSIID; + nsIAddonContentPolicy: nsJSIID; + nsIDomainPolicy: nsJSIID; + nsIDomainSet: nsJSIID; + nsIPrincipal: nsJSIID; + nsIScriptSecurityManager: nsJSIID; + nsICaptivePortalCallback: nsJSIID; + nsICaptivePortalDetector: nsJSIID; + nsICascadeFilter: nsJSIID; + nsIChromeRegistry: nsJSIID; + nsIXULChromeRegistry: nsJSIID; + nsIToolkitChromeRegistry: nsJSIID; + nsICommandManager: nsJSIID; + nsICommandParams: nsJSIID; + nsIControllerCommand: nsJSIID; + nsIControllerCommandTable: nsJSIID; + nsIControllerContext: nsJSIID; + nsICommandLine: nsJSIID; + nsICommandLineHandler: nsJSIID; + nsICommandLineValidator: nsJSIID; + nsIEditingSession: nsJSIID; + nsIEventListenerChange: nsJSIID; + nsIListenerChangeListener: nsJSIID; + nsIEventListenerInfo: nsJSIID; + nsIEventListenerService: nsJSIID; + mozIGeckoMediaPluginChromeService: nsJSIID; + mozIGeckoMediaPluginService: nsJSIID; + nsIDocShell: nsJSIID; + nsIDocShellTreeItem: nsJSIID; + nsIDocShellTreeOwner: nsJSIID; + nsIDocumentLoaderFactory: nsJSIID; + nsIDocumentViewer: nsJSIID; + nsIDocumentViewerEdit: nsJSIID; + nsILoadContext: nsJSIID; + nsILoadURIDelegate: nsJSIID; + nsIPrivacyTransitionObserver: nsJSIID; + nsIReflowObserver: nsJSIID; + nsIRefreshURI: nsJSIID; + nsITooltipListener: nsJSIID; + nsITooltipTextProvider: nsJSIID; + nsIURIFixupInfo: nsJSIID; + nsIURIFixup: nsJSIID; + nsIWebNavigation: nsJSIID; + nsIWebNavigationInfo: nsJSIID; + nsIWebPageDescriptor: nsJSIID; mozIDOMWindow: nsJSIID; mozIDOMWindowProxy: nsJSIID; nsIContentPolicy: nsJSIID; @@ -15667,9 +15234,10 @@ interface nsIXPCComponents_Interfaces { mozIRemoteLazyInputStream: nsJSIID; nsIDOMProcessChild: nsJSIID; nsIDOMProcessParent: nsJSIID; + nsIContentParentKeepAlive: nsJSIID; nsIHangReport: nsJSIID; nsILoginDetectionService: nsJSIID; - mozISandboxSettings: nsJSIID; + nsISuspendedTypes: nsJSIID; nsIBrowser: nsJSIID; nsIBrowserChild: nsJSIID; nsIOpenURIInFrameParams: nsJSIID; @@ -15702,100 +15270,183 @@ interface nsIXPCComponents_Interfaces { nsITextInputProcessor: nsJSIID; nsITextInputProcessorNotification: nsJSIID; nsITextInputProcessorCallback: nsJSIID; - nsIStringBundle: nsJSIID; - nsIStringBundleService: nsJSIID; - nsIEdgeMigrationUtils: nsJSIID; - nsIKeychainMigrationUtils: nsJSIID; - nsIBlocklistService: nsJSIID; - nsICrashReporter: nsJSIID; - nsIDeviceSensorData: nsJSIID; - nsIDeviceSensors: nsJSIID; - nsIGIOHandlerApp: nsJSIID; - nsIGIOMimeApp: nsJSIID; - nsIGIOService: nsJSIID; - nsIGSettingsCollection: nsJSIID; - nsIGSettingsService: nsJSIID; - nsIGeolocationUpdate: nsJSIID; - nsIGeolocationProvider: nsJSIID; - nsIHapticFeedback: nsJSIID; - nsIPlatformInfo: nsJSIID; - nsISystemInfo: nsJSIID; - nsIXULAppInfo: nsJSIID; - nsIXULRuntime: nsJSIID; + nsIScriptErrorNote: nsJSIID; + nsIScriptError: nsJSIID; + nsIDOMGeoPosition: nsJSIID; + nsIDOMGeoPositionCallback: nsJSIID; + nsIDOMGeoPositionCoords: nsJSIID; + nsIDOMGeoPositionErrorCallback: nsJSIID; + nsICredentialChooserService: nsJSIID; + nsICredentialChosenCallback: nsJSIID; + nsIIdentityCredentialPromptService: nsJSIID; + nsIIdentityCredentialStorageService: nsJSIID; + nsIIDBPermissionsRequest: nsJSIID; + nsIIndexedDatabaseManager: nsJSIID; + nsILocalStorageManager: nsJSIID; + nsIAudioDeviceInfo: nsJSIID; + nsIMediaDevice: nsJSIID; + nsIMediaManagerService: nsJSIID; + nsITCPSocketCallback: nsJSIID; + nsIUDPSocketInternal: nsJSIID; + nsINotificationStorageCallback: nsJSIID; + nsINotificationStorage: nsJSIID; + nsIPaymentResponseData: nsJSIID; + nsIGeneralResponseData: nsJSIID; + nsIBasicCardResponseData: nsJSIID; + nsIPaymentActionResponse: nsJSIID; + nsIPaymentCanMakeActionResponse: nsJSIID; + nsIPaymentShowActionResponse: nsJSIID; + nsIPaymentAbortActionResponse: nsJSIID; + nsIPaymentCompleteActionResponse: nsJSIID; + nsIMethodChangeDetails: nsJSIID; + nsIGeneralChangeDetails: nsJSIID; + nsIBasicCardChangeDetails: nsJSIID; + nsIPaymentAddress: nsJSIID; + nsIPaymentMethodData: nsJSIID; + nsIPaymentCurrencyAmount: nsJSIID; + nsIPaymentItem: nsJSIID; + nsIPaymentDetailsModifier: nsJSIID; + nsIPaymentShippingOption: nsJSIID; + nsIPaymentDetails: nsJSIID; + nsIPaymentOptions: nsJSIID; + nsIPaymentRequest: nsJSIID; + nsIPaymentRequestService: nsJSIID; + nsIPaymentUIService: nsJSIID; + nsIDOMMozWakeLockListener: nsJSIID; + nsIPowerManagerService: nsJSIID; + nsIWakeLock: nsJSIID; + nsIPushErrorReporter: nsJSIID; + nsIPushNotifier: nsJSIID; + nsIPushData: nsJSIID; + nsIPushMessage: nsJSIID; + nsIPushSubscription: nsJSIID; + nsIPushSubscriptionCallback: nsJSIID; + nsIUnsubscribeResultCallback: nsJSIID; + nsIPushClearResultCallback: nsJSIID; + nsIPushService: nsJSIID; + nsIPushQuotaManager: nsJSIID; + nsIQuotaArtificialFailure: nsJSIID; + nsIQuotaUsageCallback: nsJSIID; + nsIQuotaCallback: nsJSIID; + nsIQuotaManagerService: nsJSIID; + nsIQuotaManagerServiceInternal: nsJSIID; + nsIQuotaRequestBase: nsJSIID; + nsIQuotaUsageRequest: nsJSIID; + nsIQuotaRequest: nsJSIID; + nsIQuotaFullOriginMetadataResult: nsJSIID; + nsIQuotaUsageResult: nsJSIID; + nsIQuotaOriginUsageResult: nsJSIID; + nsIQuotaEstimateResult: nsJSIID; + nsIQuotaUtilsService: nsJSIID; + nsIContentSecurityManager: nsJSIID; + nsIContentSecurityPolicy: nsJSIID; + nsICSPEventListener: nsJSIID; + nsIReferrerInfo: nsJSIID; + nsIHttpsOnlyModePermission: nsJSIID; + nsIDocumentEncoderNodeFixup: nsJSIID; + nsIDocumentEncoder: nsJSIID; + nsIWebProtocolHandlerRegistrar: nsJSIID; + nsISDBCallback: nsJSIID; + nsISDBCloseCallback: nsJSIID; + nsISDBConnection: nsJSIID; + nsISDBRequest: nsJSIID; + nsISDBResult: nsJSIID; + nsIDOMStorageManager: nsJSIID; + nsIStorageActivityService: nsJSIID; + nsISessionStorageService: nsJSIID; + nsIOSPermissionRequest: nsJSIID; + nsICredentialParameters: nsJSIID; + nsIWebAuthnAutoFillEntry: nsJSIID; + nsIWebAuthnService: nsJSIID; nsISpeechTaskCallback: nsJSIID; nsISpeechTask: nsJSIID; nsISpeechService: nsJSIID; nsISynthVoiceRegistry: nsJSIID; - nsIAsyncInputStream: nsJSIID; - nsIInputStreamCallback: nsJSIID; - nsIAsyncOutputStream: nsJSIID; - nsIOutputStreamCallback: nsJSIID; - nsIBinaryInputStream: nsJSIID; - nsIBinaryOutputStream: nsJSIID; - nsICloneableInputStream: nsJSIID; - nsICloneableInputStreamWithRange: nsJSIID; - nsIConverterInputStream: nsJSIID; - nsIConverterOutputStream: nsJSIID; - nsIDirectoryEnumerator: nsJSIID; - nsIDirectoryServiceProvider: nsJSIID; - nsIDirectoryServiceProvider2: nsJSIID; - nsIDirectoryService: nsJSIID; - nsIFile: nsJSIID; - nsIIOUtil: nsJSIID; - nsIInputStream: nsJSIID; - nsIInputStreamPriority: nsJSIID; - nsIInputStreamTee: nsJSIID; - nsILineInputStream: nsJSIID; - nsILocalFileMac: nsJSIID; - nsILocalFileWin: nsJSIID; - nsIMultiplexInputStream: nsJSIID; - nsIObjectInputStream: nsJSIID; - nsIObjectOutputStream: nsJSIID; - nsIOutputStream: nsJSIID; - nsIPipe: nsJSIID; - nsISearchableInputStream: nsJSIID; - nsIRandomAccessStream: nsJSIID; - nsISafeOutputStream: nsJSIID; - nsIScriptableBase64Encoder: nsJSIID; - nsIScriptableInputStream: nsJSIID; - nsISeekableStream: nsJSIID; - nsIStorageStream: nsJSIID; - nsIStreamBufferAccess: nsJSIID; - nsIStringInputStream: nsJSIID; - nsITellableStream: nsJSIID; - nsIUnicharInputStream: nsJSIID; - nsIUnicharLineInputStream: nsJSIID; - nsIUnicharOutputStream: nsJSIID; - nsISearchSubmission: nsJSIID; - nsISearchEngine: nsJSIID; - nsISearchParseSubmissionResult: nsJSIID; - nsISearchService: nsJSIID; - nsIRemotePermissionService: nsJSIID; - nsICommandManager: nsJSIID; - nsICommandParams: nsJSIID; - nsIControllerCommand: nsJSIID; - nsIControllerCommandTable: nsJSIID; - nsIControllerContext: nsJSIID; + nsIWorkerChannelLoadInfo: nsJSIID; + nsIWorkerChannelInfo: nsJSIID; + nsIWorkerDebuggerListener: nsJSIID; + nsIWorkerDebugger: nsJSIID; + nsIWorkerDebuggerManagerListener: nsJSIID; + nsIWorkerDebuggerManager: nsJSIID; + txIEXSLTFunctions: nsJSIID; + nsIDOMXULButtonElement: nsJSIID; + nsIDOMXULCommandDispatcher: nsJSIID; + nsIDOMXULContainerItemElement: nsJSIID; + nsIDOMXULContainerElement: nsJSIID; + nsIDOMXULControlElement: nsJSIID; + nsIDOMXULMenuListElement: nsJSIID; + nsIDOMXULMultiSelectControlElement: nsJSIID; + nsIDOMXULRadioGroupElement: nsJSIID; + nsIDOMXULRelatedElement: nsJSIID; + nsIDOMXULSelectControlElement: nsJSIID; + nsIDOMXULSelectControlItemElement: nsJSIID; + mozIDownloadPlatform: nsJSIID; + nsIDocumentStateListener: nsJSIID; + nsIEditActionListener: nsJSIID; + nsIEditor: nsJSIID; + nsIEditorMailSupport: nsJSIID; + nsIEditorSpellCheck: nsJSIID; + nsIEditorSpellCheckCallback: nsJSIID; + nsIHTMLAbsPosEditor: nsJSIID; + nsIHTMLEditor: nsJSIID; + nsIHTMLInlineTableEditor: nsJSIID; + nsIHTMLObjectResizer: nsJSIID; + nsITableEditor: nsJSIID; + nsIEnterprisePolicies: nsJSIID; + amIAddonManagerStartup: nsJSIID; + amIWebInstallPrompt: nsJSIID; + nsIContentDispatchChooser: nsJSIID; + nsIExternalHelperAppService: nsJSIID; + nsPIExternalAppLauncher: nsJSIID; + nsIHelperAppLauncher: nsJSIID; + nsIExternalProtocolService: nsJSIID; + nsIHandlerService: nsJSIID; + nsIHelperAppLauncherDialog: nsJSIID; + nsISharingHandlerApp: nsJSIID; + nsITypeAheadFind: nsJSIID; + nsIFOG: nsJSIID; + nsIGleanPingTestCallback: nsJSIID; + nsIGleanPing: nsJSIID; + nsIFontEnumerator: nsJSIID; + nsIParserUtils: nsJSIID; + nsIExpatSink: nsJSIID; + nsISFVBareItem: nsJSIID; + nsISFVInteger: nsJSIID; + nsISFVString: nsJSIID; + nsISFVBool: nsJSIID; + nsISFVDecimal: nsJSIID; + nsISFVToken: nsJSIID; + nsISFVByteSeq: nsJSIID; + nsISFVParams: nsJSIID; + nsISFVParametrizable: nsJSIID; + nsISFVItemOrInnerList: nsJSIID; + nsISFVSerialize: nsJSIID; + nsISFVItem: nsJSIID; + nsISFVInnerList: nsJSIID; + nsISFVList: nsJSIID; + nsISFVDictionary: nsJSIID; + nsISFVService: nsJSIID; + imgICache: nsJSIID; + imgIContainer: nsJSIID; + imgIContainerDebug: nsJSIID; + imgIEncoder: nsJSIID; + imgILoader: nsJSIID; + imgINotificationObserver: nsJSIID; + imgIRequest: nsJSIID; + imgIScriptedNotificationObserver: nsJSIID; + imgITools: nsJSIID; + imgIContainerCallback: nsJSIID; + nsIMozIconURI: nsJSIID; inIDeepTreeWalker: nsJSIID; - nsIContentAnalysisAcknowledgement: nsJSIID; - nsIContentAnalysisResponse: nsJSIID; - nsIClientDownloadResource: nsJSIID; - nsIContentAnalysisRequest: nsJSIID; - nsIContentAnalysisResult: nsJSIID; - nsIContentAnalysisCallback: nsJSIID; - nsIContentAnalysisDiagnosticInfo: nsJSIID; - nsIContentAnalysis: nsJSIID; - mozIJSSubScriptLoader: nsJSIID; - xpcIJSWeakReference: nsJSIID; - nsIXPCComponents_Classes: nsJSIID; - nsIXPCComponents_Results: nsJSIID; - nsIXPCComponents_ID: nsJSIID; - nsIXPCComponents_Exception: nsJSIID; - nsIXPCComponents_Constructor: nsJSIID; - nsIXPCComponents_utils_Sandbox: nsJSIID; - nsIScheduledGCCallback: nsJSIID; - nsIXPCComponents_Utils: nsJSIID; - nsIXPCComponents: nsJSIID; + nsIStringBundle: nsJSIID; + nsIStringBundleService: nsJSIID; + nsIJARChannel: nsJSIID; + nsIJARURI: nsJSIID; + nsIZipEntry: nsJSIID; + nsIZipReader: nsJSIID; + nsIZipReaderCache: nsJSIID; + IJSDebugger: nsJSIID; + nsIJSInspector: nsJSIID; nsIKeyValueService: nsJSIID; nsIKeyValueImportSourceSpec: nsJSIID; nsIKeyValueImporter: nsJSIID; @@ -15808,105 +15459,38 @@ interface nsIXPCComponents_Interfaces { nsIKeyValuePairCallback: nsJSIID; nsIKeyValueVariantCallback: nsJSIID; nsIKeyValueVoidCallback: nsJSIID; - nsIDocShell: nsJSIID; - nsIDocShellTreeItem: nsJSIID; - nsIDocShellTreeOwner: nsJSIID; - nsIDocumentLoaderFactory: nsJSIID; - nsIDocumentViewer: nsJSIID; - nsIDocumentViewerEdit: nsJSIID; - nsILoadContext: nsJSIID; - nsILoadURIDelegate: nsJSIID; - nsIPrivacyTransitionObserver: nsJSIID; - nsIReflowObserver: nsJSIID; - nsIRefreshURI: nsJSIID; - nsITooltipListener: nsJSIID; - nsITooltipTextProvider: nsJSIID; - nsIURIFixupInfo: nsJSIID; - nsIURIFixup: nsJSIID; - nsIWebNavigation: nsJSIID; - nsIWebNavigationInfo: nsJSIID; - nsIWebPageDescriptor: nsJSIID; - nsIContentDispatchChooser: nsJSIID; - nsIExternalHelperAppService: nsJSIID; - nsPIExternalAppLauncher: nsJSIID; - nsIHelperAppLauncher: nsJSIID; - nsIExternalProtocolService: nsJSIID; - nsIHandlerService: nsJSIID; - nsIHelperAppLauncherDialog: nsJSIID; - nsISharingHandlerApp: nsJSIID; - nsIAutoplay: nsJSIID; - nsIPageThumbsStorageService: nsJSIID; - nsIRddProcessTest: nsJSIID; - nsICertOverride: nsJSIID; - nsICertOverrideService: nsJSIID; - nsICertStorageCallback: nsJSIID; - nsIRevocationState: nsJSIID; - nsIIssuerAndSerialRevocationState: nsJSIID; - nsISubjectAndPubKeyRevocationState: nsJSIID; - nsICRLiteCoverage: nsJSIID; - nsICertInfo: nsJSIID; - nsICertStorage: nsJSIID; - nsICertTreeItem: nsJSIID; - nsICertTree: nsJSIID; - nsICertificateDialogs: nsJSIID; - nsIClientAuthDialogCallback: nsJSIID; - nsIClientAuthDialogService: nsJSIID; - nsIClientAuthRememberRecord: nsJSIID; - nsIClientAuthRememberService: nsJSIID; - nsIContentSignatureVerifier: nsJSIID; - nsICryptoHash: nsJSIID; - nsIDataStorageManager: nsJSIID; - nsIDataStorage: nsJSIID; - nsIDataStorageItem: nsJSIID; - nsINSSComponent: nsJSIID; - nsINSSErrorsService: nsJSIID; - nsINSSVersion: nsJSIID; - nsIOSKeyStore: nsJSIID; - nsIOSReauthenticator: nsJSIID; - nsIPK11Token: nsJSIID; - nsIPK11TokenDB: nsJSIID; - nsIPKCS11Module: nsJSIID; - nsIPKCS11ModuleDB: nsJSIID; - nsIPKCS11Slot: nsJSIID; - nsIPublicKeyPinningService: nsJSIID; - nsISecretDecoderRing: nsJSIID; - nsISecurityUITelemetry: nsJSIID; - nsISiteSecurityService: nsJSIID; - nsITLSSocketControl: nsJSIID; - nsITokenPasswordDialogs: nsJSIID; - nsITransportSecurityInfo: nsJSIID; - nsIX509Cert: nsJSIID; - nsIAppSignatureInfo: nsJSIID; - nsIOpenSignedAppFileCallback: nsJSIID; - nsIAsyncBoolCallback: nsJSIID; - nsICertVerificationCallback: nsJSIID; - nsIX509CertDB: nsJSIID; - nsIX509CertValidity: nsJSIID; - mozIPersonalDictionary: nsJSIID; - mozISpellCheckingEngine: nsJSIID; - nsIClearBySiteEntry: nsJSIID; - nsIClearDataService: nsJSIID; - nsIClearDataCallback: nsJSIID; - nsIFingerprintingOverride: nsJSIID; - nsIFingerprintingWebCompatService: nsJSIID; - nsIRFPService: nsJSIID; - nsIRFPTargetSetIDL: nsJSIID; - nsIUserCharacteristicsPageService: nsJSIID; - nsICommandLine: nsJSIID; - nsICommandLineHandler: nsJSIID; - nsICommandLineValidator: nsJSIID; - nsIContentSecurityManager: nsJSIID; - nsIContentSecurityPolicy: nsJSIID; - nsICSPEventListener: nsJSIID; - nsIReferrerInfo: nsJSIID; - nsIHttpsOnlyModePermission: nsJSIID; - nsIFOG: nsJSIID; - nsIGleanPingTestCallback: nsJSIID; - nsIGleanPing: nsJSIID; - nsIDOMStorageManager: nsJSIID; - nsIStorageActivityService: nsJSIID; - nsISessionStorageService: nsJSIID; - nsISuspendedTypes: nsJSIID; + nsILayoutHistoryState: nsJSIID; + nsIPreloadedStyleSheet: nsJSIID; + nsISVGPaintContext: nsJSIID; + nsIStyleSheetService: nsJSIID; + nsITreeSelection: nsJSIID; + nsITreeView: nsJSIID; + mozILocaleService: nsJSIID; + mozIOSPreferences: nsJSIID; + nsILoginInfo: nsJSIID; + nsILoginSearchCallback: nsJSIID; + nsILoginManager: nsJSIID; + nsILoginManagerAuthPrompter: nsJSIID; + nsILoginManagerCrypto: nsJSIID; + nsILoginManagerPrompter: nsJSIID; + nsILoginMetaInfo: nsJSIID; + nsIPromptInstance: nsJSIID; + nsIEdgeMigrationUtils: nsJSIID; + nsIMIMEHeaderParam: nsJSIID; + nsIHandlerInfo: nsJSIID; + nsIMIMEInfo: nsJSIID; + nsIHandlerApp: nsJSIID; + nsILocalHandlerApp: nsJSIID; + nsIWebHandlerApp: nsJSIID; + nsIDBusHandlerApp: nsJSIID; + nsIMIMEService: nsJSIID; + nsIMLUtils: nsJSIID; + nsIFind: nsJSIID; + nsIFindService: nsJSIID; + nsIWebBrowserFind: nsJSIID; + nsIWebBrowserFindInFrames: nsJSIID; + mozIMozIntl: nsJSIID; + mozIMozIntlHelper: nsJSIID; mozIThirdPartyUtil: nsJSIID; nsIArrayBufferInputStream: nsJSIID; nsIAsyncStreamCopier: nsJSIID; @@ -16060,42 +15644,26 @@ interface nsIXPCComponents_Interfaces { nsIUploadChannel: nsJSIID; nsIUploadChannel2: nsJSIID; nsPISocketTransportService: nsJSIID; - nsIWorkerChannelLoadInfo: nsJSIID; - nsIWorkerChannelInfo: nsJSIID; - nsIWorkerDebuggerListener: nsJSIID; - nsIWorkerDebugger: nsJSIID; - nsIWorkerDebuggerManagerListener: nsJSIID; - nsIWorkerDebuggerManager: nsJSIID; - nsIDialogParamBlock: nsJSIID; - nsIOpenWindowInfo: nsJSIID; - nsIPromptCollection: nsJSIID; - nsIPromptFactory: nsJSIID; - nsIPromptService: nsJSIID; - nsIWindowWatcher: nsJSIID; - nsILayoutHistoryState: nsJSIID; - nsIPreloadedStyleSheet: nsJSIID; - nsISVGPaintContext: nsJSIID; - nsIStyleSheetService: nsJSIID; - mozIDownloadPlatform: nsJSIID; - nsIScriptableUnicodeConverter: nsJSIID; - nsITextToSubURI: nsJSIID; - IJSDebugger: nsJSIID; - nsIJSInspector: nsJSIID; - nsITypeAheadFind: nsJSIID; - nsIBFCacheEntry: nsJSIID; - nsISHEntry: nsJSIID; - nsISHistory: nsJSIID; - nsISHistoryListener: nsJSIID; - nsISessionStoreFunctions: nsJSIID; - nsISessionStoreRestoreData: nsJSIID; - nsIAppShellService: nsJSIID; - nsIAppWindow: nsJSIID; - nsIWindowMediator: nsJSIID; - nsIWindowMediatorListener: nsJSIID; - nsIWindowlessBrowser: nsJSIID; - nsIXULBrowserWindow: nsJSIID; - nsIWebVTTListener: nsJSIID; - nsIWebVTTParserWrapper: nsJSIID; + nsIAboutModule: nsJSIID; + nsICacheEntry: nsJSIID; + nsICacheEntryMetaDataVisitor: nsJSIID; + nsICacheEntryDoomCallback: nsJSIID; + nsICacheEntryOpenCallback: nsJSIID; + nsICachePurgeLock: nsJSIID; + nsICacheStorage: nsJSIID; + nsICacheStorageService: nsJSIID; + nsICacheStorageConsumptionObserver: nsJSIID; + nsICacheStorageVisitor: nsJSIID; + nsICacheTesting: nsJSIID; + nsICookie: nsJSIID; + nsICookieJarSettings: nsJSIID; + nsICookieManager: nsJSIID; + nsICookieNotification: nsJSIID; + nsICookiePermission: nsJSIID; + nsICookieTransactionCallback: nsJSIID; + nsICookieService: nsJSIID; + nsIThirdPartyCookieBlockingExceptionListService: nsJSIID; + nsIThirdPartyCookieExceptionEntry: nsJSIID; nsIDNSAdditionalInfo: nsJSIID; nsIDNSByTypeRecord: nsJSIID; nsIDNSTXTRecord: nsJSIID; @@ -16118,16 +15686,39 @@ interface nsIXPCComponents_Interfaces { nsINativeDNSResolverOverride: nsJSIID; nsITRRSkipReason: nsJSIID; nsPIDNSService: nsJSIID; - nsIAudioDeviceInfo: nsJSIID; - nsIMediaDevice: nsJSIID; - nsIMediaManagerService: nsJSIID; - nsIMarionette: nsJSIID; - nsIRemoteAgent: nsJSIID; - nsIDocumentEncoderNodeFixup: nsJSIID; - nsIDocumentEncoder: nsJSIID; - mozILocaleService: nsJSIID; - mozIOSPreferences: nsJSIID; - nsIHangDetails: nsJSIID; + nsIFileChannel: nsJSIID; + nsIFileProtocolHandler: nsJSIID; + nsIDataChannel: nsJSIID; + nsIBinaryHttpRequest: nsJSIID; + nsIBinaryHttpResponse: nsJSIID; + nsIBinaryHttp: nsJSIID; + nsICORSPreflightCache: nsJSIID; + nsICORSPreflightCacheEntry: nsJSIID; + nsIEarlyHintObserver: nsJSIID; + nsIHttpActivityObserver: nsJSIID; + nsIHttpActivityDistributor: nsJSIID; + nsIHttpAuthManager: nsJSIID; + nsIHttpChannel: nsJSIID; + nsIHttpUpgradeListener: nsJSIID; + nsIHttpChannelInternal: nsJSIID; + nsIHttpHeaderVisitor: nsJSIID; + nsIHttpProtocolHandler: nsJSIID; + nsINetworkErrorLogging: nsJSIID; + nsIObliviousHttpClientResponse: nsJSIID; + nsIObliviousHttpClientRequest: nsJSIID; + nsIObliviousHttpServerResponse: nsJSIID; + nsIObliviousHttpServer: nsJSIID; + nsIObliviousHttp: nsJSIID; + nsIObliviousHttpService: nsJSIID; + nsIObliviousHttpChannel: nsJSIID; + nsIRaceCacheWithNetwork: nsJSIID; + nsIReplacedHttpResponse: nsJSIID; + nsIWellKnownOpportunisticUtils: nsJSIID; + nsICompressConvStats: nsJSIID; + nsIResProtocolHandler: nsJSIID; + nsISubstitutingProtocolHandler: nsJSIID; + nsISocketProvider: nsJSIID; + nsISocketProviderService: nsJSIID; mozITXTToHTMLConv: nsJSIID; nsIDirIndex: nsJSIID; nsIDirIndexListener: nsJSIID; @@ -16135,51 +15726,6 @@ interface nsIXPCComponents_Interfaces { nsIStreamConverter: nsJSIID; nsIStreamConverterService: nsJSIID; nsITXTToHTMLConv: nsJSIID; - nsIParentalControlsService: nsJSIID; - nsIWebProtocolHandlerRegistrar: nsJSIID; - nsITCPSocketCallback: nsJSIID; - nsIUDPSocketInternal: nsJSIID; - nsIFetchTelemetryDataCallback: nsJSIID; - nsITelemetry: nsJSIID; - nsIDAPTelemetry: nsJSIID; - nsIPushErrorReporter: nsJSIID; - nsIPushNotifier: nsJSIID; - nsIPushData: nsJSIID; - nsIPushMessage: nsJSIID; - nsIPushSubscription: nsJSIID; - nsIPushSubscriptionCallback: nsJSIID; - nsIUnsubscribeResultCallback: nsJSIID; - nsIPushClearResultCallback: nsJSIID; - nsIPushService: nsJSIID; - nsIPushQuotaManager: nsJSIID; - nsIDOMXULButtonElement: nsJSIID; - nsIDOMXULCommandDispatcher: nsJSIID; - nsIDOMXULContainerItemElement: nsJSIID; - nsIDOMXULContainerElement: nsJSIID; - nsIDOMXULControlElement: nsJSIID; - nsIDOMXULMenuListElement: nsJSIID; - nsIDOMXULMultiSelectControlElement: nsJSIID; - nsIDOMXULRadioGroupElement: nsJSIID; - nsIDOMXULRelatedElement: nsJSIID; - nsIDOMXULSelectControlElement: nsJSIID; - nsIDOMXULSelectControlItemElement: nsJSIID; - nsIAutoCompleteController: nsJSIID; - nsIAutoCompleteInput: nsJSIID; - nsIAutoCompletePopup: nsJSIID; - nsIAutoCompleteResult: nsJSIID; - nsIAutoCompleteSearch: nsJSIID; - nsIAutoCompleteObserver: nsJSIID; - nsIAutoCompleteSimpleResult: nsJSIID; - nsIAutoCompleteSimpleResultListener: nsJSIID; - nsIAutoCompleteSimpleSearch: nsJSIID; - nsIMLUtils: nsJSIID; - nsIFinalizationWitnessService: nsJSIID; - nsIFormFillController: nsJSIID; - nsIFormFillCompleteObserver: nsJSIID; - nsICrashService: nsJSIID; - nsIChromeRegistry: nsJSIID; - nsIXULChromeRegistry: nsJSIID; - nsIToolkitChromeRegistry: nsJSIID; nsITransportProvider: nsJSIID; nsIWebSocketChannel: nsJSIID; nsIWebSocketFrame: nsJSIID; @@ -16187,30 +15733,371 @@ interface nsIXPCComponents_Interfaces { nsIWebSocketEventService: nsJSIID; nsIWebSocketImpl: nsJSIID; nsIWebSocketListener: nsJSIID; + nsIWebTransport: nsJSIID; + WebTransportSessionEventListener: nsJSIID; + nsIWebTransportStreamCallback: nsJSIID; + nsIWebTransportHash: nsJSIID; + nsIWebTransportSendStreamStats: nsJSIID; + nsIWebTransportReceiveStreamStats: nsJSIID; + nsIWebTransportStreamStatsCallback: nsJSIID; + nsIWebTransportReceiveStream: nsJSIID; + nsIWebTransportSendStream: nsJSIID; + nsIWebTransportBidirectionalStream: nsJSIID; + nsIWifiAccessPoint: nsJSIID; + nsIWifiListener: nsJSIID; + nsIWifiMonitor: nsJSIID; + nsIParentalControlsService: nsJSIID; + IPeerConnectionObserver: nsJSIID; + IPeerConnection: nsJSIID; + nsIRemotePermissionService: nsJSIID; + nsICertOverride: nsJSIID; + nsICertOverrideService: nsJSIID; + nsICertStorageCallback: nsJSIID; + nsIRevocationState: nsJSIID; + nsIIssuerAndSerialRevocationState: nsJSIID; + nsISubjectAndPubKeyRevocationState: nsJSIID; + nsICertInfo: nsJSIID; + nsICertStorage: nsJSIID; + nsICertTreeItem: nsJSIID; + nsICertTree: nsJSIID; + nsICertificateDialogs: nsJSIID; + nsIClientAuthDialogCallback: nsJSIID; + nsIClientAuthDialogService: nsJSIID; + nsIClientAuthRememberRecord: nsJSIID; + nsIClientAuthRememberService: nsJSIID; + nsIContentSignatureVerifier: nsJSIID; + nsICryptoHash: nsJSIID; + nsIDataStorageManager: nsJSIID; + nsIDataStorage: nsJSIID; + nsIDataStorageItem: nsJSIID; + nsINSSComponent: nsJSIID; + nsINSSErrorsService: nsJSIID; + nsINSSVersion: nsJSIID; + nsIOSKeyStore: nsJSIID; + nsIOSReauthenticator: nsJSIID; + nsIPK11Token: nsJSIID; + nsIPK11TokenDB: nsJSIID; + nsIPKCS11Module: nsJSIID; + nsIPKCS11ModuleDB: nsJSIID; + nsIPKCS11Slot: nsJSIID; + nsIPublicKeyPinningService: nsJSIID; + nsISecretDecoderRing: nsJSIID; + nsISecurityUITelemetry: nsJSIID; + nsISiteSecurityService: nsJSIID; + nsITLSSocketControl: nsJSIID; + nsITokenPasswordDialogs: nsJSIID; + nsITransportSecurityInfo: nsJSIID; + nsIX509Cert: nsJSIID; + nsIAppSignatureInfo: nsJSIID; + nsIOpenSignedAppFileCallback: nsJSIID; + nsIAsyncBoolCallback: nsJSIID; + nsICertVerificationCallback: nsJSIID; + nsIX509CertDB: nsJSIID; + nsIX509CertValidity: nsJSIID; + mozIVisitInfo: nsJSIID; + mozIPlaceInfo: nsJSIID; + mozIVisitInfoCallback: nsJSIID; + mozIVisitedStatusCallback: nsJSIID; + mozIAsyncHistory: nsJSIID; + mozIPlacesAutoComplete: nsJSIID; + mozIPlacesPendingOperation: nsJSIID; + mozISyncedBookmarksMirrorProgressListener: nsJSIID; + mozISyncedBookmarksMirrorCallback: nsJSIID; + mozISyncedBookmarksMirrorLogger: nsJSIID; + mozISyncedBookmarksMerger: nsJSIID; + nsIFaviconService: nsJSIID; + nsIFaviconDataCallback: nsJSIID; + nsINavBookmarksService: nsJSIID; + nsINavHistoryResultNode: nsJSIID; + nsINavHistoryContainerResultNode: nsJSIID; + nsINavHistoryQueryResultNode: nsJSIID; + nsINavHistoryResultObserver: nsJSIID; + nsINavHistoryResult: nsJSIID; + nsINavHistoryQuery: nsJSIID; + nsINavHistoryQueryOptions: nsJSIID; + nsINavHistoryService: nsJSIID; + nsIPlacesPreviewsHelperService: nsJSIID; + nsITaggingService: nsJSIID; + nsIPrefBranch: nsJSIID; + nsIPrefLocalizedString: nsJSIID; + nsIPrefStatsCallback: nsJSIID; + nsIPrefObserver: nsJSIID; + nsIPrefService: nsJSIID; + nsIRelativeFilePref: nsJSIID; nsIPrefetchService: nsJSIID; + nsIPrivateAttributionService: nsJSIID; + nsIProfilerStartParams: nsJSIID; + nsIProfiler: nsJSIID; + nsIRddProcessTest: nsJSIID; + nsIMarionette: nsJSIID; + nsIRemoteAgent: nsJSIID; + nsIApplicationReputationService: nsJSIID; + nsIApplicationReputationQuery: nsJSIID; + nsIApplicationReputationCallback: nsJSIID; + mozISandboxSettings: nsJSIID; + nsIFormFillController: nsJSIID; + nsIFormFillCompleteObserver: nsJSIID; + mozIAppServicesLogger: nsJSIID; + mozIBridgedSyncEngineCallback: nsJSIID; + mozIBridgedSyncEngineApplyCallback: nsJSIID; + mozIBridgedSyncEngine: nsJSIID; + mozIInterruptible: nsJSIID; + mozIServicesLogSink: nsJSIID; + nsISessionStoreFunctions: nsJSIID; + nsISessionStoreRestoreData: nsJSIID; + nsIShellService: nsJSIID; + nsIBFCacheEntry: nsJSIID; + nsISHEntry: nsJSIID; + nsISHistory: nsJSIID; + nsISHistoryListener: nsJSIID; + mozIPersonalDictionary: nsJSIID; + mozISpellCheckingEngine: nsJSIID; + nsIStartupCacheInfo: nsJSIID; + mozIStorageAsyncConnection: nsJSIID; + mozIStorageAsyncStatement: nsJSIID; + mozIStorageBaseStatement: nsJSIID; + mozIStorageBindingParams: nsJSIID; + mozIStorageBindingParamsArray: nsJSIID; + mozIStorageCompletionCallback: nsJSIID; + mozIStorageConnection: nsJSIID; + mozIStorageError: nsJSIID; + mozIStorageFunction: nsJSIID; + mozIStoragePendingStatement: nsJSIID; + mozIStorageProgressHandler: nsJSIID; + mozIStorageResultSet: nsJSIID; + mozIStorageRow: nsJSIID; + mozIStorageService: nsJSIID; + mozIStorageStatement: nsJSIID; + mozIStorageStatementCallback: nsJSIID; + mozIStorageVacuumParticipant: nsJSIID; + mozIStorageValueArray: nsJSIID; + nsIFetchTelemetryDataCallback: nsJSIID; + nsITelemetry: nsJSIID; + nsIDAPTelemetry: nsJSIID; + nsIHttpServer: nsJSIID; + nsIHttpServerStoppedCallback: nsJSIID; + nsIHttpServerIdentity: nsJSIID; + nsIHttpRequestHandler: nsJSIID; + nsIHttpRequest: nsJSIID; + nsIHttpResponse: nsJSIID; + nsIPageThumbsStorageService: nsJSIID; + nsIBTPRemoteExceptionList: nsJSIID; + nsIBounceTrackingMapEntry: nsJSIID; + nsIBounceTrackingPurgeEntry: nsJSIID; + nsIBounceTrackingProtection: nsJSIID; + nsIContentBlockingAllowList: nsJSIID; + nsIPartitioningExceptionListObserver: nsJSIID; + nsIPartitioningExceptionListService: nsJSIID; + nsIPurgeTrackerService: nsJSIID; + nsITrackingDBService: nsJSIID; + nsIURLDecorationAnnotationsService: nsJSIID; + nsIURLQueryStringStripper: nsJSIID; + nsIURLQueryStrippingListObserver: nsJSIID; + nsIURLQueryStrippingListService: nsJSIID; + nsIAsyncShutdownBlocker: nsJSIID; + nsIAsyncShutdownClient: nsJSIID; + nsIAsyncShutdownCompletionCallback: nsJSIID; + nsIAsyncShutdownBarrier: nsJSIID; + nsIAsyncShutdownService: nsJSIID; + nsIBackgroundTasks: nsJSIID; + nsIBackgroundTasksManager: nsJSIID; + nsIBackgroundTasksRunner: nsJSIID; + nsIClearBySiteEntry: nsJSIID; + nsIClearDataService: nsJSIID; + nsIClearDataCallback: nsJSIID; + nsIContentAnalysisAcknowledgement: nsJSIID; + nsIContentAnalysisResult: nsJSIID; + nsIContentAnalysisResponse: nsJSIID; + nsIClientDownloadResource: nsJSIID; + nsIContentAnalysisRequest: nsJSIID; + nsIContentAnalysisCallback: nsJSIID; + nsIContentAnalysisDiagnosticInfo: nsJSIID; + nsIContentAnalysis: nsJSIID; + nsIClickRule: nsJSIID; + nsICookieBannerListService: nsJSIID; + nsICookieBannerRule: nsJSIID; + nsICookieBannerService: nsJSIID; + nsICookieBannerTelemetryService: nsJSIID; + nsICookieRule: nsJSIID; + nsICrashService: nsJSIID; + nsIFinalizationWitnessService: nsJSIID; + nsIVisibleTab: nsJSIID; + nsIBrowserWindowTracker: nsJSIID; + nsIRegion: nsJSIID; + nsIProcessToolsService: nsJSIID; + nsIFingerprintingOverride: nsJSIID; + nsIFingerprintingWebCompatService: nsJSIID; + nsIRFPService: nsJSIID; + nsIRFPTargetSetIDL: nsJSIID; + nsIUserCharacteristicsPageService: nsJSIID; + nsISearchSubmission: nsJSIID; + nsISearchEngine: nsJSIID; + nsISearchParseSubmissionResult: nsJSIID; + nsISearchService: nsJSIID; nsIToolkitShellService: nsJSIID; - nsIBrowserController: nsJSIID; - nsIController: nsJSIID; - nsICommandController: nsJSIID; - nsIControllers: nsJSIID; - nsIAboutNewTabService: nsJSIID; - nsIParserUtils: nsJSIID; - nsIExpatSink: nsJSIID; - nsICredentialChooserService: nsJSIID; - nsICredentialChosenCallback: nsJSIID; - nsIIdentityCredentialPromptService: nsJSIID; - nsIIdentityCredentialStorageService: nsJSIID; - nsIDocumentStateListener: nsJSIID; - nsIEditActionListener: nsJSIID; - nsIEditor: nsJSIID; - nsIEditorMailSupport: nsJSIID; - nsIEditorSpellCheck: nsJSIID; - nsIEditorSpellCheckCallback: nsJSIID; - nsIHTMLAbsPosEditor: nsJSIID; - nsIHTMLEditor: nsJSIID; - nsIHTMLInlineTableEditor: nsJSIID; - nsIHTMLObjectResizer: nsJSIID; - nsITableEditor: nsJSIID; + nsITerminatorTest: nsJSIID; + nsIXULStore: nsJSIID; + nsIProfileStartup: nsJSIID; + nsIProfileMigrator: nsJSIID; + nsIProfileUnlocker: nsJSIID; + nsIProfileLock: nsJSIID; + nsIToolkitProfile: nsJSIID; + nsIToolkitProfileService: nsJSIID; + nsIRemoteService: nsJSIID; + nsITransaction: nsJSIID; + nsITransactionManager: nsJSIID; + nsIInlineSpellChecker: nsJSIID; + nsIScriptableUnicodeConverter: nsJSIID; + nsITextToSubURI: nsJSIID; + nsIUpdateTimerManager: nsJSIID; + nsIUpdatePatch: nsJSIID; + nsIUpdate: nsJSIID; + nsIUpdateCheckResult: nsJSIID; + nsIUpdateCheck: nsJSIID; + nsIUpdateCheckerInternal: nsJSIID; + nsIUpdateChecker: nsJSIID; + nsIApplicationUpdateServiceInternal: nsJSIID; + nsIApplicationUpdateService: nsJSIID; + nsIUpdateProcessor: nsJSIID; + nsIUpdateSyncManager: nsJSIID; + nsIUpdateMutex: nsJSIID; + nsIUpdateManagerInternal: nsJSIID; + nsIUpdateManager: nsJSIID; + nsIApplicationUpdateServiceStub: nsJSIID; + nsIContentHandler: nsJSIID; + nsIDocumentLoader: nsJSIID; + nsITransfer: nsJSIID; + nsIURIContentListener: nsJSIID; + nsIURILoader: nsJSIID; + nsIWebProgress: nsJSIID; + nsIWebProgressListener: nsJSIID; + nsIWebProgressListener2: nsJSIID; + nsIUrlClassifierBlockedChannel: nsJSIID; + nsIChannelClassifierService: nsJSIID; + nsIURIClassifierCallback: nsJSIID; + nsIURIClassifier: nsJSIID; + nsIUrlClassifierExceptionListObserver: nsJSIID; + nsIUrlClassifierExceptionListService: nsJSIID; + nsIUrlClassifierFeature: nsJSIID; + nsIUrlClassifierFeatureResult: nsJSIID; + nsIUrlClassifierFeatureCallback: nsJSIID; + IUrlClassifierUITelemetry: nsJSIID; + nsIUrlClassifierCallback: nsJSIID; + nsIUrlClassifierUpdateObserver: nsJSIID; + nsIUrlClassifierDBService: nsJSIID; + nsIFullHashMatch: nsJSIID; + nsIUrlClassifierHashCompleterCallback: nsJSIID; + nsIUrlClassifierHashCompleter: nsJSIID; + nsIUrlClassifierPositiveCacheEntry: nsJSIID; + nsIUrlClassifierCacheEntry: nsJSIID; + nsIUrlClassifierCacheInfo: nsJSIID; + nsIUrlClassifierGetCacheCallback: nsJSIID; + nsIUrlClassifierInfo: nsJSIID; + nsIUrlClassifierPrefixSet: nsJSIID; + nsIUrlClassifierRemoteSettingsService: nsJSIID; + nsIUrlClassifierStreamUpdater: nsJSIID; + nsIUrlClassifierParseFindFullHashCallback: nsJSIID; + nsIUrlClassifierUtils: nsJSIID; + nsIUrlListManager: nsJSIID; + nsIURLFormatter: nsJSIID; + nsIUtilityProcessTest: nsJSIID; + nsIWebBrowser: nsJSIID; + nsIWebBrowserChrome: nsJSIID; + nsIWebBrowserPrint: nsJSIID; + nsIWebBrowserPersist: nsJSIID; + nsIWebBrowserPersistURIMap: nsJSIID; + nsIWebBrowserPersistDocument: nsJSIID; + nsIWebBrowserPersistResourceVisitor: nsJSIID; + nsIWebBrowserPersistWriteCompletion: nsJSIID; + nsIWebBrowserPersistDocumentReceiver: nsJSIID; + extIWebNavigation: nsJSIID; + mozIExtensionServiceWorkerInfo: nsJSIID; + mozIExtensionListenerCallOptions: nsJSIID; + mozIExtensionEventListener: nsJSIID; + mozIExtensionAPIRequest: nsJSIID; + mozIExtensionAPIRequestResult: nsJSIID; + mozIExtensionAPIRequestHandler: nsJSIID; + mozIExtensionProcessScript: nsJSIID; + nsINativeMessagingPortal: nsJSIID; + nsIWebVTTListener: nsJSIID; + nsIWebVTTParserWrapper: nsJSIID; + nsIBaseWindow: nsJSIID; + nsIBidiKeyboard: nsJSIID; + nsIAsyncSetClipboardData: nsJSIID; + nsIAsyncClipboardRequestCallback: nsJSIID; + nsIClipboardDataSnapshot: nsJSIID; + nsIClipboardGetDataSnapshotCallback: nsJSIID; + nsIClipboard: nsJSIID; + nsIClipboardHelper: nsJSIID; + nsIClipboardOwner: nsJSIID; + nsIColorPickerShownCallback: nsJSIID; + nsIColorPicker: nsJSIID; + nsIDisplayInfo: nsJSIID; + nsIDragService: nsJSIID; + nsIDragSession: nsJSIID; + nsIFilePicker: nsJSIID; + nsIFilePickerShownCallback: nsJSIID; + nsIFormatConverter: nsJSIID; + nsIGfxInfo: nsJSIID; + nsIGfxInfoDebug: nsJSIID; + nsIMockDragServiceController: nsJSIID; + nsIPaper: nsJSIID; + nsIPaperMargin: nsJSIID; + nsIPrintDialogService: nsJSIID; + nsIPrintSettings: nsJSIID; + nsIPrintSettingsService: nsJSIID; + nsIPrinterInfo: nsJSIID; + nsIPrinter: nsJSIID; + nsIPrinterList: nsJSIID; + nsIScreen: nsJSIID; + nsIScreenManager: nsJSIID; + nsISharePicker: nsJSIID; + nsISound: nsJSIID; + nsISystemStatusBar: nsJSIID; + nsIFlavorDataProvider: nsJSIID; + nsITransferable: nsJSIID; + nsIUserIdleService: nsJSIID; + nsIUserIdleServiceInternal: nsJSIID; + nsIWindowCreator: nsJSIID; + nsIWindowProvider: nsJSIID; + nsIDialogParamBlock: nsJSIID; + nsIOpenWindowInfo: nsJSIID; + nsIPromptCollection: nsJSIID; + nsIPromptFactory: nsJSIID; + nsIPromptService: nsJSIID; + nsIWindowWatcher: nsJSIID; + nsITabUnloader: nsJSIID; + nsIAvailableMemoryWatcherBase: nsJSIID; + nsIConsoleListener: nsJSIID; + nsIConsoleMessage: nsJSIID; + nsIConsoleService: nsJSIID; + nsICycleCollectorHandler: nsJSIID; + nsICycleCollectorLogSink: nsJSIID; + nsICycleCollectorListener: nsJSIID; + nsIDebug2: nsJSIID; + nsIStackFrame: nsJSIID; + nsIException: nsJSIID; + nsIInterfaceRequestor: nsJSIID; + nsIFinishDumpingCallback: nsJSIID; + nsIDumpGCAndCCLogsCallback: nsJSIID; + nsIMemoryInfoDumper: nsJSIID; + nsIHandleReportCallback: nsJSIID; + nsIMemoryReporter: nsJSIID; + nsIFinishReportingCallback: nsJSIID; + nsIHeapAllocatedCallback: nsJSIID; + nsIMemoryReporterManager: nsJSIID; + nsISupports: nsJSIID; + nsIUUIDGenerator: nsJSIID; + nsIVersionComparator: nsJSIID; + nsIWeakReference: nsJSIID; + nsISupportsWeakReference: nsJSIID; + nsICategoryEntry: nsJSIID; + nsICategoryManager: nsJSIID; + nsIClassInfo: nsJSIID; + nsIComponentManager: nsJSIID; + nsIComponentRegistrar: nsJSIID; + nsIFactory: nsJSIID; + nsIServiceManager: nsJSIID; nsIArray: nsJSIID; nsIArrayExtensions: nsJSIID; nsIINIParser: nsJSIID; @@ -16258,133 +16145,109 @@ interface nsIXPCComponents_Interfaces { nsIWritableVariant: nsJSIID; nsIWritablePropertyBag: nsJSIID; nsIWritablePropertyBag2: nsJSIID; - nsIWifiAccessPoint: nsJSIID; - nsIWifiListener: nsJSIID; - nsIWifiMonitor: nsJSIID; - nsIAddonPolicyService: nsJSIID; - nsIAddonContentPolicy: nsJSIID; - nsIDomainPolicy: nsJSIID; - nsIDomainSet: nsJSIID; - nsIPrincipal: nsJSIID; - nsIScriptSecurityManager: nsJSIID; - extIWebNavigation: nsJSIID; - mozIExtensionServiceWorkerInfo: nsJSIID; - mozIExtensionListenerCallOptions: nsJSIID; - mozIExtensionEventListener: nsJSIID; - mozIExtensionAPIRequest: nsJSIID; - mozIExtensionAPIRequestResult: nsJSIID; - mozIExtensionAPIRequestHandler: nsJSIID; - mozIExtensionProcessScript: nsJSIID; - nsINativeMessagingPortal: nsJSIID; - nsIURLFormatter: nsJSIID; - nsILocalStorageManager: nsJSIID; - mozIAppServicesLogger: nsJSIID; - mozIBridgedSyncEngineCallback: nsJSIID; - mozIBridgedSyncEngineApplyCallback: nsJSIID; - mozIBridgedSyncEngine: nsJSIID; - mozIInterruptible: nsJSIID; - mozIServicesLogSink: nsJSIID; - nsIJARChannel: nsJSIID; - nsIJARURI: nsJSIID; - nsIZipEntry: nsJSIID; - nsIZipReader: nsJSIID; - nsIZipReaderCache: nsJSIID; - nsIProcessToolsService: nsJSIID; - nsINotificationStorageCallback: nsJSIID; - nsINotificationStorage: nsJSIID; - nsICascadeFilter: nsJSIID; - nsINativeAppSupport: nsJSIID; - nsIXREDirProvider: nsJSIID; - nsIInlineSpellChecker: nsJSIID; - nsIUpdateTimerManager: nsJSIID; - nsIUpdatePatch: nsJSIID; - nsIUpdate: nsJSIID; - nsIUpdateCheckResult: nsJSIID; - nsIUpdateCheck: nsJSIID; - nsIUpdateCheckerInternal: nsJSIID; - nsIUpdateChecker: nsJSIID; - nsIApplicationUpdateServiceInternal: nsJSIID; - nsIApplicationUpdateService: nsJSIID; - nsIUpdateProcessor: nsJSIID; - nsIUpdateSyncManager: nsJSIID; - nsIUpdateMutex: nsJSIID; - nsIUpdateManagerInternal: nsJSIID; - nsIUpdateManager: nsJSIID; - nsIApplicationUpdateServiceStub: nsJSIID; - nsIWindowCreator: nsJSIID; - nsIWindowProvider: nsJSIID; - nsISFVBareItem: nsJSIID; - nsISFVInteger: nsJSIID; - nsISFVString: nsJSIID; - nsISFVBool: nsJSIID; - nsISFVDecimal: nsJSIID; - nsISFVToken: nsJSIID; - nsISFVByteSeq: nsJSIID; - nsISFVParams: nsJSIID; - nsISFVParametrizable: nsJSIID; - nsISFVItemOrInnerList: nsJSIID; - nsISFVSerialize: nsJSIID; - nsISFVItem: nsJSIID; - nsISFVInnerList: nsJSIID; - nsISFVList: nsJSIID; - nsISFVDictionary: nsJSIID; - nsISFVService: nsJSIID; - nsIVisibleTab: nsJSIID; - nsIBrowserWindowTracker: nsJSIID; - nsIRegion: nsJSIID; - amIAddonManagerStartup: nsJSIID; - amIWebInstallPrompt: nsJSIID; - nsIClickRule: nsJSIID; - nsICookieBannerListService: nsJSIID; - nsICookieBannerRule: nsJSIID; - nsICookieBannerService: nsJSIID; - nsICookieBannerTelemetryService: nsJSIID; - nsICookieRule: nsJSIID; + nsIAsyncInputStream: nsJSIID; + nsIInputStreamCallback: nsJSIID; + nsIAsyncOutputStream: nsJSIID; + nsIOutputStreamCallback: nsJSIID; + nsIBinaryInputStream: nsJSIID; + nsIBinaryOutputStream: nsJSIID; + nsICloneableInputStream: nsJSIID; + nsICloneableInputStreamWithRange: nsJSIID; + nsIConverterInputStream: nsJSIID; + nsIConverterOutputStream: nsJSIID; + nsIDirectoryEnumerator: nsJSIID; + nsIDirectoryServiceProvider: nsJSIID; + nsIDirectoryServiceProvider2: nsJSIID; + nsIDirectoryService: nsJSIID; + nsIFile: nsJSIID; + nsIIOUtil: nsJSIID; + nsIInputStream: nsJSIID; + nsIInputStreamPriority: nsJSIID; + nsIInputStreamTee: nsJSIID; + nsILineInputStream: nsJSIID; + nsILocalFileWin: nsJSIID; + nsIMultiplexInputStream: nsJSIID; + nsIObjectInputStream: nsJSIID; + nsIObjectOutputStream: nsJSIID; + nsIOutputStream: nsJSIID; + nsIPipe: nsJSIID; + nsISearchableInputStream: nsJSIID; + nsIRandomAccessStream: nsJSIID; + nsISafeOutputStream: nsJSIID; + nsIScriptableBase64Encoder: nsJSIID; + nsIScriptableInputStream: nsJSIID; + nsISeekableStream: nsJSIID; + nsIStorageStream: nsJSIID; + nsIStreamBufferAccess: nsJSIID; + nsIStringInputStream: nsJSIID; + nsITellableStream: nsJSIID; + nsIUnicharInputStream: nsJSIID; + nsIUnicharLineInputStream: nsJSIID; + nsIUnicharOutputStream: nsJSIID; + nsIBlocklistService: nsJSIID; + nsICrashReporter: nsJSIID; + nsIDeviceSensorData: nsJSIID; + nsIDeviceSensors: nsJSIID; + nsIGIOHandlerApp: nsJSIID; + nsIGIOMimeApp: nsJSIID; + nsIGIOService: nsJSIID; + nsIGSettingsCollection: nsJSIID; + nsIGSettingsService: nsJSIID; + nsIGeolocationUpdate: nsJSIID; + nsIGeolocationProvider: nsJSIID; + nsIHapticFeedback: nsJSIID; + nsIPlatformInfo: nsJSIID; + nsISystemInfo: nsJSIID; + nsIXULAppInfo: nsJSIID; + nsIXULRuntime: nsJSIID; + nsIEnvironment: nsJSIID; + nsIEventTarget: nsJSIID; + nsINamed: nsJSIID; + nsIProcess: nsJSIID; + nsIRunnable: nsJSIID; + nsIRunnablePriority: nsJSIID; + nsISerialEventTarget: nsJSIID; + nsISupportsPriority: nsJSIID; + nsIThread: nsJSIID; + nsINestedEventLoopCondition: nsJSIID; + nsIThreadManager: nsJSIID; + nsIThreadShutdown: nsJSIID; + nsITimerCallback: nsJSIID; + nsITimer: nsJSIID; + nsITimerManager: nsJSIID; nsIScriptableOK: nsJSIID; nsIScriptableWithNotXPCOM: nsJSIID; - nsIEditingSession: nsJSIID; - nsIAccessibilityService: nsJSIID; - nsIAccessible: nsJSIID; - nsIAccessibleAnnouncementEvent: nsJSIID; - nsIAccessibleApplication: nsJSIID; - nsIAccessibleCaretMoveEvent: nsJSIID; - nsIAccessibleDocument: nsJSIID; - nsIAccessibleEditableText: nsJSIID; - nsIAccessibleEvent: nsJSIID; - nsIAccessibleHideEvent: nsJSIID; - nsIAccessibleHyperLink: nsJSIID; - nsIAccessibleHyperText: nsJSIID; - nsIAccessibleImage: nsJSIID; - nsIAccessibleMacNSObjectWrapper: nsJSIID; - nsIAccessibleMacInterface: nsJSIID; - nsIAccessibleMacEvent: nsJSIID; - nsIAccessibleObjectAttributeChangedEvent: nsJSIID; - nsIAccessiblePivot: nsJSIID; - nsIAccessibleTraversalRule: nsJSIID; - nsIAccessibleRelation: nsJSIID; - nsIAccessibleRole: nsJSIID; - nsIAccessibleScrollingEvent: nsJSIID; - nsIAccessibleSelectable: nsJSIID; - nsIAccessibleStateChangeEvent: nsJSIID; - nsIAccessibleStates: nsJSIID; - nsIAccessibleTable: nsJSIID; - nsIAccessibleTableCell: nsJSIID; - nsIAccessibleTableChangeEvent: nsJSIID; - nsIAccessibleText: nsJSIID; - nsIAccessibleTextChangeEvent: nsJSIID; - nsIAccessibleTextLeafPoint: nsJSIID; - nsIAccessibleTextRange: nsJSIID; - nsIAccessibleTextSelectionChangeEvent: nsJSIID; - nsIAccessibleScrollType: nsJSIID; - nsIAccessibleCoordinateType: nsJSIID; - nsIAccessibleValue: nsJSIID; - nsIApplicationReputationService: nsJSIID; - nsIApplicationReputationQuery: nsJSIID; - nsIApplicationReputationCallback: nsJSIID; - nsIBits: nsJSIID; - nsIBitsNewRequestCallback: nsJSIID; - nsIBitsRequest: nsJSIID; - nsIBitsCallback: nsJSIID; + mozIJSSubScriptLoader: nsJSIID; + xpcIJSWeakReference: nsJSIID; + nsIXPCComponents_Classes: nsJSIID; + nsIXPCComponents_Results: nsJSIID; + nsIXPCComponents_ID: nsJSIID; + nsIXPCComponents_Exception: nsJSIID; + nsIXPCComponents_Constructor: nsJSIID; + nsIXPCComponents_utils_Sandbox: nsJSIID; + nsIScheduledGCCallback: nsJSIID; + nsIXPCComponents_Utils: nsJSIID; + nsIXPCComponents: nsJSIID; + nsIXPCTestObjectReadOnly: nsJSIID; + nsIXPCTestObjectReadWrite: nsJSIID; + nsIXPCTestBug809674: nsJSIID; + nsIXPCTestCEnums: nsJSIID; + nsIXPCTestInterfaceA: nsJSIID; + nsIXPCTestInterfaceB: nsJSIID; + nsIXPCTestInterfaceC: nsJSIID; + nsIXPCTestParams: nsJSIID; + nsIXPCTestReturnCodeParent: nsJSIID; + nsIXPCTestReturnCodeChild: nsJSIID; + nsIXPCTestFunctionInterface: nsJSIID; + nsIXPCTestUtils: nsJSIID; + nsIXPCTestTypeScript: nsJSIID; + nsIBrowserController: nsJSIID; + nsIController: nsJSIID; + nsICommandController: nsJSIID; + nsIControllers: nsJSIID; + nsINativeAppSupport: nsJSIID; + nsIXREDirProvider: nsJSIID; + nsIZipWriter: nsJSIID; } } // global @@ -16415,55 +16278,9 @@ type nsProxyUsage = i32; type nsSecurityFlags = u32; type nsServerSocketFlag = u32; type nsSuspendedTypes = u32; -type nsTaskbarProgressState = i32; type nsViewID = u64; -/** - * Gecko XPCOM builtins. - */ -declare global { - /** - * Generic IDs are created by most code which passes a nsID to js. - * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#24 - */ - interface nsID { - readonly number: uuid; - } - - /** - * In addition to nsID, interface IIDs support instanceof type guards, - * and expose constants defined on the class, including variants from enums. - * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#45 - */ - type nsJSIID = nsID & Constants & enums & { - new (_: never): void; - prototype: iface; - } - - /** A union type of all known interface IIDs. */ - type nsIID = nsIXPCComponents_Interfaces[keyof nsIXPCComponents_Interfaces]; - - /** A generic to resolve QueryInterface return type from a nsIID. */ - export type nsQIResult = iid extends { prototype: infer U } ? U : never; - - /** u32 */ - type nsresult = u32; - - // Numeric typedefs, useful as a quick reference in method signatures. - type double = number; - type float = number; - type i16 = number; - type i32 = number; - type i64 = number; - type u16 = number; - type u32 = number; - type u64 = number; - type u8 = number; -} - -/** - * XPCOM utility types. - */ +// XPCOM internal utility types. /** XPCOM inout param is passed in as a js object with a value property. */ type InOutParam = { value: T }; @@ -16477,10 +16294,4 @@ type Enums = enums; /** Callable accepts either form of a [function] interface. */ type Callable = iface | Extract -/** Picks only const number properties from T. */ -type Constants = { [K in keyof T as IfConst]: T[K] }; - -/** Resolves only for keys K whose corresponding type T is a narrow number. */ -type IfConst = T extends number ? (number extends T ? never : K) : never; - export {}; diff --git a/tools/@types/lib.gecko.xpidl.d.ts b/tools/@types/lib.gecko.xpidl.d.ts new file mode 100644 index 000000000000..2bcad68d3955 --- /dev/null +++ b/tools/@types/lib.gecko.xpidl.d.ts @@ -0,0 +1,47 @@ +/** + * Gecko XPIDL base types. + */ + +/** + * Generic IDs are created by most code which passes a nsID to js. + * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#24 + */ +interface nsID { + readonly number: uuid; +} + +/** + * In addition to nsID, interface IIDs support instanceof type guards, + * and expose constants defined on the class, including variants from enums. + * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#45 + */ +type nsJSIID = nsID & Constants & enums & { + new (_: never): void; + prototype: iface; +} + +/** A union type of all known interface IIDs. */ +type nsIID = nsIXPCComponents_Interfaces[keyof nsIXPCComponents_Interfaces]; + +/** A generic to resolve QueryInterface return type from a nsIID. */ +type nsQIResult = iid extends { prototype: infer U } ? U : never; + +/** Picks only const number properties from T. */ +type Constants = { [K in keyof T as IfConst]: T[K] }; + +/** Resolves only for keys K whose corresponding type T is a narrow number. */ +type IfConst = T extends number ? (number extends T ? never : K) : never; + +/** u32 */ +type nsresult = u32; + +// Numeric typedefs, useful as a quick reference in method signatures. +type double = number; +type float = number; +type i16 = number; +type i32 = number; +type i64 = number; +type u16 = number; +type u32 = number; +type u64 = number; +type u8 = number; diff --git a/tools/ts/build_xpcom.js b/tools/ts/build_xpcom.js index 0351d1b7b727..0c8f336aeec7 100644 --- a/tools/ts/build_xpcom.js +++ b/tools/ts/build_xpcom.js @@ -20,6 +20,68 @@ const HEADER = `/** */ `; +const FOOTER = ` +// XPCOM internal utility types. + +/** XPCOM inout param is passed in as a js object with a value property. */ +type InOutParam = { value: T }; + +/** XPCOM out param is written to the passed in object's value property. */ +type OutParam = { value?: T }; + +/** A named type to enable interfaces to inherit from enums. */ +type Enums = enums; + +/** Callable accepts either form of a [function] interface. */ +type Callable = iface | Extract + +export {}; +`; + +const PLATFORM_SPECIFIC = new Set([ + "nsIAboutThirdParty.idl", + "nsIAboutWindowsMessages.idl", + "nsIAccessibleMacInterface.idl", + "nsIApplicationChooser.idl", + "nsIDefaultAgent.idl", + "nsIGeolocationUIUtilsWin.idl", + "nsIGtkTaskbarProgress.idl", + "nsIGNOMEShellService.idl", + "nsIJumpListBuilder.idl", + "nsIKeychainMigrationUtils.idl", + "nsILocalFileMac.idl", + "nsIMacDockSupport.idl", + "nsIMacFinderProgress.idl", + "nsIMacPreferencesReader.idl", + "nsIMacSharingService.idl", + "nsIMacShellService.idl", + "nsIMacUserActivityUpdater.idl", + "nsIMacWebAppUtils.idl", + "nsINamedPipeService.idl", + "nsIOpenTabsProvider.idl", + "nsIPrintSettingsWin.idl", + "nsIStandaloneNativeMenu.idl", + "nsITaskbarOverlayIconController.idl", + "nsITaskbarPreview.idl", + "nsITaskbarPreviewButton.idl", + "nsITaskbarPreviewController.idl", + "nsITaskbarProgress.idl", + "nsITaskbarTabPreview.idl", + "nsITaskbarWindowPreview.idl", + "nsITouchBarHelper.idl", + "nsITouchBarInput.idl", + "nsITouchBarUpdater.idl", + "nsIWinAppHelper.idl", + "nsIWinTaskbar.idl", + "nsIWinTaskSchedulerService.idl", + "nsIWindowsAlertsService.idl", + "nsIWindowsMutex.idl", + "nsIWindowsPackageManager.idl", + "nsIWindowsRegKey.idl", + "nsIWindowsShellService.idl", + "nsIWindowsUIUtils.idl", +]); + // Emit a typescript interface, along with any related enums. function ts_interface(iface) { let lines = []; @@ -88,15 +150,15 @@ function ts_interface(iface) { } // Link all generated .d.json files into a self-contained ts typelib. -function ts_link(dir, files) { +function ts_link(dir, files, filter) { let lines = [HEADER, "declare global {\n"]; let typedefs = {}; let iids = []; - for (let djson of files) { + for (let djson of files.sort()) { let modules = JSON.parse(fs.readFileSync(`${dir}/${djson}`, "utf8")); - for (let mod of modules) { + for (let mod of modules.filter(m => filter(m.path.split("/").at(-1)))) { lines.push(`// ${URL}${mod.path}\n`); Object.assign(typedefs, Object.fromEntries(mod.typedefs ?? [])); @@ -119,20 +181,23 @@ function ts_link(dir, files) { for (let [id, type] of Object.entries(typedefs).sort()) { lines.push(`type ${id} = ${type};`); } - lines.push(""); + lines.push(FOOTER); - // Include xpcom builtins. - lines.push(fs.readFileSync(`${__dirname}/config/intrinsics.d.ts`, "utf8")); - return lines; + return lines.join("\n"); } // For testing. module.exports = { ts_link }; -function main(lib_dts, djson_dir, ...djson_files) { - let dts = ts_link(djson_dir, djson_files).join("\n"); - console.log(`[INFO] ${lib_dts} (${dts.length.toLocaleString()} bytes)`); - fs.writeFileSync(lib_dts, dts); +function main(lib_xpcom, djson_dir, ...djson_files) { + let dts = ts_link(djson_dir, djson_files, m => !PLATFORM_SPECIFIC.has(m)); + console.log(`[INFO] ${lib_xpcom} (${dts.length.toLocaleString()} bytes)`); + fs.writeFileSync(lib_xpcom, dts); + + let lib_plat = lib_xpcom.replace("xpcom", process.platform); + let spec = ts_link(djson_dir, djson_files, m => PLATFORM_SPECIFIC.has(m)); + console.log(`[INFO] ${lib_plat} (${spec.length.toLocaleString()} bytes)`); + fs.writeFileSync(lib_plat, spec); } if (require.main === module) { diff --git a/tools/ts/config/intrinsics.d.ts b/tools/ts/config/intrinsics.d.ts deleted file mode 100644 index 125e401eaed0..000000000000 --- a/tools/ts/config/intrinsics.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Gecko XPCOM builtins. - */ -declare global { - /** - * Generic IDs are created by most code which passes a nsID to js. - * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#24 - */ - interface nsID { - readonly number: uuid; - } - - /** - * In addition to nsID, interface IIDs support instanceof type guards, - * and expose constants defined on the class, including variants from enums. - * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#45 - */ - type nsJSIID = nsID & Constants & enums & { - new (_: never): void; - prototype: iface; - } - - /** A union type of all known interface IIDs. */ - type nsIID = nsIXPCComponents_Interfaces[keyof nsIXPCComponents_Interfaces]; - - /** A generic to resolve QueryInterface return type from a nsIID. */ - export type nsQIResult = iid extends { prototype: infer U } ? U : never; - - /** u32 */ - type nsresult = u32; - - // Numeric typedefs, useful as a quick reference in method signatures. - type double = number; - type float = number; - type i16 = number; - type i32 = number; - type i64 = number; - type u16 = number; - type u32 = number; - type u64 = number; - type u8 = number; -} - -/** - * XPCOM utility types. - */ - -/** XPCOM inout param is passed in as a js object with a value property. */ -type InOutParam = { value: T }; - -/** XPCOM out param is written to the passed in object's value property. */ -type OutParam = { value?: T }; - -/** A named type to enable interfaces to inherit from enums. */ -type Enums = enums; - -/** Callable accepts either form of a [function] interface. */ -type Callable = iface | Extract - -/** Picks only const number properties from T. */ -type Constants = { [K in keyof T as IfConst]: T[K] }; - -/** Resolves only for keys K whose corresponding type T is a narrow number. */ -type IfConst = T extends number ? (number extends T ? never : K) : never; - -export {}; diff --git a/tools/ts/mach_commands.py b/tools/ts/mach_commands.py index f26aa7ef8c98..828df8f2a908 100644 --- a/tools/ts/mach_commands.py +++ b/tools/ts/mach_commands.py @@ -99,11 +99,14 @@ def setup(ctx): @SubCommand("ts", "update", description="Update tools/@types libraries.") def update(ctx): typelib_dir = mozpath.join(ctx.topsrcdir, "tools/@types") + platforms = ["darwin", "linux", "win32"] - for lib in targets: + for lib in targets + platforms: file = f"lib.gecko.{lib}.d.ts" path = mozpath.join(ctx.distdir, "@types", file) if not os.path.exists(path): + if lib in platforms: + continue print(f"[ERROR] {path} not found. Did you run `mach ts build`?") return 1 diff --git a/tools/ts/test/baselines/xpctest.d.ts b/tools/ts/test/baselines/xpctest.d.ts index 6ffc3f1b3079..6a7c664f1442 100644 --- a/tools/ts/test/baselines/xpctest.d.ts +++ b/tools/ts/test/baselines/xpctest.d.ts @@ -187,52 +187,7 @@ interface nsIXPCComponents_Interfaces { // Typedefs from xpidl. type PRTime = i64; -/** - * Gecko XPCOM builtins. - */ -declare global { - /** - * Generic IDs are created by most code which passes a nsID to js. - * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#24 - */ - interface nsID { - readonly number: uuid; - } - - /** - * In addition to nsID, interface IIDs support instanceof type guards, - * and expose constants defined on the class, including variants from enums. - * https://searchfox.org/mozilla-central/source/js/xpconnect/src/XPCJSID.cpp#45 - */ - type nsJSIID = nsID & Constants & enums & { - new (_: never): void; - prototype: iface; - } - - /** A union type of all known interface IIDs. */ - type nsIID = nsIXPCComponents_Interfaces[keyof nsIXPCComponents_Interfaces]; - - /** A generic to resolve QueryInterface return type from a nsIID. */ - export type nsQIResult = iid extends { prototype: infer U } ? U : never; - - /** u32 */ - type nsresult = u32; - - // Numeric typedefs, useful as a quick reference in method signatures. - type double = number; - type float = number; - type i16 = number; - type i32 = number; - type i64 = number; - type u16 = number; - type u32 = number; - type u64 = number; - type u8 = number; -} - -/** - * XPCOM utility types. - */ +// XPCOM internal utility types. /** XPCOM inout param is passed in as a js object with a value property. */ type InOutParam = { value: T }; @@ -246,10 +201,4 @@ type Enums = enums; /** Callable accepts either form of a [function] interface. */ type Callable = iface | Extract -/** Picks only const number properties from T. */ -type Constants = { [K in keyof T as IfConst]: T[K] }; - -/** Resolves only for keys K whose corresponding type T is a narrow number. */ -type IfConst = T extends number ? (number extends T ? never : K) : never; - export {}; diff --git a/tools/ts/test/xpcom.test.js b/tools/ts/test/xpcom.test.js index 0c5daf4bfb20..21f7a59d194c 100644 --- a/tools/ts/test/xpcom.test.js +++ b/tools/ts/test/xpcom.test.js @@ -13,6 +13,6 @@ const dir = path.join(__dirname, "../../../xpcom/idl-parser/xpidl/fixtures/"); const files = ["xpctest.d.json"]; test("xpctest.d.json produces expected baseline d.ts", () => { - let dts = ts_link(dir, files).join("\n"); + let dts = ts_link(dir, files, () => true); expect(dts).toEqual(fs.readFileSync(test_dts, "utf8")); });