Source code

Revision control

Other Tools

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 = ["RFPHelperChild"];
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 RFPHelperChild extends JSWindowActorChild {
22
handleEvent(event) {
23
if (isLetterboxingEnabled && event.type == "resize") {
24
this.sendAsyncMessage("Letterboxing:ContentSizeUpdated");
25
}
26
}
27
}