fune/toolkit/components/resistfingerprinting/components.conf
Tom Ritter c8e3989334 Bug 1882422: JSActor and Component Structure to get some data back from JS-land in C++-land r=Gijs
- Create a new XPCOM component UserCharacteristicsPageService backed by
  a JS implementation.  It will be accessed as a Service, so there is
  only ever one of them
- Inside UserCharacteristicsPageService use a HiddenFrame to open a
  page invisible to the user. (In this patch it's a random https://
  site, in the next patch it will become an about: page)
- Create a Parent/Child JSWindowActor so that the hidden webpage (which
  will eventually be in the privilegedabout content process) can
  communicate back to the parent.
- Use Topics/Observers so the Actor can be registered when we need it
  and then unregistered when we're done. The registering occurs in a
  RFPHelper which a separate thing already running and listening for
  stuff.
- Inside nsUserCharacteristics.cpp::CanvasStuff() we ask our service
  to load the webpage, then will await a promise indicating the page has
  been loaded. That promise is the return value of
  UserCharacteristicsPageService::createContentPage()  and is resolved after
  UserCharacteristicsPageService::pageLoaded calls backgroundResolve().
  That, in turn, happens after UserCharacteristicsParent gets the
  message from UserCharacteristicsChild that the DOMContentLoaded
  event has occurred.

The HiddenFrame stuff is influenced by PageDataService.sys.mjs -
that's where the HiddenBrowserManager stuff came from.

In the next patch we'll actually do something when that promise is
resolved.

Differential Revision: https://phabricator.services.mozilla.com/D202893
2024-04-03 23:43:16 +00:00

44 lines
1.8 KiB
Python

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
Classes = [
{
'name': 'RFPService',
'cid': '{20093b2e-d5d5-4ce0-8355-96b8d2dc7ff5}',
'interfaces': ['nsIRFPService'],
'contract_ids': ['@mozilla.org/rfp-service;1'],
'type': 'mozilla::nsRFPService',
'headers': ['/toolkit/components/resistfingerprinting/nsRFPService.h'],
'singleton': True,
'constructor': 'mozilla::nsRFPService::GetOrCreate',
'js_name': 'rfp',
'categories': {
'profile-after-change': 'nsRFPService',
},
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
},
{
'cid': '{07f45442-1806-44be-9230-12eb79de9bac}',
'contract_ids': ['@mozilla.org/fingerprinting-override;1'],
'esModule': 'resource://gre/modules/FingerprintingWebCompatService.sys.mjs',
'constructor': 'FingerprintingOverride',
},
{
'cid': '{e7b1da06-2594-4670-aea4-131070baca4c}',
'contract_ids': ['@mozilla.org/fingerprinting-webcompat-service;1'],
'singleton': True,
'esModule': 'resource://gre/modules/FingerprintingWebCompatService.sys.mjs',
'constructor': 'FingerprintingWebCompatService',
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
},
{
'cid': '{ce3e9659-e311-49fb-b18b-7f27c6659b23}',
'contract_ids': ['@mozilla.org/user-characteristics-page;1'],
'esModule': 'resource://gre/modules/UserCharacteristicsPageService.sys.mjs',
'constructor': 'UserCharacteristicsPageService',
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
},
]