Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8.
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["AccessFu"]; // jshint ignore:line
|
var EXPORTED_SYMBOLS = ["AccessFu"]; // jshint ignore:line
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
|
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
|
||||||
@@ -23,7 +23,7 @@ const SCREENREADER_SETTING = "accessibility.screenreader";
|
|||||||
const QUICKNAV_MODES_PREF = "accessibility.accessfu.quicknav_modes";
|
const QUICKNAV_MODES_PREF = "accessibility.accessfu.quicknav_modes";
|
||||||
const QUICKNAV_INDEX_PREF = "accessibility.accessfu.quicknav_index";
|
const QUICKNAV_INDEX_PREF = "accessibility.accessfu.quicknav_index";
|
||||||
|
|
||||||
this.AccessFu = { // jshint ignore:line
|
var AccessFu = { // jshint ignore:line
|
||||||
/**
|
/**
|
||||||
* Initialize chrome-layer accessibility functionality.
|
* Initialize chrome-layer accessibility functionality.
|
||||||
* If accessibility is enabled on the platform, then a special accessibility
|
* If accessibility is enabled on the platform, then a special accessibility
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["Roles", "Events", "Relations",
|
var EXPORTED_SYMBOLS = ["Roles", "Events", "Relations",
|
||||||
"Filters", "States", "Prefilters"];
|
"Filters", "States", "Prefilters"];
|
||||||
|
|
||||||
function ConstantsMap(aObject, aPrefix, aMap = {}, aModifier = null) {
|
function ConstantsMap(aObject, aPrefix, aMap = {}, aModifier = null) {
|
||||||
let offset = aPrefix.length;
|
let offset = aPrefix.length;
|
||||||
|
|||||||
@@ -18,16 +18,16 @@ ChromeUtils.defineModuleGetter(this, "TraversalHelper",
|
|||||||
ChromeUtils.defineModuleGetter(this, "Presentation",
|
ChromeUtils.defineModuleGetter(this, "Presentation",
|
||||||
"resource://gre/modules/accessibility/Presentation.jsm");
|
"resource://gre/modules/accessibility/Presentation.jsm");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ContentControl"];
|
var EXPORTED_SYMBOLS = ["ContentControl"];
|
||||||
|
|
||||||
const MOVEMENT_GRANULARITY_CHARACTER = 1;
|
const MOVEMENT_GRANULARITY_CHARACTER = 1;
|
||||||
const MOVEMENT_GRANULARITY_WORD = 2;
|
const MOVEMENT_GRANULARITY_WORD = 2;
|
||||||
const MOVEMENT_GRANULARITY_PARAGRAPH = 8;
|
const MOVEMENT_GRANULARITY_PARAGRAPH = 8;
|
||||||
|
|
||||||
this.ContentControl = function ContentControl(aContentScope) {
|
function ContentControl(aContentScope) {
|
||||||
this._contentScope = Cu.getWeakReference(aContentScope);
|
this._contentScope = Cu.getWeakReference(aContentScope);
|
||||||
this._childMessageSenders = new WeakMap();
|
this._childMessageSenders = new WeakMap();
|
||||||
};
|
}
|
||||||
|
|
||||||
this.ContentControl.prototype = {
|
this.ContentControl.prototype = {
|
||||||
messagesOfInterest: ["AccessFu:MoveCursor",
|
messagesOfInterest: ["AccessFu:MoveCursor",
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ ChromeUtils.defineModuleGetter(this, "Events",
|
|||||||
ChromeUtils.defineModuleGetter(this, "States",
|
ChromeUtils.defineModuleGetter(this, "States",
|
||||||
"resource://gre/modules/accessibility/Constants.jsm");
|
"resource://gre/modules/accessibility/Constants.jsm");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["EventManager"];
|
var EXPORTED_SYMBOLS = ["EventManager"];
|
||||||
|
|
||||||
this.EventManager = function EventManager(aContentScope, aContentControl) {
|
function EventManager(aContentScope, aContentControl) {
|
||||||
this.contentScope = aContentScope;
|
this.contentScope = aContentScope;
|
||||||
this.contentControl = aContentControl;
|
this.contentControl = aContentControl;
|
||||||
this.addEventListener = this.contentScope.addEventListener.bind(
|
this.addEventListener = this.contentScope.addEventListener.bind(
|
||||||
@@ -36,7 +36,7 @@ this.EventManager = function EventManager(aContentScope, aContentControl) {
|
|||||||
this.webProgress = this.contentScope.docShell.
|
this.webProgress = this.contentScope.docShell.
|
||||||
QueryInterface(Ci.nsIInterfaceRequestor).
|
QueryInterface(Ci.nsIInterfaceRequestor).
|
||||||
getInterface(Ci.nsIWebProgress);
|
getInterface(Ci.nsIWebProgress);
|
||||||
};
|
}
|
||||||
|
|
||||||
this.EventManager.prototype = {
|
this.EventManager.prototype = {
|
||||||
editState: { editing: false },
|
editState: { editing: false },
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["GestureSettings", "GestureTracker"]; // jshint ignore:line
|
var EXPORTED_SYMBOLS = ["GestureSettings", "GestureTracker"]; // jshint ignore:line
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ Point.prototype = {
|
|||||||
* An externally accessible collection of settings used in gesture resolition.
|
* An externally accessible collection of settings used in gesture resolition.
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
this.GestureSettings = { // jshint ignore:line
|
var GestureSettings = { // jshint ignore:line
|
||||||
/**
|
/**
|
||||||
* Maximum duration of swipe
|
* Maximum duration of swipe
|
||||||
* @type {Number}
|
* @type {Number}
|
||||||
@@ -179,7 +179,7 @@ this.GestureSettings = { // jshint ignore:line
|
|||||||
* gestures.
|
* gestures.
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
this.GestureTracker = { // jshint ignore:line
|
var GestureTracker = { // jshint ignore:line
|
||||||
/**
|
/**
|
||||||
* Reset GestureTracker to its initial state.
|
* Reset GestureTracker to its initial state.
|
||||||
* @return {[type]} [description]
|
* @return {[type]} [description]
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ChromeUtils.defineModuleGetter(this, "Roles", // jshint ignore:line
|
|||||||
ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
|
ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
|
||||||
"resource://gre/modules/accessibility/Constants.jsm");
|
"resource://gre/modules/accessibility/Constants.jsm");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["UtteranceGenerator", "BrailleGenerator"]; // jshint ignore:line
|
var EXPORTED_SYMBOLS = ["UtteranceGenerator", "BrailleGenerator"]; // jshint ignore:line
|
||||||
|
|
||||||
var OutputGenerator = {
|
var OutputGenerator = {
|
||||||
|
|
||||||
@@ -581,7 +581,7 @@ var OutputGenerator = {
|
|||||||
* clicked event. Speaking only 'clicked' makes sense. Speaking 'button' does
|
* clicked event. Speaking only 'clicked' makes sense. Speaking 'button' does
|
||||||
* not.
|
* not.
|
||||||
*/
|
*/
|
||||||
this.UtteranceGenerator = { // jshint ignore:line
|
var UtteranceGenerator = { // jshint ignore:line
|
||||||
__proto__: OutputGenerator, // jshint ignore:line
|
__proto__: OutputGenerator, // jshint ignore:line
|
||||||
|
|
||||||
gActionMap: {
|
gActionMap: {
|
||||||
@@ -840,7 +840,7 @@ this.UtteranceGenerator = { // jshint ignore:line
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.BrailleGenerator = { // jshint ignore:line
|
var BrailleGenerator = { // jshint ignore:line
|
||||||
__proto__: OutputGenerator, // jshint ignore:line
|
__proto__: OutputGenerator, // jshint ignore:line
|
||||||
|
|
||||||
genForContext: function genForContext(aContext) {
|
genForContext: function genForContext(aContext) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["PointerRelay", "PointerAdapter"]; // jshint ignore:line
|
var EXPORTED_SYMBOLS = ["PointerRelay", "PointerAdapter"]; // jshint ignore:line
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ var PointerRelay = { // jshint ignore:line
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.PointerAdapter = { // jshint ignore:line
|
var PointerAdapter = { // jshint ignore:line
|
||||||
start: function PointerAdapter_start() {
|
start: function PointerAdapter_start() {
|
||||||
Logger.debug("PointerAdapter.start");
|
Logger.debug("PointerAdapter.start");
|
||||||
GestureTracker.reset();
|
GestureTracker.reset();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ ChromeUtils.defineModuleGetter(this, "Roles", // jshint ignore:line
|
|||||||
ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
|
ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
|
||||||
"resource://gre/modules/accessibility/Constants.jsm");
|
"resource://gre/modules/accessibility/Constants.jsm");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["Presentation"]; // jshint ignore:line
|
var EXPORTED_SYMBOLS = ["Presentation"]; // jshint ignore:line
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interface for all presenter classes. A presenter could be, for example,
|
* The interface for all presenter classes. A presenter could be, for example,
|
||||||
@@ -672,7 +672,7 @@ BraillePresenter.prototype.textSelectionChanged =
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
this.Presentation = { // jshint ignore:line
|
var Presentation = { // jshint ignore:line
|
||||||
get presenters() {
|
get presenters() {
|
||||||
delete this.presenters;
|
delete this.presenters;
|
||||||
let presenterMap = {
|
let presenterMap = {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["TraversalRules", "TraversalHelper"]; // jshint ignore:line
|
var EXPORTED_SYMBOLS = ["TraversalRules", "TraversalHelper"]; // jshint ignore:line
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
|
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
@@ -180,7 +180,7 @@ var gSimplePreFilter = Prefilters.DEFUNCT |
|
|||||||
Prefilters.ARIA_HIDDEN |
|
Prefilters.ARIA_HIDDEN |
|
||||||
Prefilters.TRANSPARENT;
|
Prefilters.TRANSPARENT;
|
||||||
|
|
||||||
this.TraversalRules = { // jshint ignore:line
|
var TraversalRules = { // jshint ignore:line
|
||||||
Simple: new BaseTraversalRule(gSimpleTraversalRoles, gSimpleMatchFunc),
|
Simple: new BaseTraversalRule(gSimpleTraversalRoles, gSimpleMatchFunc),
|
||||||
|
|
||||||
SimpleOnScreen: new BaseTraversalRule(
|
SimpleOnScreen: new BaseTraversalRule(
|
||||||
@@ -361,7 +361,7 @@ this.TraversalRules = { // jshint ignore:line
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.TraversalHelper = {
|
var TraversalHelper = {
|
||||||
_helperPivotCache: null,
|
_helperPivotCache: null,
|
||||||
|
|
||||||
get helperPivotCache() {
|
get helperPivotCache() {
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
|
|||||||
ChromeUtils.defineModuleGetter(this, "PluralForm", // jshint ignore:line
|
ChromeUtils.defineModuleGetter(this, "PluralForm", // jshint ignore:line
|
||||||
"resource://gre/modules/PluralForm.jsm");
|
"resource://gre/modules/PluralForm.jsm");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["Utils", "Logger", "PivotContext", "PrefCache"]; // jshint ignore:line
|
var EXPORTED_SYMBOLS = ["Utils", "Logger", "PivotContext", "PrefCache"]; // jshint ignore:line
|
||||||
|
|
||||||
this.Utils = { // jshint ignore:line
|
var Utils = { // jshint ignore:line
|
||||||
_buildAppMap: {
|
_buildAppMap: {
|
||||||
"{3c2e2abc-06d4-11e1-ac3b-374f68613e61}": "b2g",
|
"{3c2e2abc-06d4-11e1-ac3b-374f68613e61}": "b2g",
|
||||||
"{d1bfe7d9-c01e-4237-998b-7b5f960a4314}": "graphene",
|
"{d1bfe7d9-c01e-4237-998b-7b5f960a4314}": "graphene",
|
||||||
@@ -543,7 +543,7 @@ State.prototype = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.Logger = { // jshint ignore:line
|
var Logger = { // jshint ignore:line
|
||||||
GESTURE: -1,
|
GESTURE: -1,
|
||||||
DEBUG: 0,
|
DEBUG: 0,
|
||||||
INFO: 1,
|
INFO: 1,
|
||||||
@@ -701,7 +701,7 @@ this.Logger = { // jshint ignore:line
|
|||||||
* label. In this case the |accessible| field would be the embedded control,
|
* label. In this case the |accessible| field would be the embedded control,
|
||||||
* and the |accessibleForBounds| field would be the label.
|
* and the |accessibleForBounds| field would be the label.
|
||||||
*/
|
*/
|
||||||
this.PivotContext = function PivotContext(aAccessible, aOldAccessible, // jshint ignore:line
|
function PivotContext(aAccessible, aOldAccessible, // jshint ignore:line
|
||||||
aStartOffset, aEndOffset, aIgnoreAncestry = false,
|
aStartOffset, aEndOffset, aIgnoreAncestry = false,
|
||||||
aIncludeInvisible = false) {
|
aIncludeInvisible = false) {
|
||||||
this._accessible = aAccessible;
|
this._accessible = aAccessible;
|
||||||
@@ -712,7 +712,7 @@ this.PivotContext = function PivotContext(aAccessible, aOldAccessible, // jshint
|
|||||||
this.endOffset = aEndOffset;
|
this.endOffset = aEndOffset;
|
||||||
this._ignoreAncestry = aIgnoreAncestry;
|
this._ignoreAncestry = aIgnoreAncestry;
|
||||||
this._includeInvisible = aIncludeInvisible;
|
this._includeInvisible = aIncludeInvisible;
|
||||||
};
|
}
|
||||||
|
|
||||||
PivotContext.prototype = {
|
PivotContext.prototype = {
|
||||||
get accessible() {
|
get accessible() {
|
||||||
@@ -1013,7 +1013,7 @@ PivotContext.prototype = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.PrefCache = function PrefCache(aName, aCallback, aRunCallbackNow) { // jshint ignore:line
|
function PrefCache(aName, aCallback, aRunCallbackNow) { // jshint ignore:line
|
||||||
this.name = aName;
|
this.name = aName;
|
||||||
this.callback = aCallback;
|
this.callback = aCallback;
|
||||||
|
|
||||||
@@ -1029,7 +1029,7 @@ this.PrefCache = function PrefCache(aName, aCallback, aRunCallbackNow) { // jshi
|
|||||||
}
|
}
|
||||||
|
|
||||||
branch.addObserver(aName, this, true);
|
branch.addObserver(aName, this, true);
|
||||||
};
|
}
|
||||||
|
|
||||||
PrefCache.prototype = {
|
PrefCache.prototype = {
|
||||||
_getValue: function _getValue(aBranch) {
|
_getValue: function _getValue(aBranch) {
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"Panel",
|
"Panel",
|
||||||
];
|
];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||||
|
|
||||||
this.Panel = function(panelElt, iframeURL) {
|
var Panel = function(panelElt, iframeURL) {
|
||||||
this.p = panelElt;
|
this.p = panelElt;
|
||||||
this.iframeURL = iframeURL;
|
this.iframeURL = iframeURL;
|
||||||
this._initPanel();
|
this._initPanel();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["CustomizableUI"];
|
var EXPORTED_SYMBOLS = ["CustomizableUI"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
@@ -2943,7 +2943,7 @@ var CustomizableUIInternal = {
|
|||||||
};
|
};
|
||||||
Object.freeze(CustomizableUIInternal);
|
Object.freeze(CustomizableUIInternal);
|
||||||
|
|
||||||
this.CustomizableUI = {
|
var CustomizableUI = {
|
||||||
/**
|
/**
|
||||||
* Constant reference to the ID of the navigation toolbar.
|
* Constant reference to the ID of the navigation toolbar.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["CustomizableWidgets"];
|
var EXPORTED_SYMBOLS = ["CustomizableWidgets"];
|
||||||
|
|
||||||
ChromeUtils.import("resource:///modules/CustomizableUI.jsm");
|
ChromeUtils.import("resource:///modules/CustomizableUI.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["CustomizeMode"];
|
var EXPORTED_SYMBOLS = ["CustomizeMode"];
|
||||||
|
|
||||||
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
|
||||||
const kPaletteId = "customization-palette";
|
const kPaletteId = "customization-palette";
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var gManagers = new WeakMap();
|
|||||||
|
|
||||||
const kPaletteId = "customization-palette";
|
const kPaletteId = "customization-palette";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["DragPositionManager"];
|
var EXPORTED_SYMBOLS = ["DragPositionManager"];
|
||||||
|
|
||||||
function AreaPositionManager(aContainer) {
|
function AreaPositionManager(aContainer) {
|
||||||
// Caching the direction and bounds of the container for quick access later:
|
// Caching the direction and bounds of the container for quick access later:
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"PanelMultiView",
|
"PanelMultiView",
|
||||||
"PanelView",
|
"PanelView",
|
||||||
];
|
];
|
||||||
@@ -123,7 +123,7 @@ let gMultiLineElementsMap = new WeakMap();
|
|||||||
* Classes deriving from this one may be easily converted to Custom Elements,
|
* Classes deriving from this one may be easily converted to Custom Elements,
|
||||||
* although they would lose the ability of being associated lazily.
|
* although they would lose the ability of being associated lazily.
|
||||||
*/
|
*/
|
||||||
this.AssociatedToNode = class {
|
var AssociatedToNode = class {
|
||||||
constructor(node) {
|
constructor(node) {
|
||||||
/**
|
/**
|
||||||
* Node associated to this object.
|
* Node associated to this object.
|
||||||
@@ -249,7 +249,7 @@ this.AssociatedToNode = class {
|
|||||||
/**
|
/**
|
||||||
* This is associated to <panelmultiview> elements by the panelUI.xml binding.
|
* This is associated to <panelmultiview> elements by the panelUI.xml binding.
|
||||||
*/
|
*/
|
||||||
this.PanelMultiView = class extends this.AssociatedToNode {
|
var PanelMultiView = class extends this.AssociatedToNode {
|
||||||
/**
|
/**
|
||||||
* Tries to open the specified <panel> and displays the main view specified
|
* Tries to open the specified <panel> and displays the main view specified
|
||||||
* with the "mainViewId" attribute on the <panelmultiview> node it contains.
|
* with the "mainViewId" attribute on the <panelmultiview> node it contains.
|
||||||
@@ -1116,7 +1116,7 @@ this.PanelMultiView = class extends this.AssociatedToNode {
|
|||||||
/**
|
/**
|
||||||
* This is associated to <panelview> elements.
|
* This is associated to <panelview> elements.
|
||||||
*/
|
*/
|
||||||
this.PanelView = class extends this.AssociatedToNode {
|
var PanelView = class extends this.AssociatedToNode {
|
||||||
/**
|
/**
|
||||||
* The "mainview" attribute is set before the panel is opened when this view
|
* The "mainview" attribute is set before the panel is opened when this view
|
||||||
* is displayed as the main view, and is removed before the <panelview> is
|
* is displayed as the main view, and is removed before the <panelview> is
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ScrollbarSampler"];
|
var EXPORTED_SYMBOLS = ["ScrollbarSampler"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
var gSystemScrollbarWidth = null;
|
var gSystemScrollbarWidth = null;
|
||||||
|
|
||||||
this.ScrollbarSampler = {
|
var ScrollbarSampler = {
|
||||||
getSystemScrollbarWidth() {
|
getSystemScrollbarWidth() {
|
||||||
if (gSystemScrollbarWidth !== null) {
|
if (gSystemScrollbarWidth !== null) {
|
||||||
return Promise.resolve(gSystemScrollbarWidth);
|
return Promise.resolve(gSystemScrollbarWidth);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SearchWidgetTracker"];
|
var EXPORTED_SYMBOLS = ["SearchWidgetTracker"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
|
var EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
|
||||||
|
|
||||||
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
|
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
|
||||||
"distribution-customization-complete";
|
"distribution-customization-complete";
|
||||||
@@ -18,8 +18,8 @@ ChromeUtils.defineModuleGetter(this, "Preferences",
|
|||||||
ChromeUtils.defineModuleGetter(this, "PlacesUtils",
|
ChromeUtils.defineModuleGetter(this, "PlacesUtils",
|
||||||
"resource://gre/modules/PlacesUtils.jsm");
|
"resource://gre/modules/PlacesUtils.jsm");
|
||||||
|
|
||||||
this.DistributionCustomizer = function DistributionCustomizer() {
|
function DistributionCustomizer() {
|
||||||
};
|
}
|
||||||
|
|
||||||
DistributionCustomizer.prototype = {
|
DistributionCustomizer.prototype = {
|
||||||
get _iniFile() {
|
get _iniFile() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"DownloadsCommon",
|
"DownloadsCommon",
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ PrefObserver.register({
|
|||||||
* This object is exposed directly to the consumers of this JavaScript module,
|
* This object is exposed directly to the consumers of this JavaScript module,
|
||||||
* and provides shared methods for all the instances of the user interface.
|
* and provides shared methods for all the instances of the user interface.
|
||||||
*/
|
*/
|
||||||
this.DownloadsCommon = {
|
var DownloadsCommon = {
|
||||||
// The following legacy constants are still returned by stateOfDownload, but
|
// The following legacy constants are still returned by stateOfDownload, but
|
||||||
// individual properties of the Download object should normally be used.
|
// individual properties of the Download object should normally be used.
|
||||||
DOWNLOAD_NOTSTARTED: -1,
|
DOWNLOAD_NOTSTARTED: -1,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"DownloadsSubview",
|
"DownloadsSubview",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"DownloadsTaskbar",
|
"DownloadsTaskbar",
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ XPCOMUtils.defineLazyGetter(this, "gMacTaskbarProgress", function() {
|
|||||||
/**
|
/**
|
||||||
* Handles the download progress indicator in the taskbar.
|
* Handles the download progress indicator in the taskbar.
|
||||||
*/
|
*/
|
||||||
this.DownloadsTaskbar = {
|
var DownloadsTaskbar = {
|
||||||
/**
|
/**
|
||||||
* Underlying DownloadSummary providing the aggregate download information, or
|
* Underlying DownloadSummary providing the aggregate download information, or
|
||||||
* null if the indicator has never been initialized.
|
* null if the indicator has never been initialized.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"DownloadsViewUI",
|
"DownloadsViewUI",
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesUtils",
|
|||||||
ChromeUtils.defineModuleGetter(this, "RecentWindow",
|
ChromeUtils.defineModuleGetter(this, "RecentWindow",
|
||||||
"resource:///modules/RecentWindow.jsm");
|
"resource:///modules/RecentWindow.jsm");
|
||||||
|
|
||||||
this.DownloadsViewUI = {
|
var DownloadsViewUI = {
|
||||||
/**
|
/**
|
||||||
* Returns true if the given string is the name of a command that can be
|
* Returns true if the given string is the name of a command that can be
|
||||||
* handled by the Downloads user interface, including standard commands.
|
* handled by the Downloads user interface, including standard commands.
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["Policies"];
|
var EXPORTED_SYMBOLS = ["Policies"];
|
||||||
|
|
||||||
this.Policies = {
|
var Policies = {
|
||||||
"BlockAboutAddons": {
|
"BlockAboutAddons": {
|
||||||
onBeforeUIStartup(manager, param) {
|
onBeforeUIStartup(manager, param) {
|
||||||
if (param) {
|
if (param) {
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["PoliciesValidator"];
|
var EXPORTED_SYMBOLS = ["PoliciesValidator"];
|
||||||
|
|
||||||
this.PoliciesValidator = {
|
var PoliciesValidator = {
|
||||||
validateAndParseParameters(param, properties) {
|
validateAndParseParameters(param, properties) {
|
||||||
return validateAndParseParamRecursive(param, properties);
|
return validateAndParseParamRecursive(param, properties);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["WindowsGPOParser"];
|
var EXPORTED_SYMBOLS = ["WindowsGPOParser"];
|
||||||
|
|
||||||
this.WindowsGPOParser = {
|
var WindowsGPOParser = {
|
||||||
readPolicies(wrk, policies) {
|
readPolicies(wrk, policies) {
|
||||||
let childWrk = wrk.openChild("Mozilla\\Firefox", wrk.ACCESS_READ);
|
let childWrk = wrk.openChild("Mozilla\\Firefox", wrk.ACCESS_READ);
|
||||||
if (!policies) {
|
if (!policies) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ module.exports = {
|
|||||||
"no-sequences": "error",
|
"no-sequences": "error",
|
||||||
"no-shadow": "error",
|
"no-shadow": "error",
|
||||||
"no-throw-literal": "error",
|
"no-throw-literal": "error",
|
||||||
"no-unused-vars": ["error", { "varsIgnorePattern": "^C[ciur]$" }],
|
"no-unused-vars": ["error", { "varsIgnorePattern": "^EXPORTED_SYMBOLS$" }],
|
||||||
"padded-blocks": ["error", "never"],
|
"padded-blocks": ["error", "never"],
|
||||||
"semi-spacing": ["error", {"before": false, "after": true}],
|
"semi-spacing": ["error", {"before": false, "after": true}],
|
||||||
"space-in-parens": ["error", "never"],
|
"space-in-parens": ["error", "never"],
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["AutoMigrate"];
|
var EXPORTED_SYMBOLS = ["AutoMigrate"];
|
||||||
|
|
||||||
const kAutoMigrateEnabledPref = "browser.migrate.automigrate.enabled";
|
const kAutoMigrateEnabledPref = "browser.migrate.automigrate.enabled";
|
||||||
const kUndoUIEnabledPref = "browser.migrate.automigrate.ui.enabled";
|
const kUndoUIEnabledPref = "browser.migrate.automigrate.ui.enabled";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ChromeMigrationUtils"];
|
var EXPORTED_SYMBOLS = ["ChromeMigrationUtils"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||||
@@ -11,7 +11,7 @@ ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
|||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
this.ChromeMigrationUtils = {
|
var ChromeMigrationUtils = {
|
||||||
_chromeUserDataPath: null,
|
_chromeUserDataPath: null,
|
||||||
|
|
||||||
_extensionVersionDirectoryNames: {},
|
_extensionVersionDirectoryNames: {},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ESEDBReader"]; /* exported ESEDBReader */
|
var EXPORTED_SYMBOLS = ["ESEDBReader"]; /* exported ESEDBReader */
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/ctypes.jsm");
|
ChromeUtils.import("resource://gre/modules/ctypes.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["MSMigrationUtils"];
|
var EXPORTED_SYMBOLS = ["MSMigrationUtils"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["MigrationUtils", "MigratorPrototype"];
|
var EXPORTED_SYMBOLS = ["MigrationUtils", "MigratorPrototype"];
|
||||||
|
|
||||||
const TOPIC_WILL_IMPORT_BOOKMARKS = "initial-migration-will-import-default-bookmarks";
|
const TOPIC_WILL_IMPORT_BOOKMARKS = "initial-migration-will-import-default-bookmarks";
|
||||||
const TOPIC_DID_IMPORT_BOOKMARKS = "initial-migration-did-import-default-bookmarks";
|
const TOPIC_DID_IMPORT_BOOKMARKS = "initial-migration-did-import-default-bookmarks";
|
||||||
@@ -84,7 +84,7 @@ function getMigrationBundle() {
|
|||||||
* 5. Implement getResources(aProfile) (see below).
|
* 5. Implement getResources(aProfile) (see below).
|
||||||
* 6. For startup-only migrators, override |startupOnlyMigrator|.
|
* 6. For startup-only migrators, override |startupOnlyMigrator|.
|
||||||
*/
|
*/
|
||||||
this.MigratorPrototype = {
|
var MigratorPrototype = {
|
||||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -438,7 +438,7 @@ this.MigratorPrototype = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.MigrationUtils = Object.freeze({
|
var MigrationUtils = Object.freeze({
|
||||||
resourceTypes: {
|
resourceTypes: {
|
||||||
SETTINGS: Ci.nsIBrowserProfileMigrator.SETTINGS,
|
SETTINGS: Ci.nsIBrowserProfileMigrator.SETTINGS,
|
||||||
COOKIES: Ci.nsIBrowserProfileMigrator.COOKIES,
|
COOKIES: Ci.nsIBrowserProfileMigrator.COOKIES,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["NewTabPrefsProvider"];
|
var EXPORTED_SYMBOLS = ["NewTabPrefsProvider"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["NewTabRemoteResources"];
|
var EXPORTED_SYMBOLS = ["NewTabRemoteResources"];
|
||||||
|
|
||||||
const NewTabRemoteResources = {
|
const NewTabRemoteResources = {
|
||||||
MODE_CHANNEL_MAP: {
|
MODE_CHANNEL_MAP: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["NewTabSearchProvider"];
|
var EXPORTED_SYMBOLS = ["NewTabSearchProvider"];
|
||||||
|
|
||||||
const CURRENT_ENGINE = "browser-search-engine-modified";
|
const CURRENT_ENGINE = "browser-search-engine-modified";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["NewTabWebChannel"];
|
var EXPORTED_SYMBOLS = ["NewTabWebChannel"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["PlacesUIUtils"];
|
var EXPORTED_SYMBOLS = ["PlacesUIUtils"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
@@ -204,7 +204,7 @@ let InternalFaviconLoader = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.PlacesUIUtils = {
|
var PlacesUIUtils = {
|
||||||
ORGANIZER_LEFTPANE_VERSION: 8,
|
ORGANIZER_LEFTPANE_VERSION: 8,
|
||||||
ORGANIZER_FOLDER_ANNO: "PlacesOrganizer/OrganizerFolder",
|
ORGANIZER_FOLDER_ANNO: "PlacesOrganizer/OrganizerFolder",
|
||||||
ORGANIZER_QUERY_ANNO: "PlacesOrganizer/OrganizerQuery",
|
ORGANIZER_QUERY_ANNO: "PlacesOrganizer/OrganizerQuery",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "serviceWorkerManager",
|
|||||||
"@mozilla.org/serviceworkers/manager;1",
|
"@mozilla.org/serviceworkers/manager;1",
|
||||||
"nsIServiceWorkerManager");
|
"nsIServiceWorkerManager");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"SiteDataManager"
|
"SiteDataManager"
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
|
|||||||
return Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
return Services.strings.createBundle("chrome://branding/locale/brand.properties");
|
||||||
});
|
});
|
||||||
|
|
||||||
this.SiteDataManager = {
|
var SiteDataManager = {
|
||||||
|
|
||||||
_qms: Services.qms,
|
_qms: Services.qms,
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ContentRestore"];
|
var EXPORTED_SYMBOLS = ["ContentRestore"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
|
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["DocShellCapabilities"];
|
var EXPORTED_SYMBOLS = ["DocShellCapabilities"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The external API exported by this module.
|
* The external API exported by this module.
|
||||||
*/
|
*/
|
||||||
this.DocShellCapabilities = Object.freeze({
|
var DocShellCapabilities = Object.freeze({
|
||||||
collect(docShell) {
|
collect(docShell) {
|
||||||
return DocShellCapabilitiesInternal.collect(docShell);
|
return DocShellCapabilitiesInternal.collect(docShell);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["GlobalState"];
|
var EXPORTED_SYMBOLS = ["GlobalState"];
|
||||||
|
|
||||||
const EXPORTED_METHODS = ["getState", "clear", "get", "set", "delete", "setFromState"];
|
const EXPORTED_METHODS = ["getState", "clear", "get", "set", "delete", "setFromState"];
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["PrivacyFilter"];
|
var EXPORTED_SYMBOLS = ["PrivacyFilter"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ ChromeUtils.defineModuleGetter(this, "PrivacyLevel",
|
|||||||
* A module that provides methods to filter various kinds of data collected
|
* A module that provides methods to filter various kinds of data collected
|
||||||
* from a tab by the current privacy level as set by the user.
|
* from a tab by the current privacy level as set by the user.
|
||||||
*/
|
*/
|
||||||
this.PrivacyFilter = Object.freeze({
|
var PrivacyFilter = Object.freeze({
|
||||||
/**
|
/**
|
||||||
* Filters the given (serialized) session storage |data| according to the
|
* Filters the given (serialized) session storage |data| according to the
|
||||||
* current privacy level and returns a new object containing only data that
|
* current privacy level and returns a new object containing only data that
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["RecentlyClosedTabsAndWindowsMenuUtils"];
|
var EXPORTED_SYMBOLS = ["RecentlyClosedTabsAndWindowsMenuUtils"];
|
||||||
|
|
||||||
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter(this, "SessionStore",
|
|||||||
|
|
||||||
var navigatorBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
var navigatorBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
|
||||||
|
|
||||||
this.RecentlyClosedTabsAndWindowsMenuUtils = {
|
var RecentlyClosedTabsAndWindowsMenuUtils = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds up a document fragment of UI items for the recently closed tabs.
|
* Builds up a document fragment of UI items for the recently closed tabs.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["RunState"];
|
var EXPORTED_SYMBOLS = ["RunState"];
|
||||||
|
|
||||||
const STATE_STOPPED = 0;
|
const STATE_STOPPED = 0;
|
||||||
const STATE_RUNNING = 1;
|
const STATE_RUNNING = 1;
|
||||||
@@ -21,7 +21,7 @@ var state = STATE_STOPPED;
|
|||||||
* the initial browser window has loaded we switch to STATE_RUNNING. On the
|
* the initial browser window has loaded we switch to STATE_RUNNING. On the
|
||||||
* first notice that a browser shutdown was granted we switch to STATE_QUITTING.
|
* first notice that a browser shutdown was granted we switch to STATE_QUITTING.
|
||||||
*/
|
*/
|
||||||
this.RunState = Object.freeze({
|
var RunState = Object.freeze({
|
||||||
// If we're stopped then SessionStore hasn't been initialized yet. As soon
|
// If we're stopped then SessionStore hasn't been initialized yet. As soon
|
||||||
// as the session is read from disk and the initial browser window has loaded
|
// as the session is read from disk and the initial browser window has loaded
|
||||||
// the run state will change to STATE_RUNNING.
|
// the run state will change to STATE_RUNNING.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SessionCookies"];
|
var EXPORTED_SYMBOLS = ["SessionCookies"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
|
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
@@ -19,7 +19,7 @@ const MAX_EXPIRY = Number.MAX_SAFE_INTEGER;
|
|||||||
/**
|
/**
|
||||||
* The external API implemented by the SessionCookies module.
|
* The external API implemented by the SessionCookies module.
|
||||||
*/
|
*/
|
||||||
this.SessionCookies = Object.freeze({
|
var SessionCookies = Object.freeze({
|
||||||
collect() {
|
collect() {
|
||||||
return SessionCookiesInternal.collect();
|
return SessionCookiesInternal.collect();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SessionFile"];
|
var EXPORTED_SYMBOLS = ["SessionFile"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of all the disk I/O required by the session store.
|
* Implementation of all the disk I/O required by the session store.
|
||||||
@@ -54,7 +54,7 @@ const PREF_MAX_SERIALIZE_FWD = "browser.sessionstore.max_serialize_forward";
|
|||||||
XPCOMUtils.defineLazyPreferenceGetter(this, "kMaxWriteFailures",
|
XPCOMUtils.defineLazyPreferenceGetter(this, "kMaxWriteFailures",
|
||||||
"browser.sessionstore.max_write_failures", 5);
|
"browser.sessionstore.max_write_failures", 5);
|
||||||
|
|
||||||
this.SessionFile = {
|
var SessionFile = {
|
||||||
/**
|
/**
|
||||||
* Read the contents of the session file, asynchronously.
|
* Read the contents of the session file, asynchronously.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SessionMigration"];
|
var EXPORTED_SYMBOLS = ["SessionMigration"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
ChromeUtils.import("resource://gre/modules/osfile.jsm", this);
|
ChromeUtils.import("resource://gre/modules/osfile.jsm", this);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SessionSaver"];
|
var EXPORTED_SYMBOLS = ["SessionSaver"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Timer.jsm", this);
|
ChromeUtils.import("resource://gre/modules/Timer.jsm", this);
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
|
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
|
||||||
@@ -64,7 +64,7 @@ var stopWatchFinish = stopWatch("finish");
|
|||||||
/**
|
/**
|
||||||
* The external API implemented by the SessionSaver module.
|
* The external API implemented by the SessionSaver module.
|
||||||
*/
|
*/
|
||||||
this.SessionSaver = Object.freeze({
|
var SessionSaver = Object.freeze({
|
||||||
/**
|
/**
|
||||||
* Immediately saves the current session to disk.
|
* Immediately saves the current session to disk.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SessionStorage"];
|
var EXPORTED_SYMBOLS = ["SessionStorage"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
@@ -25,7 +25,7 @@ function getPrincipalForFrame(docShell, frame) {
|
|||||||
return ssm.getDocShellCodebasePrincipal(uri, docShell);
|
return ssm.getDocShellCodebasePrincipal(uri, docShell);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.SessionStorage = Object.freeze({
|
var SessionStorage = Object.freeze({
|
||||||
/**
|
/**
|
||||||
* Updates all sessionStorage "super cookies"
|
* Updates all sessionStorage "super cookies"
|
||||||
* @param content
|
* @param content
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SessionStore"];
|
var EXPORTED_SYMBOLS = ["SessionStore"];
|
||||||
|
|
||||||
// Current version of the format used by Session Restore.
|
// Current version of the format used by Session Restore.
|
||||||
const FORMAT_VERSION = 1;
|
const FORMAT_VERSION = 1;
|
||||||
@@ -205,7 +205,7 @@ function debug(aMsg) {
|
|||||||
*/
|
*/
|
||||||
var gResistFingerprintingEnabled = false;
|
var gResistFingerprintingEnabled = false;
|
||||||
|
|
||||||
this.SessionStore = {
|
var SessionStore = {
|
||||||
get promiseInitialized() {
|
get promiseInitialized() {
|
||||||
return SessionStoreInternal.promiseInitialized;
|
return SessionStoreInternal.promiseInitialized;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
ChromeUtils.import("resource://gre/modules/PromiseWorker.jsm", this);
|
ChromeUtils.import("resource://gre/modules/PromiseWorker.jsm", this);
|
||||||
ChromeUtils.import("resource://gre/modules/osfile.jsm", this);
|
ChromeUtils.import("resource://gre/modules/osfile.jsm", this);
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SessionWorker"];
|
var EXPORTED_SYMBOLS = ["SessionWorker"];
|
||||||
|
|
||||||
this.SessionWorker = new BasePromiseWorker("resource:///modules/sessionstore/SessionWorker.js");
|
var SessionWorker = new BasePromiseWorker("resource:///modules/sessionstore/SessionWorker.js");
|
||||||
// As the Session Worker performs I/O, we can receive instances of
|
// As the Session Worker performs I/O, we can receive instances of
|
||||||
// OS.File.Error, so we need to install a decoder.
|
// OS.File.Error, so we need to install a decoder.
|
||||||
this.SessionWorker.ExceptionHandlers["OS.File.Error"] = OS.File.Error.fromMsg;
|
this.SessionWorker.ExceptionHandlers["OS.File.Error"] = OS.File.Error.fromMsg;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["StartupPerformance"];
|
var EXPORTED_SYMBOLS = ["StartupPerformance"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ const COLLECT_RESULTS_AFTER_MS = 10000;
|
|||||||
|
|
||||||
const OBSERVED_TOPICS = ["sessionstore-restoring-on-startup", "sessionstore-initiating-manual-restore"];
|
const OBSERVED_TOPICS = ["sessionstore-restoring-on-startup", "sessionstore-initiating-manual-restore"];
|
||||||
|
|
||||||
this.StartupPerformance = {
|
var StartupPerformance = {
|
||||||
/**
|
/**
|
||||||
* Once we have finished restoring initial tabs, we broadcast on this topic.
|
* Once we have finished restoring initial tabs, we broadcast on this topic.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["TabAttributes"];
|
var EXPORTED_SYMBOLS = ["TabAttributes"];
|
||||||
|
|
||||||
// We never want to directly read or write these attributes.
|
// We never want to directly read or write these attributes.
|
||||||
// 'image' should not be accessed directly but handled by using the
|
// 'image' should not be accessed directly but handled by using the
|
||||||
@@ -23,7 +23,7 @@ const ATTRIBUTES_TO_SKIP = new Set(["image", "muted", "pending", "iconloadingpri
|
|||||||
// A set of tab attributes to persist. We will read a given list of tab
|
// A set of tab attributes to persist. We will read a given list of tab
|
||||||
// attributes when collecting tab data and will re-set those attributes when
|
// attributes when collecting tab data and will re-set those attributes when
|
||||||
// the given tab data is restored to a new tab.
|
// the given tab data is restored to a new tab.
|
||||||
this.TabAttributes = Object.freeze({
|
var TabAttributes = Object.freeze({
|
||||||
persist(name) {
|
persist(name) {
|
||||||
return TabAttributesInternal.persist(name);
|
return TabAttributesInternal.persist(name);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["TabState"];
|
var EXPORTED_SYMBOLS = ["TabState"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ ChromeUtils.defineModuleGetter(this, "Utils",
|
|||||||
/**
|
/**
|
||||||
* Module that contains tab state collection methods.
|
* Module that contains tab state collection methods.
|
||||||
*/
|
*/
|
||||||
this.TabState = Object.freeze({
|
var TabState = Object.freeze({
|
||||||
update(browser, data) {
|
update(browser, data) {
|
||||||
TabStateInternal.update(browser, data);
|
TabStateInternal.update(browser, data);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["TabStateCache"];
|
var EXPORTED_SYMBOLS = ["TabStateCache"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A cache for tabs data.
|
* A cache for tabs data.
|
||||||
@@ -16,7 +16,7 @@ this.EXPORTED_SYMBOLS = ["TabStateCache"];
|
|||||||
* - that data is used very seldom by SessionStore;
|
* - that data is used very seldom by SessionStore;
|
||||||
* - caching private data in addition to public data is memory consuming.
|
* - caching private data in addition to public data is memory consuming.
|
||||||
*/
|
*/
|
||||||
this.TabStateCache = Object.freeze({
|
var TabStateCache = Object.freeze({
|
||||||
/**
|
/**
|
||||||
* Retrieves cached data for a given |tab| or associated |browser|.
|
* Retrieves cached data for a given |tab| or associated |browser|.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["TabStateFlusher"];
|
var EXPORTED_SYMBOLS = ["TabStateFlusher"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A module that enables async flushes. Updates from frame scripts are
|
* A module that enables async flushes. Updates from frame scripts are
|
||||||
@@ -13,7 +13,7 @@ this.EXPORTED_SYMBOLS = ["TabStateFlusher"];
|
|||||||
* wait until the frame scripts reported back. At this point the parent has the
|
* wait until the frame scripts reported back. At this point the parent has the
|
||||||
* latest data and the action can continue.
|
* latest data and the action can continue.
|
||||||
*/
|
*/
|
||||||
this.TabStateFlusher = Object.freeze({
|
var TabStateFlusher = Object.freeze({
|
||||||
/**
|
/**
|
||||||
* Requests an async flush for the given browser. Returns a promise that will
|
* Requests an async flush for the given browser. Returns a promise that will
|
||||||
* resolve when we heard back from the content process and the parent has
|
* resolve when we heard back from the content process and the parent has
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ShellService"];
|
var EXPORTED_SYMBOLS = ["ShellService"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
@@ -98,7 +98,7 @@ XPCOMUtils.defineLazyServiceGetter(ShellServiceInternal, "shellService",
|
|||||||
/**
|
/**
|
||||||
* The external API exported by this module.
|
* The external API exported by this module.
|
||||||
*/
|
*/
|
||||||
this.ShellService = new Proxy(ShellServiceInternal, {
|
var ShellService = new Proxy(ShellServiceInternal, {
|
||||||
get(target, name) {
|
get(target, name) {
|
||||||
if (name in target) {
|
if (name in target) {
|
||||||
return target[name];
|
return target[name];
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"EventEmitter"
|
"EventEmitter"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
|
|||||||
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
|
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
|
||||||
.Log.repository.getLogger("Sync.RemoteTabs");
|
.Log.repository.getLogger("Sync.RemoteTabs");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"SyncedTabsDeckComponent"
|
"SyncedTabsDeckComponent"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
|
let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"SyncedTabsDeckStore"
|
"SyncedTabsDeckStore"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
|
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
|
||||||
.Log.repository.getLogger("Sync.RemoteTabs");
|
.Log.repository.getLogger("Sync.RemoteTabs");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"SyncedTabsDeckView"
|
"SyncedTabsDeckView"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
|
let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"SyncedTabsListStore"
|
"SyncedTabsListStore"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesUIUtils",
|
|||||||
ChromeUtils.defineModuleGetter(this, "Services",
|
ChromeUtils.defineModuleGetter(this, "Services",
|
||||||
"resource://gre/modules/Services.jsm");
|
"resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"TabListComponent"
|
"TabListComponent"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ let { getChromeWindow } = ChromeUtils.import("resource:///modules/syncedtabs/uti
|
|||||||
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
|
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
|
||||||
.Log.repository.getLogger("Sync.RemoteTabs");
|
.Log.repository.getLogger("Sync.RemoteTabs");
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"TabListView"
|
"TabListView"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"getChromeWindow"
|
"getChromeWindow"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [ "BingTranslator" ];
|
var EXPORTED_SYMBOLS = [ "BingTranslator" ];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/Log.jsm");
|
ChromeUtils.import("resource://gre/modules/Log.jsm");
|
||||||
@@ -39,7 +39,7 @@ const MAX_REQUESTS = 15;
|
|||||||
* @returns {Promise} A promise that will resolve when the translation
|
* @returns {Promise} A promise that will resolve when the translation
|
||||||
* task is finished.
|
* task is finished.
|
||||||
*/
|
*/
|
||||||
this.BingTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
|
var BingTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
|
||||||
this.translationDocument = translationDocument;
|
this.translationDocument = translationDocument;
|
||||||
this.sourceLanguage = sourceLanguage;
|
this.sourceLanguage = sourceLanguage;
|
||||||
this.targetLanguage = targetLanguage;
|
this.targetLanguage = targetLanguage;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["LanguageDetector"];
|
var EXPORTED_SYMBOLS = ["LanguageDetector"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
ChromeUtils.import("resource://gre/modules/Timer.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
@@ -95,7 +95,7 @@ var workerManager = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
this.LanguageDetector = {
|
var LanguageDetector = {
|
||||||
/**
|
/**
|
||||||
* Detect the language of a given string.
|
* Detect the language of a given string.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"Translation",
|
"Translation",
|
||||||
"TranslationTelemetry",
|
"TranslationTelemetry",
|
||||||
];
|
];
|
||||||
@@ -14,7 +14,7 @@ const TRANSLATION_PREF_DETECT_LANG = "browser.translation.detectLanguage";
|
|||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
this.Translation = {
|
var Translation = {
|
||||||
STATE_OFFER: 0,
|
STATE_OFFER: 0,
|
||||||
STATE_TRANSLATING: 1,
|
STATE_TRANSLATING: 1,
|
||||||
STATE_TRANSLATED: 2,
|
STATE_TRANSLATED: 2,
|
||||||
@@ -290,7 +290,7 @@ TranslationUI.prototype = {
|
|||||||
*
|
*
|
||||||
* NOTE: Metrics are only recorded if the user enabled the telemetry option.
|
* NOTE: Metrics are only recorded if the user enabled the telemetry option.
|
||||||
*/
|
*/
|
||||||
this.TranslationTelemetry = {
|
var TranslationTelemetry = {
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
// Constructing histograms.
|
// Constructing histograms.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [ "TranslationContentHandler" ];
|
var EXPORTED_SYMBOLS = [ "TranslationContentHandler" ];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
@@ -15,7 +15,7 @@ const STATE_OFFER = 0;
|
|||||||
const STATE_TRANSLATED = 2;
|
const STATE_TRANSLATED = 2;
|
||||||
const STATE_ERROR = 3;
|
const STATE_ERROR = 3;
|
||||||
|
|
||||||
this.TranslationContentHandler = function(global, docShell) {
|
var TranslationContentHandler = function(global, docShell) {
|
||||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIWebProgress);
|
.getInterface(Ci.nsIWebProgress);
|
||||||
webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
|
webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [ "TranslationDocument" ];
|
var EXPORTED_SYMBOLS = [ "TranslationDocument" ];
|
||||||
|
|
||||||
const TEXT_NODE = Ci.nsIDOMNode.TEXT_NODE;
|
const TEXT_NODE = Ci.nsIDOMNode.TEXT_NODE;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ ChromeUtils.import("resource://services-common/async.js");
|
|||||||
*
|
*
|
||||||
* @param document The document to be translated
|
* @param document The document to be translated
|
||||||
*/
|
*/
|
||||||
this.TranslationDocument = function(document) {
|
var TranslationDocument = function(document) {
|
||||||
this.itemsMap = new Map();
|
this.itemsMap = new Map();
|
||||||
this.roots = [];
|
this.roots = [];
|
||||||
this._init(document);
|
this._init(document);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [ "YandexTranslator" ];
|
var EXPORTED_SYMBOLS = [ "YandexTranslator" ];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/Log.jsm");
|
ChromeUtils.import("resource://gre/modules/Log.jsm");
|
||||||
@@ -57,7 +57,7 @@ const YANDEX_PERMANENT_ERRORS = [
|
|||||||
* @returns {Promise} A promise that will resolve when the translation
|
* @returns {Promise} A promise that will resolve when the translation
|
||||||
* task is finished.
|
* task is finished.
|
||||||
*/
|
*/
|
||||||
this.YandexTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
|
var YandexTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
|
||||||
this.translationDocument = translationDocument;
|
this.translationDocument = translationDocument;
|
||||||
this.sourceLanguage = sourceLanguage;
|
this.sourceLanguage = sourceLanguage;
|
||||||
this.targetLanguage = targetLanguage;
|
this.targetLanguage = targetLanguage;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["UITour"];
|
var EXPORTED_SYMBOLS = ["UITour"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
@@ -79,7 +79,7 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
|
|||||||
return new ConsoleAPI(consoleOptions);
|
return new ConsoleAPI(consoleOptions);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.UITour = {
|
var UITour = {
|
||||||
url: null,
|
url: null,
|
||||||
seenPageIDs: null,
|
seenPageIDs: null,
|
||||||
// This map is not persisted and is used for
|
// This map is not persisted and is used for
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"Experiments",
|
"Experiments",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.MAIN_MESSAGE_TYPE = "ActivityStream:Main";
|
var MAIN_MESSAGE_TYPE = "ActivityStream:Main";
|
||||||
this.CONTENT_MESSAGE_TYPE = "ActivityStream:Content";
|
var CONTENT_MESSAGE_TYPE = "ActivityStream:Content";
|
||||||
this.PRELOAD_MESSAGE_TYPE = "ActivityStream:PreloadedBrowser";
|
var PRELOAD_MESSAGE_TYPE = "ActivityStream:PreloadedBrowser";
|
||||||
this.UI_CODE = 1;
|
var UI_CODE = 1;
|
||||||
this.BACKGROUND_PROCESS = 2;
|
var BACKGROUND_PROCESS = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* globalImportContext - Are we in UI code (i.e. react, a dom) or some kind of background process?
|
* globalImportContext - Are we in UI code (i.e. react, a dom) or some kind of background process?
|
||||||
@@ -274,7 +274,7 @@ function WebExtEvent(type, data, importContext = globalImportContext) {
|
|||||||
|
|
||||||
this.actionTypes = actionTypes;
|
this.actionTypes = actionTypes;
|
||||||
|
|
||||||
this.actionCreators = {
|
var actionCreators = {
|
||||||
BroadcastToContent,
|
BroadcastToContent,
|
||||||
UserEvent,
|
UserEvent,
|
||||||
UndesiredEvent,
|
UndesiredEvent,
|
||||||
@@ -290,7 +290,7 @@ this.actionCreators = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// These are helpers to test for certain kinds of actions
|
// These are helpers to test for certain kinds of actions
|
||||||
this.actionUtils = {
|
var actionUtils = {
|
||||||
isSendToMain(action) {
|
isSendToMain(action) {
|
||||||
if (!action.meta) {
|
if (!action.meta) {
|
||||||
return false;
|
return false;
|
||||||
@@ -335,7 +335,7 @@ this.actionUtils = {
|
|||||||
_RouteMessage
|
_RouteMessage
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"actionTypes",
|
"actionTypes",
|
||||||
"actionCreators",
|
"actionCreators",
|
||||||
"actionUtils",
|
"actionUtils",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
this.Dedupe = class Dedupe {
|
var Dedupe = class Dedupe {
|
||||||
constructor(createKey) {
|
constructor(createKey) {
|
||||||
this.createKey = createKey || this.defaultCreateKey;
|
this.createKey = createKey || this.defaultCreateKey;
|
||||||
}
|
}
|
||||||
@@ -31,4 +31,4 @@ this.Dedupe = class Dedupe {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["Dedupe"];
|
var EXPORTED_SYMBOLS = ["Dedupe"];
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ if (typeof Services !== "undefined") {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this._PerfService = function _PerfService(options) {
|
function _PerfService(options) {
|
||||||
// For testing, so that we can use a fake Window.performance object with
|
// For testing, so that we can use a fake Window.performance object with
|
||||||
// known state.
|
// known state.
|
||||||
if (options && options.performanceObj) {
|
if (options && options.performanceObj) {
|
||||||
@@ -34,7 +34,7 @@ this._PerfService = function _PerfService(options) {
|
|||||||
} else {
|
} else {
|
||||||
this._perf = usablePerfObj;
|
this._perf = usablePerfObj;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
_PerfService.prototype = {
|
_PerfService.prototype = {
|
||||||
/**
|
/**
|
||||||
@@ -121,5 +121,5 @@ _PerfService.prototype = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.perfService = new _PerfService();
|
var perfService = new _PerfService();
|
||||||
this.EXPORTED_SYMBOLS = ["_PerfService", "perfService"];
|
var EXPORTED_SYMBOLS = ["_PerfService", "perfService"];
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class _PrerenderData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.PrerenderData = new _PrerenderData({
|
var PrerenderData = new _PrerenderData({
|
||||||
initialPrefs: {
|
initialPrefs: {
|
||||||
"migrationExpired": true,
|
"migrationExpired": true,
|
||||||
"showTopSites": true,
|
"showTopSites": true,
|
||||||
@@ -94,4 +94,4 @@ this.PrerenderData = new _PrerenderData({
|
|||||||
});
|
});
|
||||||
|
|
||||||
this._PrerenderData = _PrerenderData;
|
this._PrerenderData = _PrerenderData;
|
||||||
this.EXPORTED_SYMBOLS = ["PrerenderData", "_PrerenderData"];
|
var EXPORTED_SYMBOLS = ["PrerenderData", "_PrerenderData"];
|
||||||
|
|||||||
@@ -322,7 +322,6 @@ this.INITIAL_STATE = INITIAL_STATE;
|
|||||||
this.TOP_SITES_DEFAULT_ROWS = TOP_SITES_DEFAULT_ROWS;
|
this.TOP_SITES_DEFAULT_ROWS = TOP_SITES_DEFAULT_ROWS;
|
||||||
this.TOP_SITES_MAX_SITES_PER_ROW = TOP_SITES_MAX_SITES_PER_ROW;
|
this.TOP_SITES_MAX_SITES_PER_ROW = TOP_SITES_MAX_SITES_PER_ROW;
|
||||||
|
|
||||||
this.reducers = {TopSites, App, Snippets, Prefs, Dialog, Sections, PreferencesPane};
|
var reducers = {TopSites, App, Snippets, Prefs, Dialog, Sections, PreferencesPane};
|
||||||
this.insertPinned = insertPinned;
|
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["reducers", "INITIAL_STATE", "insertPinned", "TOP_SITES_DEFAULT_ROWS", "TOP_SITES_MAX_SITES_PER_ROW"];
|
var EXPORTED_SYMBOLS = ["reducers", "INITIAL_STATE", "insertPinned", "TOP_SITES_DEFAULT_ROWS", "TOP_SITES_MAX_SITES_PER_ROW"];
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ for (const config of FEEDS_DATA) {
|
|||||||
PREFS_CONFIG.set(pref, config);
|
PREFS_CONFIG.set(pref, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ActivityStream = class ActivityStream {
|
var ActivityStream = class ActivityStream {
|
||||||
/**
|
/**
|
||||||
* constructor - Initializes an instance of ActivityStream
|
* constructor - Initializes an instance of ActivityStream
|
||||||
*
|
*
|
||||||
@@ -336,4 +336,4 @@ this.ActivityStream = class ActivityStream {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ActivityStream", "PREFS_CONFIG"];
|
var EXPORTED_SYMBOLS = ["ActivityStream", "PREFS_CONFIG"];
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const DEFAULT_OPTIONS = {
|
|||||||
incomingMessageName: "ActivityStream:ContentToMain"
|
incomingMessageName: "ActivityStream:ContentToMain"
|
||||||
};
|
};
|
||||||
|
|
||||||
this.ActivityStreamMessageChannel = class ActivityStreamMessageChannel {
|
var ActivityStreamMessageChannel = class ActivityStreamMessageChannel {
|
||||||
/**
|
/**
|
||||||
* ActivityStreamMessageChannel - This module connects a Redux store to a RemotePageManager in Firefox.
|
* ActivityStreamMessageChannel - This module connects a Redux store to a RemotePageManager in Firefox.
|
||||||
* Call .createChannel to start the connection, and .destroyChannel to destroy it.
|
* Call .createChannel to start the connection, and .destroyChannel to destroy it.
|
||||||
@@ -256,4 +256,4 @@ this.ActivityStreamMessageChannel = class ActivityStreamMessageChannel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
|
this.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
|
||||||
this.EXPORTED_SYMBOLS = ["ActivityStreamMessageChannel", "DEFAULT_OPTIONS"];
|
var EXPORTED_SYMBOLS = ["ActivityStreamMessageChannel", "DEFAULT_OPTIONS"];
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||||||
|
|
||||||
const ACTIVITY_STREAM_PREF_BRANCH = "browser.newtabpage.activity-stream.";
|
const ACTIVITY_STREAM_PREF_BRANCH = "browser.newtabpage.activity-stream.";
|
||||||
|
|
||||||
this.Prefs = class Prefs extends Preferences {
|
var Prefs = class Prefs extends Preferences {
|
||||||
/**
|
/**
|
||||||
* Prefs - A wrapper around Preferences that always sets the branch to
|
* Prefs - A wrapper around Preferences that always sets the branch to
|
||||||
* ACTIVITY_STREAM_PREF_BRANCH
|
* ACTIVITY_STREAM_PREF_BRANCH
|
||||||
@@ -39,7 +39,7 @@ this.Prefs = class Prefs extends Preferences {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.DefaultPrefs = class DefaultPrefs {
|
var DefaultPrefs = class DefaultPrefs {
|
||||||
/**
|
/**
|
||||||
* DefaultPrefs - A helper for setting and resetting default prefs for the add-on
|
* DefaultPrefs - A helper for setting and resetting default prefs for the add-on
|
||||||
*
|
*
|
||||||
@@ -103,4 +103,4 @@ this.DefaultPrefs = class DefaultPrefs {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["DefaultPrefs", "Prefs"];
|
var EXPORTED_SYMBOLS = ["DefaultPrefs", "Prefs"];
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const ONE_DAY = 24 * 60 * 60 * 1000;
|
|||||||
const TIPPYTOP_UPDATE_TIME = ONE_DAY;
|
const TIPPYTOP_UPDATE_TIME = ONE_DAY;
|
||||||
const TIPPYTOP_RETRY_DELAY = FIVE_MINUTES;
|
const TIPPYTOP_RETRY_DELAY = FIVE_MINUTES;
|
||||||
|
|
||||||
this.FaviconFeed = class FaviconFeed {
|
var FaviconFeed = class FaviconFeed {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.tippyTopNextUpdate = 0;
|
this.tippyTopNextUpdate = 0;
|
||||||
this.cache = new PersistentCache("tippytop", true);
|
this.cache = new PersistentCache("tippytop", true);
|
||||||
@@ -158,4 +158,4 @@ this.FaviconFeed = class FaviconFeed {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["FaviconFeed"];
|
var EXPORTED_SYMBOLS = ["FaviconFeed"];
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ function md5Hash(text) {
|
|||||||
/**
|
/**
|
||||||
* Filter out any link objects that have a url with an adult base domain.
|
* Filter out any link objects that have a url with an adult base domain.
|
||||||
*/
|
*/
|
||||||
this.filterAdult = function filterAdult(links) {
|
function filterAdult(links) {
|
||||||
return links.filter(({url}) => {
|
return links.filter(({url}) => {
|
||||||
try {
|
try {
|
||||||
const uri = Services.io.newURI(url);
|
const uri = Services.io.newURI(url);
|
||||||
@@ -44,9 +44,9 @@ this.filterAdult = function filterAdult(links) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["filterAdult"];
|
var EXPORTED_SYMBOLS = ["filterAdult"];
|
||||||
|
|
||||||
// These are md5 hashes of base domains to be filtered out. Originally from:
|
// These are md5 hashes of base domains to be filtered out. Originally from:
|
||||||
// https://hg.mozilla.org/mozilla-central/log/default/browser/base/content/newtab/newTab.inadjacent.json
|
// https://hg.mozilla.org/mozilla-central/log/default/browser/base/content/newtab/newTab.inadjacent.json
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const HIGHLIGHTS_MAX_LENGTH = 9;
|
|||||||
const MANY_EXTRA_LENGTH = HIGHLIGHTS_MAX_LENGTH * 5 + TOP_SITES_DEFAULT_ROWS * TOP_SITES_MAX_SITES_PER_ROW;
|
const MANY_EXTRA_LENGTH = HIGHLIGHTS_MAX_LENGTH * 5 + TOP_SITES_DEFAULT_ROWS * TOP_SITES_MAX_SITES_PER_ROW;
|
||||||
const SECTION_ID = "highlights";
|
const SECTION_ID = "highlights";
|
||||||
|
|
||||||
this.HighlightsFeed = class HighlightsFeed {
|
var HighlightsFeed = class HighlightsFeed {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.dedupe = new Dedupe(this._dedupeKey);
|
this.dedupe = new Dedupe(this._dedupeKey);
|
||||||
this.linksCache = new LinksCache(NewTabUtils.activityStreamLinks,
|
this.linksCache = new LinksCache(NewTabUtils.activityStreamLinks,
|
||||||
@@ -181,4 +181,4 @@ this.HighlightsFeed = class HighlightsFeed {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["HighlightsFeed", "SECTION_ID"];
|
var EXPORTED_SYMBOLS = ["HighlightsFeed", "SECTION_ID"];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["LinksCache"];
|
var EXPORTED_SYMBOLS = ["LinksCache"];
|
||||||
|
|
||||||
// This should be slightly less than SYSTEM_TICK_INTERVAL as timer
|
// This should be slightly less than SYSTEM_TICK_INTERVAL as timer
|
||||||
// comparisons are too exact while the async/await functionality will make the
|
// comparisons are too exact while the async/await functionality will make the
|
||||||
@@ -18,7 +18,7 @@ const EXPIRATION_TIME = 4.5 * 60 * 1000; // 4.5 minutes
|
|||||||
* amount of time has passed. Allows for migrating data from previously cached
|
* amount of time has passed. Allows for migrating data from previously cached
|
||||||
* links to the new links with the same url.
|
* links to the new links with the same url.
|
||||||
*/
|
*/
|
||||||
this.LinksCache = class LinksCache {
|
var LinksCache = class LinksCache {
|
||||||
/**
|
/**
|
||||||
* Create a links cache for a given object property.
|
* Create a links cache for a given object property.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||||||
ChromeUtils.defineModuleGetter(this, "MigrationUtils", "resource:///modules/MigrationUtils.jsm");
|
ChromeUtils.defineModuleGetter(this, "MigrationUtils", "resource:///modules/MigrationUtils.jsm");
|
||||||
ChromeUtils.defineModuleGetter(this, "ProfileAge", "resource://gre/modules/ProfileAge.jsm");
|
ChromeUtils.defineModuleGetter(this, "ProfileAge", "resource://gre/modules/ProfileAge.jsm");
|
||||||
|
|
||||||
this.ManualMigration = class ManualMigration {
|
var ManualMigration = class ManualMigration {
|
||||||
constructor() {
|
constructor() {
|
||||||
Services.obs.addObserver(this, MIGRATION_ENDED_EVENT);
|
Services.obs.addObserver(this, MIGRATION_ENDED_EVENT);
|
||||||
this._prefs = new Prefs();
|
this._prefs = new Prefs();
|
||||||
@@ -96,4 +96,4 @@ this.ManualMigration = class ManualMigration {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["ManualMigration"];
|
var EXPORTED_SYMBOLS = ["ManualMigration"];
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const {actionCreators: ac, actionTypes: at} = ChromeUtils.import("resource://act
|
|||||||
* NewTabInit - A placeholder for now. This will send a copy of the state to all
|
* NewTabInit - A placeholder for now. This will send a copy of the state to all
|
||||||
* newly opened tabs.
|
* newly opened tabs.
|
||||||
*/
|
*/
|
||||||
this.NewTabInit = class NewTabInit {
|
var NewTabInit = class NewTabInit {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._repliedEarlyTabs = new Map();
|
this._repliedEarlyTabs = new Map();
|
||||||
}
|
}
|
||||||
@@ -49,4 +49,4 @@ this.NewTabInit = class NewTabInit {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["NewTabInit"];
|
var EXPORTED_SYMBOLS = ["NewTabInit"];
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ XPCOMUtils.defineLazyGetter(this, "gTextDecoder", () => new TextDecoder());
|
|||||||
/**
|
/**
|
||||||
* A file (disk) based persistent cache of a JSON serializable object.
|
* A file (disk) based persistent cache of a JSON serializable object.
|
||||||
*/
|
*/
|
||||||
this.PersistentCache = class PersistentCache {
|
var PersistentCache = class PersistentCache {
|
||||||
/**
|
/**
|
||||||
* Create a cache object based on a name.
|
* Create a cache object based on a name.
|
||||||
*
|
*
|
||||||
@@ -79,4 +79,4 @@ this.PersistentCache = class PersistentCache {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["PersistentCache"];
|
var EXPORTED_SYMBOLS = ["PersistentCache"];
|
||||||
|
|||||||
@@ -311,4 +311,4 @@ this.PlacesFeed = PlacesFeed;
|
|||||||
PlacesFeed.HistoryObserver = HistoryObserver;
|
PlacesFeed.HistoryObserver = HistoryObserver;
|
||||||
PlacesFeed.BookmarksObserver = BookmarksObserver;
|
PlacesFeed.BookmarksObserver = BookmarksObserver;
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["PlacesFeed"];
|
var EXPORTED_SYMBOLS = ["PlacesFeed"];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||||||
|
|
||||||
const ONBOARDING_FINISHED_PREF = "browser.onboarding.notification.finished";
|
const ONBOARDING_FINISHED_PREF = "browser.onboarding.notification.finished";
|
||||||
|
|
||||||
this.PrefsFeed = class PrefsFeed {
|
var PrefsFeed = class PrefsFeed {
|
||||||
constructor(prefMap) {
|
constructor(prefMap) {
|
||||||
this._prefMap = prefMap;
|
this._prefMap = prefMap;
|
||||||
this._prefs = new Prefs();
|
this._prefs = new Prefs();
|
||||||
@@ -93,4 +93,4 @@ this.PrefsFeed = class PrefsFeed {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["PrefsFeed"];
|
var EXPORTED_SYMBOLS = ["PrefsFeed"];
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["Screenshots"];
|
var EXPORTED_SYMBOLS = ["Screenshots"];
|
||||||
|
|
||||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ ChromeUtils.defineModuleGetter(this, "Services",
|
|||||||
|
|
||||||
const GREY_10 = "#F9F9FA";
|
const GREY_10 = "#F9F9FA";
|
||||||
|
|
||||||
this.Screenshots = {
|
var Screenshots = {
|
||||||
/**
|
/**
|
||||||
* Convert bytes to a string using extremely fast String.fromCharCode without
|
* Convert bytes to a string using extremely fast String.fromCharCode without
|
||||||
* exceeding the max number of arguments that can be provided to a function.
|
* exceeding the max number of arguments that can be provided to a function.
|
||||||
|
|||||||
@@ -356,4 +356,4 @@ class SectionsFeed {
|
|||||||
|
|
||||||
this.SectionsFeed = SectionsFeed;
|
this.SectionsFeed = SectionsFeed;
|
||||||
this.SectionsManager = SectionsManager;
|
this.SectionsManager = SectionsManager;
|
||||||
this.EXPORTED_SYMBOLS = ["SectionsFeed", "SectionsManager"];
|
var EXPORTED_SYMBOLS = ["SectionsFeed", "SectionsManager"];
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ function getETLD(host) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getETLD = getETLD;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shortURL - Creates a short version of a link's url, used for display purposes
|
* shortURL - Creates a short version of a link's url, used for display purposes
|
||||||
@@ -43,7 +42,7 @@ this.getETLD = getETLD;
|
|||||||
* {str} link.url (required)- The url of the link
|
* {str} link.url (required)- The url of the link
|
||||||
* @return {str} A short url
|
* @return {str} A short url
|
||||||
*/
|
*/
|
||||||
this.shortURL = function shortURL({url}) {
|
function shortURL({url}) {
|
||||||
if (!url) {
|
if (!url) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -67,6 +66,6 @@ this.shortURL = function shortURL({url}) {
|
|||||||
// Ideally get the short eTLD-less host but fall back to longer url parts
|
// Ideally get the short eTLD-less host but fall back to longer url parts
|
||||||
return handleIDNHost(hostname.slice(0, eTLDExtra) || hostname) ||
|
return handleIDNHost(hostname.slice(0, eTLDExtra) || hostname) ||
|
||||||
parsed.pathname || parsed.href;
|
parsed.pathname || parsed.href;
|
||||||
};
|
}
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["shortURL", "getETLD"];
|
var EXPORTED_SYMBOLS = ["shortURL", "getETLD"];
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const STARTPAGE_VERSION = 5;
|
|||||||
|
|
||||||
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000;
|
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000;
|
||||||
|
|
||||||
this.SnippetsFeed = class SnippetsFeed {
|
var SnippetsFeed = class SnippetsFeed {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._refresh = this._refresh.bind(this);
|
this._refresh = this._refresh.bind(this);
|
||||||
}
|
}
|
||||||
@@ -148,4 +148,4 @@ this.SnippetsFeed = class SnippetsFeed {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["SnippetsFeed"];
|
var EXPORTED_SYMBOLS = ["SnippetsFeed"];
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const {redux} = ChromeUtils.import("resource://activity-stream/vendor/Redux.jsm"
|
|||||||
* It also accepts an array of "Feeds" on inititalization, which
|
* It also accepts an array of "Feeds" on inititalization, which
|
||||||
* can listen for any action that is dispatched through the store.
|
* can listen for any action that is dispatched through the store.
|
||||||
*/
|
*/
|
||||||
this.Store = class Store {
|
var Store = class Store {
|
||||||
/**
|
/**
|
||||||
* constructor - The redux store and message manager are created here,
|
* constructor - The redux store and message manager are created here,
|
||||||
* but no listeners are added until "init" is called.
|
* but no listeners are added until "init" is called.
|
||||||
@@ -157,4 +157,4 @@ this.Store = class Store {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["Store"];
|
var EXPORTED_SYMBOLS = ["Store"];
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ ChromeUtils.defineModuleGetter(this, "clearInterval", "resource://gre/modules/Ti
|
|||||||
// Frequency at which SYSTEM_TICK events are fired
|
// Frequency at which SYSTEM_TICK events are fired
|
||||||
const SYSTEM_TICK_INTERVAL = 5 * 60 * 1000;
|
const SYSTEM_TICK_INTERVAL = 5 * 60 * 1000;
|
||||||
|
|
||||||
this.SystemTickFeed = class SystemTickFeed {
|
var SystemTickFeed = class SystemTickFeed {
|
||||||
init() {
|
init() {
|
||||||
this.intervalId = setInterval(() => this.store.dispatch({type: at.SYSTEM_TICK}), SYSTEM_TICK_INTERVAL);
|
this.intervalId = setInterval(() => this.store.dispatch({type: at.SYSTEM_TICK}), SYSTEM_TICK_INTERVAL);
|
||||||
}
|
}
|
||||||
@@ -31,4 +31,4 @@ this.SystemTickFeed = class SystemTickFeed {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.SYSTEM_TICK_INTERVAL = SYSTEM_TICK_INTERVAL;
|
this.SYSTEM_TICK_INTERVAL = SYSTEM_TICK_INTERVAL;
|
||||||
this.EXPORTED_SYMBOLS = ["SystemTickFeed", "SYSTEM_TICK_INTERVAL"];
|
var EXPORTED_SYMBOLS = ["SystemTickFeed", "SYSTEM_TICK_INTERVAL"];
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const USER_PREFS_ENCODING = {
|
|||||||
const PREF_IMPRESSION_ID = "impressionId";
|
const PREF_IMPRESSION_ID = "impressionId";
|
||||||
const TELEMETRY_PREF = "telemetry";
|
const TELEMETRY_PREF = "telemetry";
|
||||||
|
|
||||||
this.TelemetryFeed = class TelemetryFeed {
|
var TelemetryFeed = class TelemetryFeed {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
this.sessions = new Map();
|
this.sessions = new Map();
|
||||||
this._prefs = new Prefs();
|
this._prefs = new Prefs();
|
||||||
@@ -457,7 +457,7 @@ this.TelemetryFeed = class TelemetryFeed {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = [
|
var EXPORTED_SYMBOLS = [
|
||||||
"TelemetryFeed",
|
"TelemetryFeed",
|
||||||
"USER_PREFS_ENCODING",
|
"USER_PREFS_ENCODING",
|
||||||
"PREF_IMPRESSION_ID",
|
"PREF_IMPRESSION_ID",
|
||||||
|
|||||||
@@ -17,9 +17,8 @@ function getDomain(url) {
|
|||||||
}
|
}
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
this.getDomain = getDomain;
|
|
||||||
|
|
||||||
this.TippyTopProvider = class TippyTopProvider {
|
var TippyTopProvider = class TippyTopProvider {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._sitesByDomain = new Map();
|
this._sitesByDomain = new Map();
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
@@ -51,4 +50,4 @@ this.TippyTopProvider = class TippyTopProvider {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.EXPORTED_SYMBOLS = ["TippyTopProvider", "getDomain"];
|
var EXPORTED_SYMBOLS = ["TippyTopProvider", "getDomain"];
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const MIN_FAVICON_SIZE = 96;
|
|||||||
const CACHED_LINK_PROPS_TO_MIGRATE = ["screenshot"];
|
const CACHED_LINK_PROPS_TO_MIGRATE = ["screenshot"];
|
||||||
const PINNED_FAVICON_PROPS_TO_MIGRATE = ["favicon", "faviconRef", "faviconSize"];
|
const PINNED_FAVICON_PROPS_TO_MIGRATE = ["favicon", "faviconRef", "faviconSize"];
|
||||||
|
|
||||||
this.TopSitesFeed = class TopSitesFeed {
|
var TopSitesFeed = class TopSitesFeed {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._tippyTopProvider = new TippyTopProvider();
|
this._tippyTopProvider = new TippyTopProvider();
|
||||||
this.dedupe = new Dedupe(this._dedupeKey);
|
this.dedupe = new Dedupe(this._dedupeKey);
|
||||||
@@ -347,4 +347,4 @@ this.TopSitesFeed = class TopSitesFeed {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.DEFAULT_TOP_SITES = DEFAULT_TOP_SITES;
|
this.DEFAULT_TOP_SITES = DEFAULT_TOP_SITES;
|
||||||
this.EXPORTED_SYMBOLS = ["TopSitesFeed", "DEFAULT_TOP_SITES"];
|
var EXPORTED_SYMBOLS = ["TopSitesFeed", "DEFAULT_TOP_SITES"];
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const SPOC_IMPRESSION_TRACKING_PREF = "feeds.section.topstories.spoc.impressions
|
|||||||
const REC_IMPRESSION_TRACKING_PREF = "feeds.section.topstories.rec.impressions";
|
const REC_IMPRESSION_TRACKING_PREF = "feeds.section.topstories.rec.impressions";
|
||||||
const MAX_LIFETIME_CAP = 100; // Guard against misconfiguration on the server
|
const MAX_LIFETIME_CAP = 100; // Guard against misconfiguration on the server
|
||||||
|
|
||||||
this.TopStoriesFeed = class TopStoriesFeed {
|
var TopStoriesFeed = class TopStoriesFeed {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.spocsPerNewTabs = 0;
|
this.spocsPerNewTabs = 0;
|
||||||
this.newTabsSinceSpoc = 0;
|
this.newTabsSinceSpoc = 0;
|
||||||
@@ -511,4 +511,4 @@ this.SPOC_IMPRESSION_TRACKING_PREF = SPOC_IMPRESSION_TRACKING_PREF;
|
|||||||
this.REC_IMPRESSION_TRACKING_PREF = REC_IMPRESSION_TRACKING_PREF;
|
this.REC_IMPRESSION_TRACKING_PREF = REC_IMPRESSION_TRACKING_PREF;
|
||||||
this.MIN_DOMAIN_AFFINITIES_UPDATE_TIME = MIN_DOMAIN_AFFINITIES_UPDATE_TIME;
|
this.MIN_DOMAIN_AFFINITIES_UPDATE_TIME = MIN_DOMAIN_AFFINITIES_UPDATE_TIME;
|
||||||
this.DEFAULT_RECS_EXPIRE_TIME = DEFAULT_RECS_EXPIRE_TIME;
|
this.DEFAULT_RECS_EXPIRE_TIME = DEFAULT_RECS_EXPIRE_TIME;
|
||||||
this.EXPORTED_SYMBOLS = ["TopStoriesFeed", "STORIES_UPDATE_TIME", "TOPICS_UPDATE_TIME", "SECTION_ID", "SPOC_IMPRESSION_TRACKING_PREF", "MIN_DOMAIN_AFFINITIES_UPDATE_TIME", "REC_IMPRESSION_TRACKING_PREF", "DEFAULT_RECS_EXPIRE_TIME"];
|
var EXPORTED_SYMBOLS = ["TopStoriesFeed", "STORIES_UPDATE_TIME", "TOPICS_UPDATE_TIME", "SECTION_ID", "SPOC_IMPRESSION_TRACKING_PREF", "MIN_DOMAIN_AFFINITIES_UPDATE_TIME", "REC_IMPRESSION_TRACKING_PREF", "DEFAULT_RECS_EXPIRE_TIME"];
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user