Name Description Size 547
OpenInTabsUtils.jsm Utility functions that can be used when opening multiple tabs, that can be called without any tabbrowser instance. 2852
PermissionUI.jsm PermissionUI is responsible for exposing both a prototype PermissionPrompt that can be used by arbitrary browser components and add-ons, but also hosts the implementations of built-in permission prompts. If you're developing a feature that requires web content to ask for special permissions from the user, this module is for you. Suppose a system add-on wants to add a new prompt for a new request for getting more low-level access to the user's sound card, and the permission request is coming up from content by way of the nsContentPermissionHelper. The system add-on could then do the following: ChromeUtils.import("resource://gre/modules/Integration.jsm"); ChromeUtils.import("resource:///modules/PermissionUI.jsm"); const SoundCardIntegration = (base) => ({ __proto__: base, createPermissionPrompt(type, request) { if (type != "sound-api") { return super.createPermissionPrompt(...arguments); } return { __proto__: PermissionUI.PermissionPromptForRequestPrototype, get permissionKey() { return "sound-permission"; } // etc - see the documentation for PermissionPrompt for // a better idea of what things one can and should override. } }, }); // Add-on startup: Integration.contentPermission.register(SoundCardIntegration); // ... // Add-on shutdown: Integration.contentPermission.unregister(SoundCardIntegration); Note that PermissionPromptForRequestPrototype must be used as the prototype, since the prompt is wrapping an nsIContentPermissionRequest, and going through nsIContentPermissionPrompt. It is, however, possible to take advantage of PermissionPrompt without having to go through nsIContentPermissionPrompt or with a nsIContentPermissionRequest. The PermissionPromptPrototype can be imported, subclassed, and have prompt() called directly, without the caller having called into createPermissionPrompt. 19396
RecentWindow.jsm Get the most recent browser window. @param aOptions an object accepting the arguments for the search. * private: true to restrict the search to private windows only, false to restrict the search to non-private only. Omit the property to search in both groups. * allowPopups: true if popup windows are permissable. 2497
Sanitizer.jsm Deletes privacy sensitive data in a batch, optionally showing the sanitize UI, according to user preferences @returns null if everything's fine an object in the form { itemName: error, ... } on (partial) failure 11187
SitePermissions.jsm A helper module to manage temporarily blocked permissions. Permissions are keyed by browser, so methods take a Browser element to identify the corresponding permission set. This uses a WeakMap to key browsers, so that entries are automatically cleared once the browser stops existing (once there are no other references to the browser object); 21125
test 1
WindowsJumpLists.jsm Constants 19472
WindowsPreviewPerTab.jsm This module implements the front end behavior for AeroPeek. Starting in Windows Vista, the taskbar began showing live thumbnail previews of windows when the user hovered over the window icon in the taskbar. Starting with Windows 7, the taskbar allows an application to expose its tabbed interface in the taskbar by showing thumbnail previews rather than the default window preview. Additionally, when a user hovers over a thumbnail (tab or window), they are shown a live preview of the window (or tab + its containing window). In Windows 7, a title, icon, close button and optional toolbar are shown for each preview. This feature does not make use of the toolbar. For window previews, the title is the window title and the icon the window icon. For tab previews, the title is the page title and the page's favicon. In both cases, the close button "does the right thing." The primary objects behind this feature are nsITaskbarTabPreview and nsITaskbarPreviewController. Each preview has a controller. The controller responds to the user's interactions on the taskbar and provides the required data to the preview for determining the size of the tab and thumbnail. The PreviewController class implements this interface. The preview will request the controller to provide a thumbnail or preview when the user interacts with the taskbar. To reduce the overhead of drawing the tab area, the controller implementation caches the tab's contents in a <canvas> element. If no previews or thumbnails have been requested for some time, the controller will discard its cached tab contents. Screen real estate is limited so when there are too many thumbnails to fit on the screen, the taskbar stops displaying thumbnails and instead displays just the title, icon and close button in a similar fashion to previous versions of the taskbar. If there are still too many previews to fit on the screen, the taskbar resorts to a scroll up and scroll down button pair to let the user scroll through the list of tabs. Since this is undoubtedly inconvenient for users with many tabs, the AeroPeek objects turns off all of the tab previews. This tells the taskbar to revert to one preview per window. If the number of tabs falls below this magic threshold, the preview-per-tab behavior returns. There is no reliable way to determine when the scroll buttons appear on the taskbar, so a magic pref-controlled number determines when this threshold has been crossed. 27271