Name Description Size
AboutNewTab.jsm init - Initializes an instance of Activity Stream if one doesn't exist already and creates the instance of Remote Page Manager which Activity Stream uses for message passing. @param {obj} pageListener - Optional argument. An existing instance of RemotePages which Activity Stream has previously made, and we would like to re-use. 3393
AsanReporter.jsm -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 6029
AsyncTabSwitcher.jsm The tab switcher is responsible for asynchronously switching tabs in e10s. It waits until the new tab is ready (i.e., the layer tree is available) before switching to it. Then it unloads the layer tree for the old tab. The tab switcher is a state machine. For each tab, it maintains state about whether the layer tree for the tab is available, being loaded, being unloaded, or unavailable. It also keeps track of the tab currently being displayed, the tab it's trying to load, and the tab the user has asked to switch to. The switcher object is created upon tab switch. It is released when there are no pending tabs to load or unload. The following general principles have guided the design: 1. We only request one layer tree at a time. If the user switches to a different tab while waiting, we don't request the new layer tree until the old tab has loaded or timed out. 2. If loading the layers for a tab times out, we show the spinner and possibly request the layer tree for another tab if the user has requested one. 3. We discard layer trees on a delay. This way, if the user is switching among the same tabs frequently, we don't continually load the same tabs. It's important that we always show either the spinner or a tab whose layers are available. Otherwise the compositor will draw an entirely black frame, which is very jarring. To ensure this never happens when switching away from a tab, we assume the old tab might still be drawn until a MozAfterPaint event occurs. Because layout and compositing happen asynchronously, we don't have any other way of knowing when the switch actually takes place. Therefore, we don't unload the old tab until the next MozAfterPaint event. 42690
BrowserUsageTelemetry.jsm -*- js-indent-level: 2; indent-tabs-mode: nil -*- 27589
BrowserWindowTracker.jsm This module tracks each browser window and informs network module the current selected tab's content outer window ID. 5919
ContentClick.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 3367
ContentCrashHandlers.jsm BrowserWeakMap is exactly like a WeakMap, but expects <xul:browser> objects only. Under the hood, BrowserWeakMap keys the map off of the <xul:browser> permanentKey. If, however, the browser has never gotten a permanentKey, it falls back to keying on the <xul:browser> element itself. 35931
ContentMetaHandler.jsm Checks if the incoming meta tag has a greater score than the current best score by checking the index of the meta tag in the list of rules provided. @param {Array} aRules The list of rules for a given type of meta tag @param {String} aTag The name or property of the incoming meta tag @param {String} aEntry The current best entry for the given meta tag @returns {Boolean} true if the incoming meta tag is better than the current best meta tag of that same kind, false otherwise 5773
ContentObservers.js -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 2276
ContentSearch.jsm ContentSearch receives messages named INBOUND_MESSAGE and sends messages named OUTBOUND_MESSAGE. The data of each message is expected to look like { type, data }. type is the message's type (or subtype if you consider the type of the message itself to be INBOUND_MESSAGE), and data is data that is specific to the type. Inbound messages have the following types: AddFormHistoryEntry Adds an entry to the search form history. data: the entry, a string GetSuggestions Retrieves an array of search suggestions given a search string. data: { engineName, searchString } GetState Retrieves the current search engine state. data: null GetStrings Retrieves localized search UI strings. data: null ManageEngines Opens the search engine management window. data: null RemoveFormHistoryEntry Removes an entry from the search form history. data: the entry, a string Search Performs a search. Any GetSuggestions messages in the queue from the same target will be cancelled. data: { engineName, searchString, healthReportKey, searchPurpose } SetCurrentEngine Sets the current engine. data: the name of the engine SpeculativeConnect Speculatively connects to an engine. data: the name of the engine Outbound messages have the following types: CurrentEngine Broadcast when the current engine changes. data: see _currentEngineObj CurrentState Broadcast when the current search state changes. data: see currentStateObj State Sent in reply to GetState. data: see currentStateObj Strings Sent in reply to GetStrings data: Object containing string names and values for the current locale. Suggestions Sent in reply to GetSuggestions. data: see _onMessageGetSuggestions SuggestionsCancelled Sent in reply to GetSuggestions when pending GetSuggestions events are cancelled. data: null 19129
Discovery.jsm 4160
EveryWindow.jsm This module enables consumers to register callbacks on every current and future browser window. Usage: EveryWindow.registerCallback(id, init, uninit); EveryWindow.unregisterCallback(id); id is expected to be a unique value that identifies the consumer, to be used for unregistration. If the id is already in use, registerCallback returns false without doing anything. Each callback will receive the window for which it is presently being called as the first argument. init is called on every existing window at the time of registration, and on all future windows at browser-delayed-startup-finished. uninit is called on every existing window if requested at the time of unregistration, and at the time of domwindowclosed. If the window is closing, a second argument is passed with value `true`. 3430
ExtensionsUI.jsm 19550
FaviconLoader.jsm 17942
FormValidationHandler.jsm Chrome side handling of form validation popup. 4224
HomePage.jsm globals ChromeUtils, Services 2738
LaterRun.jsm 5655
LiveBookmarkMigrator.jsm 9248
moz.build 5308
NewTabPagePreloading.jsm This module is in charge of preloading 'new tab' pages for use when the user opens a new tab. 6914
OpenInTabsUtils.jsm Utility functions that can be used when opening multiple tabs, that can be called without any tabbrowser instance. 2793
PageActions.jsm Inits. Call to init. 45190
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: Cu.import("resource://gre/modules/Integration.jsm"); Cu.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. 38541
PermissionUITelemetry.jsm 5009
PingCentre.jsm Observe various notifications and send them to a telemetry endpoint. @param {Object} options @param {string} options.topic - a unique ID for users of PingCentre to distinguish their data on the server side. @param {string} options.overrideEndpointPref - optional pref for URL where the POST is sent. 10132
ProcessHangMonitor.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 17291
ReaderParent.jsm Gets an article for a given URL. This method will download and parse a document. @param url The article URL. @param browser The browser where the article is currently loaded. @return {Promise} @resolves JS object representing the article, or null if no article is found. 5224
RemotePrompt.jsm 3682
Sanitizer.jsm Cookie lifetime policy is currently used to cleanup on shutdown other components such as QuotaManager, localStorage, ServiceWorkers. 38311
SelectionChangedMenulist.jsm 966
SiteDataManager.jsm Retrieves the amount of space currently used by disk cache. You can use DownloadUtils.convertByteUnits to convert this to a user-understandable size/unit combination. @returns a Promise that resolves with the cache size on disk in bytes. 15334
SitePermissions.jsm A helper module to manage temporary 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); 37061
TabsList.jsm Populate the popup with menuitems and setup the listeners. 7940
TabUnloader.jsm -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 2114
test 2
ThemeVariableMap.jsm 3488
TransientPrefs.jsm Use for preferences that should only be visible when they've been modified. When reset to their default state, they remain visible until restarting the application. 763
webrtcUI.jsm 47717
Windows8WindowFrameColor.jsm 2047
WindowsJumpLists.jsm -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 17181
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. 26931
ZoomUI.jsm Updates zoom controls. @param {object} aBrowser The browser that the zoomed content resides in. @param {boolean} aAnimate Should be True for all cases unless the zoom change is related to tab switching. Optional 4463