gecko-dev/widget/components.conf
Kris Maglione 0a4ce6199e Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8
Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
2022-06-30 09:12:18 +00:00

99 lines
3.6 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 http://mozilla.org/MPL/2.0/.
Classes = [
{
'js_name': 'clipboard',
'cid': '{8b5314ba-db01-11d2-96ce-0060b0fb9956}',
'contract_ids': ['@mozilla.org/widget/clipboard;1'],
'constructor': 'nsClipboardSelector',
'headers': ['/widget/nsContentProcessWidgetFactory.h'],
'interfaces': ['nsIClipboard'],
'overridable': True,
},
{
'cid': '{c0ed2a75-96f8-4166-91d4-2fe8774448dc}',
'type': 'nsClipboardProxy',
'headers': ['/widget/nsClipboardProxy.h'],
'contract_ids': ['@mozilla.org/widget/content/clipboard;1'],
'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
},
{
'cid': '{0f872c8c-3ee6-46bd-92a2-69652c6b474e}',
'contract_ids': ['@mozilla.org/colorpicker;1'],
'constructor': 'nsColorPickerSelector',
'headers': ['/widget/nsContentProcessWidgetFactory.h'],
},
{
'cid': '{11a77259-9d16-4386-8ac8-94338ee22f78}',
'type': 'nsColorPickerProxy',
'headers': ['/widget/nsColorPickerProxy.h'],
'contract_ids': ['@mozilla.org/content/colorpicker;1'],
'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
},
{
'cid': '{8b5314bb-db01-11d2-96ce-0060b0fb9956}',
'contract_ids': ['@mozilla.org/widget/dragservice;1'],
'constructor': 'nsDragServiceSelector',
'headers': ['/widget/nsContentProcessWidgetFactory.h'],
},
{
'cid': '{28be18ae-73ee-494f-8c6d-5d14b7c998c7}',
'type': 'nsDragServiceProxy',
'headers': ['/widget/nsDragServiceProxy.h'],
'contract_ids': ['@mozilla.org/widget/content/dragservice;1'],
'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
},
{
'cid': '{bd57cee8-1dd1-11b2-9fe7-95cf4709aea3}',
'contract_ids': ['@mozilla.org/filepicker;1'],
'constructor': 'nsFilePickerSelector',
'headers': ['/widget/nsContentProcessWidgetFactory.h'],
},
{
'cid': '{40fd47f2-463a-4e4a-a33f-27eb148bfee4}',
'type': 'nsFilePickerProxy',
'headers': ['/widget/nsFilePickerProxy.h'],
'contract_ids': ['@mozilla.org/content/filepicker;1'],
'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
},
{
'cid': '{b148eed2-236d-11d3-b35c-00a0cc3c1cde}',
'contract_ids': ['@mozilla.org/sound;1'],
'singleton': True,
'constructor': 'nsSoundSelector',
'headers': ['/widget/nsContentProcessWidgetFactory.h'],
},
{
'cid': '{b02c2470-6e5a-4865-a202-8b5ebae52632}',
'type': 'nsSoundProxy',
'headers': ['/widget/nsSoundProxy.h'],
'contract_ids': ['@mozilla.org/content/sound;1'],
'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
},
{
'cid': '{c401eb80-f9ea-11d3-bb6f-e732b73ebe7c}',
'contract_ids': ['@mozilla.org/gfx/screenmanager;1'],
'singleton': True,
'constructor': 'nsScreenManagerSelector',
'headers': ['/widget/nsContentProcessWidgetFactory.h'],
},
{
'cid': '{b2cdd51c-4277-417b-a931-08306c7814c3}',
'type': 'mozilla::widget::ScreenManager',
'constructor': 'mozilla::widget::ScreenManager::GetAddRefedSingleton',
'headers': ['mozilla/widget/ScreenManager.h'],
'contract_ids': ['@mozilla.org/gfx/content/screenmanager;1'],
'singleton': True,
'processes': ProcessSelector.CONTENT_PROCESS_ONLY,
},
]