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 { ActorChild } = ChromeUtils.import(
10
);
11
const { XPCOMUtils } = ChromeUtils.import(
13
);
14
15
const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing";
16
17
XPCOMUtils.defineLazyPreferenceGetter(
18
this,
19
"isLetterboxingEnabled",
20
kPrefLetterboxing,
21
false
22
);
23
24
class RFPHelperChild extends ActorChild {
25
handleEvent() {
26
if (isLetterboxingEnabled) {
27
this.mm.sendAsyncMessage("Letterboxing:ContentSizeUpdated");
28
}
29
}
30
receiveMessage(aMessage) {
31
if (isLetterboxingEnabled) {
32
this.mm.sendAsyncMessage("Letterboxing:ContentSizeUpdated");
33
}
34
}
35
}