Source code

Revision control

Other Tools

1
1; /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
2
/* This Source Code Form is subject to the terms of the Mozilla Public
3
* License, v. 2.0. If a copy of the MPL was not distributed with this
4
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
var EXPORTED_SYMBOLS = ["RFPHelperParent"];
7
8
const { XPCOMUtils } = ChromeUtils.import(
10
);
11
12
const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing";
13
14
XPCOMUtils.defineLazyPreferenceGetter(
15
this,
16
"isLetterboxingEnabled",
17
kPrefLetterboxing,
18
false
19
);
20
21
class RFPHelperParent extends JSWindowActorParent {
22
receiveMessage(aMessage) {
23
if (
24
isLetterboxingEnabled &&
25
aMessage.name == "Letterboxing:ContentSizeUpdated"
26
) {
27
let browser = this.browsingContext.top.embedderElement;
28
let window = browser.ownerGlobal;
29
window.RFPHelper.contentSizeUpdated(window);
30
}
31
}
32
}